apify-cli 0.20.0 → 0.20.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.
Files changed (147) hide show
  1. package/README.md +23 -24
  2. package/bin/dev.js +11 -9
  3. package/bin/run.js +11 -9
  4. package/dist/.tsbuildinfo +1 -1
  5. package/dist/commands/actor/get-input.d.ts.map +1 -1
  6. package/dist/commands/actor/get-input.js.map +1 -1
  7. package/dist/commands/actor/get-value.d.ts.map +1 -1
  8. package/dist/commands/actor/get-value.js.map +1 -1
  9. package/dist/commands/actor/index.d.ts.map +1 -1
  10. package/dist/commands/actor/index.js.map +1 -1
  11. package/dist/commands/actor/push-data.d.ts.map +1 -1
  12. package/dist/commands/actor/push-data.js +6 -6
  13. package/dist/commands/actor/push-data.js.map +1 -1
  14. package/dist/commands/actor/set-value.d.ts.map +1 -1
  15. package/dist/commands/actor/set-value.js +15 -11
  16. package/dist/commands/actor/set-value.js.map +1 -1
  17. package/dist/commands/call.d.ts +0 -1
  18. package/dist/commands/call.d.ts.map +1 -1
  19. package/dist/commands/call.js +11 -73
  20. package/dist/commands/call.js.map +1 -1
  21. package/dist/commands/check-version.d.ts.map +1 -1
  22. package/dist/commands/check-version.js.map +1 -1
  23. package/dist/commands/create.d.ts.map +1 -1
  24. package/dist/commands/create.js +51 -18
  25. package/dist/commands/create.js.map +1 -1
  26. package/dist/commands/edit-input-schema.d.ts.map +1 -1
  27. package/dist/commands/edit-input-schema.js +7 -2
  28. package/dist/commands/edit-input-schema.js.map +1 -1
  29. package/dist/commands/info.d.ts.map +1 -1
  30. package/dist/commands/info.js +2 -2
  31. package/dist/commands/info.js.map +1 -1
  32. package/dist/commands/init-wrap-scrapy.d.ts.map +1 -1
  33. package/dist/commands/init-wrap-scrapy.js.map +1 -1
  34. package/dist/commands/init.d.ts.map +1 -1
  35. package/dist/commands/init.js +14 -10
  36. package/dist/commands/init.js.map +1 -1
  37. package/dist/commands/login.d.ts.map +1 -1
  38. package/dist/commands/login.js +27 -11
  39. package/dist/commands/login.js.map +1 -1
  40. package/dist/commands/logout.d.ts.map +1 -1
  41. package/dist/commands/logout.js +2 -2
  42. package/dist/commands/logout.js.map +1 -1
  43. package/dist/commands/pull.d.ts.map +1 -1
  44. package/dist/commands/pull.js +10 -6
  45. package/dist/commands/pull.js.map +1 -1
  46. package/dist/commands/push.d.ts.map +1 -1
  47. package/dist/commands/push.js +34 -17
  48. package/dist/commands/push.js.map +1 -1
  49. package/dist/commands/run.d.ts +4 -0
  50. package/dist/commands/run.d.ts.map +1 -1
  51. package/dist/commands/run.js +109 -94
  52. package/dist/commands/run.js.map +1 -1
  53. package/dist/commands/secrets/add.d.ts.map +1 -1
  54. package/dist/commands/secrets/add.js.map +1 -1
  55. package/dist/commands/secrets/index.d.ts.map +1 -1
  56. package/dist/commands/secrets/index.js +11 -11
  57. package/dist/commands/secrets/index.js.map +1 -1
  58. package/dist/commands/secrets/rm.d.ts.map +1 -1
  59. package/dist/commands/secrets/rm.js.map +1 -1
  60. package/dist/commands/task/index.d.ts.map +1 -1
  61. package/dist/commands/task/index.js.map +1 -1
  62. package/dist/commands/task/run.d.ts.map +1 -1
  63. package/dist/commands/task/run.js +3 -3
  64. package/dist/commands/task/run.js.map +1 -1
  65. package/dist/commands/validate-schema.d.ts.map +1 -1
  66. package/dist/commands/validate-schema.js +4 -1
  67. package/dist/commands/validate-schema.js.map +1 -1
  68. package/dist/hooks/deprecations.js.map +1 -1
  69. package/dist/hooks/init.js.map +1 -1
  70. package/dist/lib/actor.d.ts.map +1 -1
  71. package/dist/lib/actor.js.map +1 -1
  72. package/dist/lib/apify-oclif-help.d.ts.map +1 -1
  73. package/dist/lib/apify-oclif-help.js +2 -2
  74. package/dist/lib/apify-oclif-help.js.map +1 -1
  75. package/dist/lib/apify_command.d.ts +2 -2
  76. package/dist/lib/apify_command.d.ts.map +1 -1
  77. package/dist/lib/apify_command.js +2 -13
  78. package/dist/lib/apify_command.js.map +1 -1
  79. package/dist/lib/commands/read-stdin.d.ts +2 -0
  80. package/dist/lib/commands/read-stdin.d.ts.map +1 -0
  81. package/dist/lib/commands/read-stdin.js +16 -0
  82. package/dist/lib/commands/read-stdin.js.map +1 -0
  83. package/dist/lib/commands/resolve-input.d.ts +4 -0
  84. package/dist/lib/commands/resolve-input.d.ts.map +1 -1
  85. package/dist/lib/commands/resolve-input.js +84 -0
  86. package/dist/lib/commands/resolve-input.js.map +1 -1
  87. package/dist/lib/commands/run-on-cloud.d.ts.map +1 -1
  88. package/dist/lib/commands/run-on-cloud.js +8 -3
  89. package/dist/lib/commands/run-on-cloud.js.map +1 -1
  90. package/dist/lib/community.js +2 -2
  91. package/dist/lib/community.js.map +1 -1
  92. package/dist/lib/consts.d.ts +1 -1
  93. package/dist/lib/consts.d.ts.map +1 -1
  94. package/dist/lib/consts.js.map +1 -1
  95. package/dist/lib/create-utils.d.ts.map +1 -1
  96. package/dist/lib/create-utils.js +19 -9
  97. package/dist/lib/create-utils.js.map +1 -1
  98. package/dist/lib/exec.d.ts +1 -1
  99. package/dist/lib/exec.d.ts.map +1 -1
  100. package/dist/lib/exec.js.map +1 -1
  101. package/dist/lib/files.d.ts.map +1 -1
  102. package/dist/lib/files.js +2 -4
  103. package/dist/lib/files.js.map +1 -1
  104. package/dist/lib/input_schema.d.ts.map +1 -1
  105. package/dist/lib/input_schema.js +6 -7
  106. package/dist/lib/input_schema.js.map +1 -1
  107. package/dist/lib/local_state.d.ts.map +1 -1
  108. package/dist/lib/local_state.js +1 -1
  109. package/dist/lib/local_state.js.map +1 -1
  110. package/dist/lib/outputs.d.ts.map +1 -1
  111. package/dist/lib/outputs.js.map +1 -1
  112. package/dist/lib/project_analyzer.d.ts.map +1 -1
  113. package/dist/lib/project_analyzer.js.map +1 -1
  114. package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +1 -1
  115. package/dist/lib/projects/CrawleeAnalyzer.js.map +1 -1
  116. package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +1 -1
  117. package/dist/lib/projects/OldApifySDKAnalyzer.js.map +1 -1
  118. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +1 -1
  119. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js +1 -1
  120. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +1 -1
  121. package/dist/lib/projects/scrapy/Spider.d.ts.map +1 -1
  122. package/dist/lib/projects/scrapy/Spider.js.map +1 -1
  123. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +1 -1
  124. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +1 -1
  125. package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +1 -1
  126. package/dist/lib/projects/scrapy/wrapScrapyProject.js +6 -3
  127. package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +1 -1
  128. package/dist/lib/projects/shared.js.map +1 -1
  129. package/dist/lib/secrets.d.ts +1 -1
  130. package/dist/lib/secrets.d.ts.map +1 -1
  131. package/dist/lib/secrets.js +7 -3
  132. package/dist/lib/secrets.js.map +1 -1
  133. package/dist/lib/telemetry.d.ts +1 -1
  134. package/dist/lib/telemetry.d.ts.map +1 -1
  135. package/dist/lib/telemetry.js +8 -7
  136. package/dist/lib/telemetry.js.map +1 -1
  137. package/dist/lib/types.d.ts.map +1 -1
  138. package/dist/lib/utils.d.ts +5 -4
  139. package/dist/lib/utils.d.ts.map +1 -1
  140. package/dist/lib/utils.js +31 -32
  141. package/dist/lib/utils.js.map +1 -1
  142. package/dist/lib/version_check.d.ts.map +1 -1
  143. package/dist/lib/version_check.js +9 -6
  144. package/dist/lib/version_check.js.map +1 -1
  145. package/dist/typechecking.tsbuildinfo +1 -0
  146. package/oclif.manifest.json +3 -3
  147. package/package.json +13 -4
package/README.md CHANGED
@@ -309,7 +309,7 @@ DESCRIPTION
309
309
  Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
310
310
  ```
311
311
 
312
- _See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/actor/index.ts)_
312
+ _See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/actor/index.ts)_
313
313
 
314
314
  ## `apify actor get-input`
315
315
 
@@ -323,7 +323,7 @@ DESCRIPTION
323
323
  Gets the Actor input value from the default key-value store associated with the Actor run.
324
324
  ```
325
325
 
326
- _See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/actor/get-input.ts)_
326
+ _See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/actor/get-input.ts)_
327
327
 
328
328
  ## `apify actor get-value KEY`
329
329
 
@@ -340,7 +340,7 @@ DESCRIPTION
340
340
  Gets a value from the default key-value store associated with the Actor run.
341
341
  ```
342
342
 
343
- _See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/actor/get-value.ts)_
343
+ _See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/actor/get-value.ts)_
344
344
 
345
345
  ## `apify actor push-data [ITEM]`
346
346
 
@@ -362,7 +362,7 @@ DESCRIPTION
362
362
  $ cat ./test.json | apify actor push-data
363
363
  ```
364
364
 
365
- _See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/actor/push-data.ts)_
365
+ _See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/actor/push-data.ts)_
366
366
 
367
367
  ## `apify actor set-value KEY [VALUE]`
368
368
 
@@ -391,7 +391,7 @@ DESCRIPTION
391
391
  $ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain
392
392
  ```
393
393
 
394
- _See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/actor/set-value.ts)_
394
+ _See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/actor/set-value.ts)_
395
395
 
396
396
  ## `apify call [ACTORID]`
397
397
 
@@ -421,7 +421,7 @@ DESCRIPTION
421
421
  takes input for the Actor from the default local key-value store by default.
422
422
  ```
423
423
 
424
- _See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/call.ts)_
424
+ _See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/call.ts)_
425
425
 
426
426
  ## `apify create [ACTORNAME]`
427
427
 
@@ -446,7 +446,7 @@ DESCRIPTION
446
446
  Creates a new Actor project directory from a selected boilerplate template.
447
447
  ```
448
448
 
449
- _See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/create.ts)_
449
+ _See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/create.ts)_
450
450
 
451
451
  ## `apify help [COMMAND]`
452
452
 
@@ -466,7 +466,7 @@ DESCRIPTION
466
466
  Display help for apify.
467
467
  ```
468
468
 
469
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.3/src/commands/help.ts)_
469
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.4/src/commands/help.ts)_
470
470
 
471
471
  ## `apify info`
472
472
 
@@ -481,7 +481,7 @@ DESCRIPTION
481
481
  The information is printed to the console.
482
482
  ```
483
483
 
484
- _See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/info.ts)_
484
+ _See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/info.ts)_
485
485
 
486
486
  ## `apify init [ACTORNAME]`
487
487
 
@@ -509,7 +509,7 @@ DESCRIPTION
509
509
  WARNING: The directory at "storage" will be overwritten if it already exists.
510
510
  ```
511
511
 
512
- _See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/init.ts)_
512
+ _See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/init.ts)_
513
513
 
514
514
  ## `apify login`
515
515
 
@@ -530,7 +530,7 @@ DESCRIPTION
530
530
  "apify" commands. To log out, call "apify logout".
531
531
  ```
532
532
 
533
- _See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/login.ts)_
533
+ _See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/login.ts)_
534
534
 
535
535
  ## `apify logout`
536
536
 
@@ -546,7 +546,7 @@ DESCRIPTION
546
546
  call "apify login".
547
547
  ```
548
548
 
549
- _See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/logout.ts)_
549
+ _See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/logout.ts)_
550
550
 
551
551
  ## `apify pull [ACTORID]`
552
552
 
@@ -568,7 +568,7 @@ DESCRIPTION
568
568
  cloned. If it is defined as Web IDE, it will fetch the files.
569
569
  ```
570
570
 
571
- _See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/pull.ts)_
571
+ _See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/pull.ts)_
572
572
 
573
573
  ## `apify push [ACTORID]`
574
574
 
@@ -606,7 +606,7 @@ DESCRIPTION
606
606
  overwritten with --force flag.
607
607
  ```
608
608
 
609
- _See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/push.ts)_
609
+ _See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/push.ts)_
610
610
 
611
611
  ## `apify run`
612
612
 
@@ -618,8 +618,7 @@ USAGE
618
618
  <value> | --input-file <value>]
619
619
 
620
620
  FLAGS
621
- -i, --input=<value> Optional JSON input to be given to the Actor. You can either provide the JSON string as a
622
- value to this, or `-` to read from standard input.
621
+ -i, --input=<value> Optional JSON input to be given to the Actor.
623
622
  -p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
624
623
  options.
625
624
  --entrypoint=<value> Optional entrypoint for running with injected environment variables.
@@ -627,7 +626,7 @@ FLAGS
627
626
  For node.js, it is the npm script name, or a path to a JS/MJS file. You can also pass in
628
627
  a directory name, provided that directory contains an "index.js" file.
629
628
  --input-file=<value> Optional path to a file with JSON input to be given to the Actor. The file must be a
630
- valid JSON file.
629
+ valid JSON file. You can also specify `-` to read from standard input.
631
630
  --purge-dataset Deletes the local directory containing the default dataset before the run starts.
632
631
  --purge-key-value-store Deletes all records from the default key-value store in the local directory before the
633
632
  run starts, except for the "INPUT" key.
@@ -643,7 +642,7 @@ DESCRIPTION
643
642
  package.json file. You can set up your own main file or environment variables by changing it.
644
643
  ```
645
644
 
646
- _See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/run.ts)_
645
+ _See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/run.ts)_
647
646
 
648
647
  ## `apify secrets`
649
648
 
@@ -673,7 +672,7 @@ DESCRIPTION
673
672
  of the Actor.
674
673
  ```
675
674
 
676
- _See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/secrets/index.ts)_
675
+ _See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/secrets/index.ts)_
677
676
 
678
677
  ## `apify secrets add NAME VALUE`
679
678
 
@@ -692,7 +691,7 @@ DESCRIPTION
692
691
  The secrets are stored to a file at ~/.apify
693
692
  ```
694
693
 
695
- _See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/secrets/add.ts)_
694
+ _See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/secrets/add.ts)_
696
695
 
697
696
  ## `apify secrets rm NAME`
698
697
 
@@ -709,7 +708,7 @@ DESCRIPTION
709
708
  Removes the secret.
710
709
  ```
711
710
 
712
- _See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/secrets/rm.ts)_
711
+ _See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/secrets/rm.ts)_
713
712
 
714
713
  ## `apify task`
715
714
 
@@ -723,7 +722,7 @@ DESCRIPTION
723
722
  Commands are designed to be used to interact with Tasks.
724
723
  ```
725
724
 
726
- _See code: [src/commands/task/index.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/task/index.ts)_
725
+ _See code: [src/commands/task/index.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/task/index.ts)_
727
726
 
728
727
  ## `apify task run TASKID`
729
728
 
@@ -748,7 +747,7 @@ DESCRIPTION
748
747
  takes input for the Actor from the default local key-value store by default.
749
748
  ```
750
749
 
751
- _See code: [src/commands/task/run.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/task/run.ts)_
750
+ _See code: [src/commands/task/run.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/task/run.ts)_
752
751
 
753
752
  ## `apify validate-schema [PATH]`
754
753
 
@@ -773,5 +772,5 @@ DESCRIPTION
773
772
  You can also pass any custom path to your input schema to have it validated instead.
774
773
  ```
775
774
 
776
- _See code: [src/commands/validate-schema.ts](https://github.com/apify/apify-cli/blob/v0.20.0/src/commands/validate-schema.ts)_
775
+ _See code: [src/commands/validate-schema.ts](https://github.com/apify/apify-cli/blob/v0.20.1/src/commands/validate-schema.ts)_
777
776
  <!-- commandsstop -->
package/bin/dev.js CHANGED
@@ -5,17 +5,19 @@ import { SUPPORTED_NODEJS_VERSION } from '../src/lib/consts.ts';
5
5
  import { error } from '../src/lib/outputs.ts';
6
6
 
7
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);
8
+ error({
9
+ message: `Apify CLI requires Node.js version ${SUPPORTED_NODEJS_VERSION}. Your current version is ${process.version}.`,
10
+ });
11
+ process.exit(1);
10
12
  }
11
13
 
12
14
  try {
13
- await execute({ development: true, dir: import.meta.url });
15
+ await execute({ development: true, dir: import.meta.url });
14
16
  } catch (err) {
15
- const exitCode = (err.oclif && err.oclif.exit !== undefined) ? err.oclif.exit : 1;
16
- if (exitCode !== 0) {
17
- error(err.message);
18
- if (process.env.DEBUG) console.error(err);
19
- process.exit(exitCode);
20
- }
17
+ const exitCode = err.oclif && err.oclif.exit !== undefined ? err.oclif.exit : 1;
18
+ if (exitCode !== 0) {
19
+ error(err.message);
20
+ if (process.env.DEBUG) console.error(err);
21
+ process.exit(exitCode);
22
+ }
21
23
  }
package/bin/run.js CHANGED
@@ -7,17 +7,19 @@ import { SUPPORTED_NODEJS_VERSION } from '../dist/lib/consts.js';
7
7
  import { error } from '../dist/lib/outputs.js';
8
8
 
9
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);
10
+ error({
11
+ message: `Apify CLI requires Node.js version ${SUPPORTED_NODEJS_VERSION}. Your current version is ${process.version}.`,
12
+ });
13
+ process.exit(1);
12
14
  }
13
15
 
14
16
  try {
15
- await execute({ development: false, dir: import.meta.url });
17
+ await execute({ development: false, dir: import.meta.url });
16
18
  } catch (err) {
17
- const exitCode = (err.oclif && err.oclif.exit !== undefined) ? err.oclif.exit : 1;
18
- if (exitCode !== 0) {
19
- error(err.message);
20
- if (process.env.DEBUG) console.error(err);
21
- process.exit(exitCode);
22
- }
19
+ const exitCode = err.oclif && err.oclif.exit !== undefined ? err.oclif.exit : 1;
20
+ if (exitCode !== 0) {
21
+ error(err.message);
22
+ if (process.env.DEBUG) console.error(err);
23
+ process.exit(exitCode);
24
+ }
23
25
  }