apify-cli 1.0.0-beta.9 → 1.0.0-beta.90

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/README.md +82 -75
  3. package/bin/dev.js +7 -2
  4. package/bin/dev.sh +4 -0
  5. package/bin/run.js +7 -0
  6. package/dist/.tsbuildinfo +1 -1
  7. package/dist/commands/actor/push-data.js +2 -2
  8. package/dist/commands/actor/set-value.js +3 -3
  9. package/dist/commands/actor/set-value.js.map +1 -1
  10. package/dist/commands/call.d.ts +1 -0
  11. package/dist/commands/call.d.ts.map +1 -1
  12. package/dist/commands/call.js +49 -20
  13. package/dist/commands/call.js.map +1 -1
  14. package/dist/commands/create.d.ts +1 -0
  15. package/dist/commands/create.d.ts.map +1 -1
  16. package/dist/commands/create.js +12 -3
  17. package/dist/commands/create.js.map +1 -1
  18. package/dist/commands/login.d.ts +1 -0
  19. package/dist/commands/login.d.ts.map +1 -1
  20. package/dist/commands/login.js +143 -12
  21. package/dist/commands/login.js.map +1 -1
  22. package/dist/commands/push.d.ts.map +1 -1
  23. package/dist/commands/push.js +35 -8
  24. package/dist/commands/push.js.map +1 -1
  25. package/dist/commands/run.d.ts +1 -0
  26. package/dist/commands/run.d.ts.map +1 -1
  27. package/dist/commands/run.js +76 -20
  28. package/dist/commands/run.js.map +1 -1
  29. package/dist/commands/secrets/index.js +1 -1
  30. package/dist/commands/{vis.d.ts → validate-schema.d.ts} +2 -1
  31. package/dist/commands/validate-schema.d.ts.map +1 -0
  32. package/dist/commands/{vis.js → validate-schema.js} +7 -1
  33. package/dist/commands/validate-schema.js.map +1 -0
  34. package/dist/hooks/deprecations.d.ts +4 -0
  35. package/dist/hooks/deprecations.d.ts.map +1 -0
  36. package/dist/hooks/deprecations.js +18 -0
  37. package/dist/hooks/deprecations.js.map +1 -0
  38. package/dist/lib/actor.d.ts +1 -1
  39. package/dist/lib/actor.js +2 -2
  40. package/dist/lib/actor.js.map +1 -1
  41. package/dist/lib/consts.d.ts +8 -0
  42. package/dist/lib/consts.d.ts.map +1 -1
  43. package/dist/lib/consts.js +10 -0
  44. package/dist/lib/consts.js.map +1 -1
  45. package/dist/lib/exec.d.ts.map +1 -1
  46. package/dist/lib/exec.js +6 -1
  47. package/dist/lib/exec.js.map +1 -1
  48. package/dist/lib/input_schema.d.ts +1 -1
  49. package/dist/lib/input_schema.d.ts.map +1 -1
  50. package/dist/lib/secrets.js +3 -3
  51. package/dist/lib/telemetry.d.ts.map +1 -1
  52. package/dist/lib/utils.d.ts +6 -7
  53. package/dist/lib/utils.d.ts.map +1 -1
  54. package/dist/lib/utils.js +29 -9
  55. package/dist/lib/utils.js.map +1 -1
  56. package/oclif.manifest.json +40 -37
  57. package/package.json +148 -141
  58. package/dist/commands/login-new.d.ts +0 -10
  59. package/dist/commands/login-new.d.ts.map +0 -1
  60. package/dist/commands/login-new.js +0 -166
  61. package/dist/commands/login-new.js.map +0 -1
  62. package/dist/commands/vis.d.ts.map +0 -1
  63. package/dist/commands/vis.js.map +0 -1
package/README.md CHANGED
@@ -76,25 +76,25 @@ apify-cli/0.10.0 darwin-x64 node-v16.14.2
76
76
 
77
77
  The following examples demonstrate the basic usage of Apify CLI.
78
78
 
79
- ### Create a new actor from scratch
79
+ ### Create a new Actor from scratch
80
80
 
81
81
  ```bash
82
82
  apify create my-hello-world
83
83
  ```
84
84
 
85
- First, you will be prompted to select a template with the boilerplate for the actor, to help you get started quickly.
85
+ First, you will be prompted to select a template with the boilerplate for the Actor, to help you get started quickly.
86
86
  The command will create a directory called `my-hello-world` that contains a Node.js project
87
- for the actor and a few configuration files.
87
+ for the Actor and a few configuration files.
88
88
 
89
89
  > If you decided to skip the installation and go with `npx`, the command will be `npx apify-cli create my-hello-world`.
90
90
 
91
- ### Create a new actor from existing project
91
+ ### Create a new Actor from existing project
92
92
 
93
93
  ```bash
94
94
  cd ./my/awesome/project
95
95
  apify init
96
96
  ```
97
- This command will only set up local actor development environment in an existing directory,
97
+ This command will only set up local Actor development environment in an existing directory,
98
98
  i.e. it will create the `.actor/actor.json` file and `apify_storage` directory.
99
99
 
100
100
  Before you can run your project locally using `apify run`, you have to set up the right start command in `package.json` under scripts.start. For example:
@@ -113,14 +113,14 @@ You can find more information about by running `apify help run`.
113
113
 
114
114
  If you want to run a Scrapy project on Apify platform, follow the Scrapy integration guide [here](https://docs.apify.com/cli/docs/integrating-scrapy).
115
115
 
116
- ### Run the actor locally
116
+ ### Run the Actor locally
117
117
 
118
118
  ```bash
119
119
  cd my-hello-world
120
120
  apify run
121
121
  ```
122
122
 
123
- This command runs the actor on your local machine.
123
+ This command runs the Actor on your local machine.
124
124
  Now's your chance to develop the logic - or magic :smirk:
125
125
 
126
126
  ### Login with your Apify account
@@ -135,21 +135,21 @@ your [Apify API token](https://console.apify.com/account#/integrations).
135
135
  Note that the command will store the API token and other sensitive information to `~/.apify`.
136
136
 
137
137
 
138
- ### Push the actor to the Apify cloud
138
+ ### Push the Actor to the Apify cloud
139
139
 
140
140
  ```bash
141
141
  apify push
142
142
  ```
143
143
 
144
- This command uploads your project to the Apify cloud and builds an actor from it. On the platform, actor needs to be built before it can be run.
144
+ This command uploads your project to the Apify cloud and builds an Actor from it. On the platform, Actor needs to be built before it can be run.
145
145
 
146
- ### Run an actor on the Apify cloud
146
+ ### Run an Actor on the Apify cloud
147
147
 
148
148
  ```bash
149
149
  apify call
150
150
  ```
151
151
 
152
- Runs the actor corresponding to the current directory on the Apify platform.
152
+ Runs the Actor corresponding to the current directory on the Apify platform.
153
153
 
154
154
  This command can also be used to run other Actors, for example:
155
155
 
@@ -159,8 +159,8 @@ apify call apify/hello-world
159
159
 
160
160
  ### So what's in this .actor/actor.json file?
161
161
 
162
- This file associates your local development project with an actor on the Apify platform.
163
- It contains information such as actor name, version, build tag and environment variables.
162
+ This file associates your local development project with an Actor on the Apify platform.
163
+ It contains information such as Actor name, version, build tag and environment variables.
164
164
  Make sure you commit this file to the Git repository.
165
165
 
166
166
  For example, `.actor/actor.json` file can look as follows:
@@ -186,7 +186,7 @@ For example, `.actor/actor.json` file can look as follows:
186
186
  ```
187
187
 
188
188
  **`Dockerfile` field**\
189
- If you specify the path to your Docker file under the `dockerfile` field, this file will be used for actor builds on the platform. If not specified, the system will look for Docker files at `.actor/Dockerfile` and `Dockerfile` in this order of preference.
189
+ If you specify the path to your Docker file under the `dockerfile` field, this file will be used for Actor builds on the platform. If not specified, the system will look for Docker files at `.actor/Dockerfile` and `Dockerfile` in this order of preference.
190
190
 
191
191
  **`Readme` field** \
192
192
  If you specify the path to your readme file under the `readme` field, the readme at this path will be used on the platform. If not specified, readme at `.actor/README.md` and `README.md` will be used in this order of preference.
@@ -195,17 +195,17 @@ If you specify the path to your readme file under the `readme` field, the readme
195
195
  You can embed your [input schema](https://docs.apify.com/actors/development/input-schema#specification-version-1) object directly in `actor.json` under `input` field. Alternatively, you can provide a path to a custom input schema. If not provided, the input schema at `.actor/INPUT_SCHEMA.json` and `INPUT_SCHEMA.json` is used in this order of preference.
196
196
 
197
197
  **`Storages.dataset` field**\
198
- You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. You can read more about the schema of your actor output [here](https://docs.apify.com/actors/development/output-schema#specification-version-1).
198
+ You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. You can read more about the schema of your Actor output [here](https://docs.apify.com/actors/development/output-schema#specification-version-1).
199
199
 
200
200
  **Note on migration from deprecated config "apify.json"**\
201
- *Note that previously, actor config was stored in the `apify.json` file that has been deprecated. You can find the (very slight) differences and migration info in [migration guidelines](https://github.com/apify/apify-cli/blob/master/MIGRATIONS.md).*
201
+ *Note that previously, Actor config was stored in the `apify.json` file that has been deprecated. You can find the (very slight) differences and migration info in [migration guidelines](https://github.com/apify/apify-cli/blob/master/MIGRATIONS.md).*
202
202
 
203
203
  ## Environment variables
204
204
 
205
205
  There are two options how you can set up environment variables for Actors.
206
206
 
207
207
  ### Set up environment variables in .actor/actor.json
208
- All keys from `env` will be set as environment variables into Apify platform after you push actor to Apify. Current values on Apify will be overridden.
208
+ All keys from `env` will be set as environment variables into Apify platform after you push Actor to Apify. Current values on Apify will be overridden.
209
209
  ```json
210
210
  {
211
211
  "actorSpecification": 1,
@@ -220,7 +220,7 @@ All keys from `env` will be set as environment variables into Apify platform aft
220
220
  ```
221
221
 
222
222
  ### Set up environment variables in Apify Console
223
- In [Apify Console](https://console.apify.com/actors) select your actor, you can set up variables into Source tab.
223
+ In [Apify Console](https://console.apify.com/actors) select your Actor, you can set up variables into Source tab.
224
224
  After setting up variables in the app, remove the `environmentVariables` from `.actor/actor.json`. Otherwise, variables from `.actor/actor.json` will override variables in the app.
225
225
  ```json
226
226
  {
@@ -276,13 +276,13 @@ This section contains printouts of `apify help` for all commands.
276
276
 
277
277
  <!-- commands -->
278
278
  * [`apify actor`](#apify-actor)
279
- * [`apify actor:get-input`](#apify-actorget-input)
280
- * [`apify actor:get-value KEY`](#apify-actorget-value-key)
281
- * [`apify actor:push-data [ITEM]`](#apify-actorpush-data-item)
282
- * [`apify actor:set-value KEY [VALUE]`](#apify-actorset-value-key-value)
279
+ * [`apify actor get-input`](#apify-actor-get-input)
280
+ * [`apify actor get-value KEY`](#apify-actor-get-value-key)
281
+ * [`apify actor push-data [ITEM]`](#apify-actor-push-data-item)
282
+ * [`apify actor set-value KEY [VALUE]`](#apify-actor-set-value-key-value)
283
283
  * [`apify call [ACTORID]`](#apify-call-actorid)
284
284
  * [`apify create [ACTORNAME]`](#apify-create-actorname)
285
- * [`apify help [COMMANDS]`](#apify-help-commands)
285
+ * [`apify help [COMMAND]`](#apify-help-command)
286
286
  * [`apify info`](#apify-info)
287
287
  * [`apify init [ACTORNAME]`](#apify-init-actorname)
288
288
  * [`apify login`](#apify-login)
@@ -291,9 +291,9 @@ This section contains printouts of `apify help` for all commands.
291
291
  * [`apify push [ACTORID]`](#apify-push-actorid)
292
292
  * [`apify run`](#apify-run)
293
293
  * [`apify secrets`](#apify-secrets)
294
- * [`apify secrets:add NAME VALUE`](#apify-secretsadd-name-value)
295
- * [`apify secrets:rm NAME`](#apify-secretsrm-name)
296
- * [`apify vis [PATH]`](#apify-vis-path)
294
+ * [`apify secrets add NAME VALUE`](#apify-secrets-add-name-value)
295
+ * [`apify secrets rm NAME`](#apify-secrets-rm-name)
296
+ * [`apify validate-schema [PATH]`](#apify-validate-schema-path)
297
297
 
298
298
  ## `apify actor`
299
299
 
@@ -307,29 +307,29 @@ DESCRIPTION
307
307
  Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
308
308
  ```
309
309
 
310
- _See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/actor/index.ts)_
310
+ _See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/actor/index.ts)_
311
311
 
312
- ## `apify actor:get-input`
312
+ ## `apify actor get-input`
313
313
 
314
314
  Gets the Actor input value from the default key-value store associated with the Actor run.
315
315
 
316
316
  ```
317
317
  USAGE
318
- $ apify actor:get-input
318
+ $ apify actor get-input
319
319
 
320
320
  DESCRIPTION
321
321
  Gets the Actor input value from the default key-value store associated with the Actor run.
322
322
  ```
323
323
 
324
- _See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/actor/get-input.ts)_
324
+ _See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/actor/get-input.ts)_
325
325
 
326
- ## `apify actor:get-value KEY`
326
+ ## `apify actor get-value KEY`
327
327
 
328
328
  Gets a value from the default key-value store associated with the Actor run.
329
329
 
330
330
  ```
331
331
  USAGE
332
- $ apify actor:get-value KEY
332
+ $ apify actor get-value KEY
333
333
 
334
334
  ARGUMENTS
335
335
  KEY Key of the record in key-value store
@@ -338,15 +338,15 @@ DESCRIPTION
338
338
  Gets a value from the default key-value store associated with the Actor run.
339
339
  ```
340
340
 
341
- _See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/actor/get-value.ts)_
341
+ _See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/actor/get-value.ts)_
342
342
 
343
- ## `apify actor:push-data [ITEM]`
343
+ ## `apify actor push-data [ITEM]`
344
344
 
345
345
  Stores an object or an array of objects to the default dataset of the Actor run.
346
346
 
347
347
  ```
348
348
  USAGE
349
- $ apify actor:push-data [ITEM]
349
+ $ apify actor push-data [ITEM]
350
350
 
351
351
  ARGUMENTS
352
352
  ITEM JSON string with one object or array of objects containing data to be stored in the default dataset.
@@ -355,20 +355,20 @@ DESCRIPTION
355
355
  Stores an object or an array of objects to the default dataset of the Actor run.
356
356
  It is possible to pass data using item argument or stdin.
357
357
  Passing data using argument:
358
- $ apify actor:push-data {"foo": "bar"}
358
+ $ apify actor push-data {"foo": "bar"}
359
359
  Passing data using stdin with pipe:
360
- $ cat ./test.json | apify actor:push-data
360
+ $ cat ./test.json | apify actor push-data
361
361
  ```
362
362
 
363
- _See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/actor/push-data.ts)_
363
+ _See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/actor/push-data.ts)_
364
364
 
365
- ## `apify actor:set-value KEY [VALUE]`
365
+ ## `apify actor set-value KEY [VALUE]`
366
366
 
367
367
  Sets or removes record into the default KeyValueStore associated with the Actor run.
368
368
 
369
369
  ```
370
370
  USAGE
371
- $ apify actor:set-value KEY [VALUE] [-c <value>]
371
+ $ apify actor set-value KEY [VALUE] [-c <value>]
372
372
 
373
373
  ARGUMENTS
374
374
  KEY Key of the record in key-value store.
@@ -384,12 +384,12 @@ DESCRIPTION
384
384
  Sets or removes record into the default KeyValueStore associated with the Actor run.
385
385
  It is possible to pass data using argument or stdin.
386
386
  Passing data using argument:
387
- $ apify actor:set-value KEY my-value
387
+ $ apify actor set-value KEY my-value
388
388
  Passing data using stdin with pipe:
389
- $ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain
389
+ $ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain
390
390
  ```
391
391
 
392
- _See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/actor/set-value.ts)_
392
+ _See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/actor/set-value.ts)_
393
393
 
394
394
  ## `apify call [ACTORID]`
395
395
 
@@ -400,8 +400,8 @@ USAGE
400
400
  $ apify call [ACTORID] [-b <value>] [-t <value>] [-m <value>] [-w <value>]
401
401
 
402
402
  ARGUMENTS
403
- ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
404
- command runs the remote Actor specified in the ".actor/actor.json" file.
403
+ ACTORID Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not
404
+ provided, the command runs the remote Actor specified in the ".actor/actor.json" file.
405
405
 
406
406
  FLAGS
407
407
  -b, --build=<value> Tag or number of the build to run (e.g. "latest" or "1.2.34").
@@ -415,7 +415,7 @@ DESCRIPTION
415
415
  takes input for the Actor from the default local key-value store by default.
416
416
  ```
417
417
 
418
- _See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/call.ts)_
418
+ _See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/call.ts)_
419
419
 
420
420
  ## `apify create [ACTORNAME]`
421
421
 
@@ -423,7 +423,7 @@ Creates a new Actor project directory from a selected boilerplate template.
423
423
 
424
424
  ```
425
425
  USAGE
426
- $ apify create [ACTORNAME] [-t <value>] [--skip-dependency-install]
426
+ $ apify create [ACTORNAME] [-t <value>] [--skip-dependency-install] [--omit-optional-deps]
427
427
 
428
428
  ARGUMENTS
429
429
  ACTORNAME Name of the Actor and its directory
@@ -433,24 +433,25 @@ FLAGS
433
433
  Visit
434
434
  https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json
435
435
  to find available template names.
436
+ --omit-optional-deps Skip installing optional dependencies.
436
437
  --skip-dependency-install Skip installing Actor dependencies.
437
438
 
438
439
  DESCRIPTION
439
440
  Creates a new Actor project directory from a selected boilerplate template.
440
441
  ```
441
442
 
442
- _See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/create.ts)_
443
+ _See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/create.ts)_
443
444
 
444
- ## `apify help [COMMANDS]`
445
+ ## `apify help [COMMAND]`
445
446
 
446
447
  Display help for apify.
447
448
 
448
449
  ```
449
450
  USAGE
450
- $ apify help [COMMANDS] [-n]
451
+ $ apify help [COMMAND...] [-n]
451
452
 
452
453
  ARGUMENTS
453
- COMMANDS Command to show help for.
454
+ COMMAND... Command to show help for.
454
455
 
455
456
  FLAGS
456
457
  -n, --nested-commands Include all nested commands in the output.
@@ -459,7 +460,7 @@ DESCRIPTION
459
460
  Display help for apify.
460
461
  ```
461
462
 
462
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.15/src/commands/help.ts)_
463
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.0/src/commands/help.ts)_
463
464
 
464
465
  ## `apify info`
465
466
 
@@ -474,7 +475,7 @@ DESCRIPTION
474
475
  The information is printed to the console.
475
476
  ```
476
477
 
477
- _See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/info.ts)_
478
+ _See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/info.ts)_
478
479
 
479
480
  ## `apify init [ACTORNAME]`
480
481
 
@@ -502,26 +503,28 @@ DESCRIPTION
502
503
  WARNING: The directory at "storage" will be overwritten if it already exists.
503
504
  ```
504
505
 
505
- _See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/init.ts)_
506
+ _See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/init.ts)_
506
507
 
507
508
  ## `apify login`
508
509
 
509
- Logs in to your Apify account using a provided API token.
510
+ Logs in to your Apify account.
510
511
 
511
512
  ```
512
513
  USAGE
513
- $ apify login [-t <value>]
514
+ $ apify login [-t <value>] [-m console|manual]
514
515
 
515
516
  FLAGS
516
- -t, --token=<value> [Optional] Apify API token
517
+ -m, --method=<option> [Optional] Method of logging in to Apify
518
+ <options: console|manual>
519
+ -t, --token=<value> [Optional] Apify API token
517
520
 
518
521
  DESCRIPTION
519
- Logs in to your Apify account using a provided API token.
522
+ Logs in to your Apify account.
520
523
  The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
521
524
  "apify" commands. To log out, call "apify logout".
522
525
  ```
523
526
 
524
- _See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/login.ts)_
527
+ _See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/login.ts)_
525
528
 
526
529
  ## `apify logout`
527
530
 
@@ -537,7 +540,7 @@ DESCRIPTION
537
540
  call "apify login".
538
541
  ```
539
542
 
540
- _See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/logout.ts)_
543
+ _See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/logout.ts)_
541
544
 
542
545
  ## `apify pull [ACTORID]`
543
546
 
@@ -559,7 +562,7 @@ DESCRIPTION
559
562
  cloned. If it is defined as Web IDE, it will fetch the files.
560
563
  ```
561
564
 
562
- _See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/pull.ts)_
565
+ _See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/pull.ts)_
563
566
 
564
567
  ## `apify push [ACTORID]`
565
568
 
@@ -597,7 +600,7 @@ DESCRIPTION
597
600
  overwritten with --force flag.
598
601
  ```
599
602
 
600
- _See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/push.ts)_
603
+ _See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/push.ts)_
601
604
 
602
605
  ## `apify run`
603
606
 
@@ -605,11 +608,15 @@ Runs the Actor locally in the current directory.
605
608
 
606
609
  ```
607
610
  USAGE
608
- $ apify run [-p] [--purge-queue] [--purge-dataset] [--purge-key-value-store]
611
+ $ apify run [-p] [--purge-queue] [--purge-dataset] [--purge-key-value-store] [--entrypoint <value>]
609
612
 
610
613
  FLAGS
611
614
  -p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
612
615
  options.
616
+ --entrypoint=<value> Optional entrypoint for running with injected environment variables.
617
+ For Python, it is the module name, or a path to a file.
618
+ For node.js, it is the npm script name, or a path to a JS/MJS file. You can also pass in
619
+ a directory name, provided that directory contains an "index.js" file.
613
620
  --purge-dataset Deletes the local directory containing the default dataset before the run starts.
614
621
  --purge-key-value-store Deletes all records from the default key-value store in the local directory before the
615
622
  run starts, except for the "INPUT" key.
@@ -625,7 +632,7 @@ DESCRIPTION
625
632
  package.json file. You can set up your own main file or environment variables by changing it.
626
633
  ```
627
634
 
628
- _See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/run.ts)_
635
+ _See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/run.ts)_
629
636
 
630
637
  ## `apify secrets`
631
638
 
@@ -639,7 +646,7 @@ DESCRIPTION
639
646
  Manages secret values for Actor environment variables.
640
647
 
641
648
  Example:
642
- $ apify secrets:add mySecret TopSecretValue123
649
+ $ apify secrets add mySecret TopSecretValue123
643
650
 
644
651
  Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
645
652
  prefix:
@@ -655,15 +662,15 @@ DESCRIPTION
655
662
  of the Actor.
656
663
  ```
657
664
 
658
- _See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/secrets/index.ts)_
665
+ _See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/secrets/index.ts)_
659
666
 
660
- ## `apify secrets:add NAME VALUE`
667
+ ## `apify secrets add NAME VALUE`
661
668
 
662
669
  Adds a new secret value.
663
670
 
664
671
  ```
665
672
  USAGE
666
- $ apify secrets:add NAME VALUE
673
+ $ apify secrets add NAME VALUE
667
674
 
668
675
  ARGUMENTS
669
676
  NAME Name of the secret
@@ -674,15 +681,15 @@ DESCRIPTION
674
681
  The secrets are stored to a file at ~/.apify
675
682
  ```
676
683
 
677
- _See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/secrets/add.ts)_
684
+ _See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/secrets/add.ts)_
678
685
 
679
- ## `apify secrets:rm NAME`
686
+ ## `apify secrets rm NAME`
680
687
 
681
688
  Removes the secret.
682
689
 
683
690
  ```
684
691
  USAGE
685
- $ apify secrets:rm NAME
692
+ $ apify secrets rm NAME
686
693
 
687
694
  ARGUMENTS
688
695
  NAME Name of the secret
@@ -691,15 +698,15 @@ DESCRIPTION
691
698
  Removes the secret.
692
699
  ```
693
700
 
694
- _See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/secrets/rm.ts)_
701
+ _See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/secrets/rm.ts)_
695
702
 
696
- ## `apify vis [PATH]`
703
+ ## `apify validate-schema [PATH]`
697
704
 
698
705
  Validates input schema and prints errors found.
699
706
 
700
707
  ```
701
708
  USAGE
702
- $ apify vis [PATH]
709
+ $ apify validate-schema [PATH]
703
710
 
704
711
  ARGUMENTS
705
712
  PATH Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.
@@ -716,5 +723,5 @@ DESCRIPTION
716
723
  You can also pass any custom path to your input schema to have it validated instead.
717
724
  ```
718
725
 
719
- _See code: [src/commands/vis.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.9/src/commands/vis.ts)_
726
+ _See code: [src/commands/validate-schema.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.90/src/commands/validate-schema.ts)_
720
727
  <!-- commandsstop -->
package/bin/dev.js CHANGED
@@ -1,9 +1,14 @@
1
- #!/usr/bin/env node_modules/.bin/tsx
2
-
3
1
  import { execute } from '@oclif/core';
2
+ import { satisfies } from 'semver';
4
3
 
4
+ import { SUPPORTED_NODEJS_VERSION } from '../src/lib/consts.ts';
5
5
  import { error } from '../src/lib/outputs.ts';
6
6
 
7
+ if (!satisfies(process.version, SUPPORTED_NODEJS_VERSION)) {
8
+ error(`Apify CLI requires Node.js version ${SUPPORTED_NODEJS_VERSION}. Your current version is ${process.version}.`);
9
+ process.exit(1);
10
+ }
11
+
7
12
  try {
8
13
  await execute({ development: true, dir: import.meta.url });
9
14
  } catch (err) {
package/bin/dev.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
+ "${DIR}"/../node_modules/.bin/tsx "${DIR}"/dev.js "$@"
package/bin/run.js CHANGED
@@ -1,9 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { execute } from '@oclif/core';
4
+ import { satisfies } from 'semver';
4
5
 
6
+ import { SUPPORTED_NODEJS_VERSION } from '../dist/lib/consts.js';
5
7
  import { error } from '../dist/lib/outputs.js';
6
8
 
9
+ if (!satisfies(process.version, SUPPORTED_NODEJS_VERSION)) {
10
+ error(`Apify CLI requires Node.js version ${SUPPORTED_NODEJS_VERSION}. Your current version is ${process.version}.`);
11
+ process.exit(1);
12
+ }
13
+
7
14
  try {
8
15
  await execute({ development: false, dir: import.meta.url });
9
16
  } catch (err) {