apify-cli 0.16.2-beta.5 → 0.16.2-beta.7

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 CHANGED
@@ -282,6 +282,7 @@ This section contains printouts of `apify help` for all commands.
282
282
  * [`apify init [ACTORNAME]`](#apify-init-actorname)
283
283
  * [`apify login`](#apify-login)
284
284
  * [`apify logout`](#apify-logout)
285
+ * [`apify pull [ACTORID]`](#apify-pull-actorid)
285
286
  * [`apify push [ACTORID]`](#apify-push-actorid)
286
287
  * [`apify run`](#apify-run)
287
288
  * [`apify secrets`](#apify-secrets)
@@ -490,6 +491,24 @@ DESCRIPTION
490
491
 
491
492
  _See code: [src/commands/logout.js](https://github.com/apify/apify-cli/blob/v0.16.2/src/commands/logout.js)_
492
493
 
494
+ ## `apify pull [ACTORID]`
495
+
496
+ Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.
497
+
498
+ ```
499
+ USAGE
500
+ $ apify pull [ACTORID]
501
+
502
+ ARGUMENTS
503
+ ACTORID Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
504
+ command will update the Actor in the current directory based on its name in ".actor/actor.json" file.
505
+
506
+ OPTIONS
507
+ -v, --version=version Actor version number which will be pulled, e.g. 1.2. Default: the highest version
508
+ ```
509
+
510
+ _See code: [src/commands/pull.js](https://github.com/apify/apify-cli/blob/v0.16.2/src/commands/pull.js)_
511
+
493
512
  ## `apify push [ACTORID]`
494
513
 
495
514
  Uploads the actor to the Apify platform and builds it there.
@@ -499,11 +518,11 @@ USAGE
499
518
  $ apify push [ACTORID]
500
519
 
501
520
  ARGUMENTS
502
- ACTORID ID of an existing actor on the Apify platform where the files will be pushed. If not provided, the command
503
- will create or modify the actor with the name specified in ".actor/actor.json" file.
521
+ ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
522
+ command will create or modify the actor with the name specified in ".actor/actor.json" file.
504
523
 
505
524
  OPTIONS
506
- -b, --build-tag=build-tag Build tag to be applied to the successful actor build. By default, it is taken
525
+ -b, --build-tag=build-tag Build tag to be applied to the successful Actor build. By default, it is taken
507
526
  from the ".actor/actor.json" file
508
527
 
509
528
  -v, --version=version Actor version number to which the files should be pushed. By default, it is
@@ -520,7 +539,7 @@ DESCRIPTION
520
539
  NOTE: If the source files are smaller than 3 MB then they are uploaded as
521
540
  "Multiple source files", otherwise they are uploaded as "Zip file".
522
541
 
523
- WARNING: If the target actor already exists in your Apify account, it will be overwritten!
542
+ WARNING: If the target Actor already exists in your Apify account, it will be overwritten!
524
543
  ```
525
544
 
526
545
  _See code: [src/commands/push.js](https://github.com/apify/apify-cli/blob/v0.16.2/src/commands/push.js)_
@@ -36,12 +36,14 @@
36
36
  "is-ci": "^3.0.1",
37
37
  "is-online": "^10.0.0",
38
38
  "istextorbinary": "^6.0.0",
39
+ "jju": "^1.4.0",
39
40
  "load-json-file": "^6.2.0",
40
41
  "mime": "^2.6.0",
41
42
  "open": "^8.4.0",
42
43
  "ow": "^0.28.1",
43
44
  "rimraf": "^3.0.2",
44
45
  "semver": "^7.3.5",
46
+ "tiged": "^2.12.4",
45
47
  "underscore": "^1.13.2",
46
48
  "write-json-file": "^4.3.0"
47
49
  },
@@ -983,6 +985,17 @@
983
985
  "node": ">=6.0"
984
986
  }
985
987
  },
988
+ "node_modules/agent-base": {
989
+ "version": "6.0.2",
990
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
991
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
992
+ "dependencies": {
993
+ "debug": "4"
994
+ },
995
+ "engines": {
996
+ "node": ">= 6.0.0"
997
+ }
998
+ },
986
999
  "node_modules/agentkeepalive": {
987
1000
  "version": "4.2.1",
988
1001
  "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
@@ -2010,6 +2023,11 @@
2010
2023
  "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
2011
2024
  "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
2012
2025
  },
2026
+ "node_modules/colorette": {
2027
+ "version": "1.2.1",
2028
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
2029
+ "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw=="
2030
+ },
2013
2031
  "node_modules/compress-commons": {
2014
2032
  "version": "1.2.2",
2015
2033
  "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz",
@@ -2493,6 +2511,17 @@
2493
2511
  "once": "^1.4.0"
2494
2512
  }
2495
2513
  },
2514
+ "node_modules/enquirer": {
2515
+ "version": "2.3.6",
2516
+ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
2517
+ "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
2518
+ "dependencies": {
2519
+ "ansi-colors": "^4.1.1"
2520
+ },
2521
+ "engines": {
2522
+ "node": ">=8.6"
2523
+ }
2524
+ },
2496
2525
  "node_modules/entities": {
2497
2526
  "version": "4.4.0",
2498
2527
  "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
@@ -3656,6 +3685,28 @@
3656
3685
  "node": ">=14.14"
3657
3686
  }
3658
3687
  },
3688
+ "node_modules/fs-minipass": {
3689
+ "version": "2.1.0",
3690
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
3691
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
3692
+ "dependencies": {
3693
+ "minipass": "^3.0.0"
3694
+ },
3695
+ "engines": {
3696
+ "node": ">= 8"
3697
+ }
3698
+ },
3699
+ "node_modules/fs-minipass/node_modules/minipass": {
3700
+ "version": "3.3.6",
3701
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
3702
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
3703
+ "dependencies": {
3704
+ "yallist": "^4.0.0"
3705
+ },
3706
+ "engines": {
3707
+ "node": ">=8"
3708
+ }
3709
+ },
3659
3710
  "node_modules/fs.realpath": {
3660
3711
  "version": "1.0.0",
3661
3712
  "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -3707,6 +3758,11 @@
3707
3758
  "url": "https://github.com/sponsors/ljharb"
3708
3759
  }
3709
3760
  },
3761
+ "node_modules/fuzzysearch": {
3762
+ "version": "1.0.3",
3763
+ "resolved": "https://registry.npmjs.org/fuzzysearch/-/fuzzysearch-1.0.3.tgz",
3764
+ "integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg=="
3765
+ },
3710
3766
  "node_modules/generative-bayesian-network": {
3711
3767
  "version": "2.1.8",
3712
3768
  "resolved": "https://registry.npmjs.org/generative-bayesian-network/-/generative-bayesian-network-2.1.8.tgz",
@@ -3861,6 +3917,11 @@
3861
3917
  "url": "https://github.com/sponsors/ljharb"
3862
3918
  }
3863
3919
  },
3920
+ "node_modules/globalyzer": {
3921
+ "version": "0.1.0",
3922
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
3923
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
3924
+ },
3864
3925
  "node_modules/globby": {
3865
3926
  "version": "11.1.0",
3866
3927
  "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
@@ -3880,6 +3941,11 @@
3880
3941
  "url": "https://github.com/sponsors/sindresorhus"
3881
3942
  }
3882
3943
  },
3944
+ "node_modules/globrex": {
3945
+ "version": "0.1.2",
3946
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
3947
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
3948
+ },
3883
3949
  "node_modules/gopd": {
3884
3950
  "version": "1.0.1",
3885
3951
  "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -4292,6 +4358,18 @@
4292
4358
  "node": ">=10.19.0"
4293
4359
  }
4294
4360
  },
4361
+ "node_modules/https-proxy-agent": {
4362
+ "version": "5.0.0",
4363
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
4364
+ "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
4365
+ "dependencies": {
4366
+ "agent-base": "6",
4367
+ "debug": "4"
4368
+ },
4369
+ "engines": {
4370
+ "node": ">= 6"
4371
+ }
4372
+ },
4295
4373
  "node_modules/humanize-ms": {
4296
4374
  "version": "1.2.1",
4297
4375
  "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
@@ -4922,6 +5000,11 @@
4922
5000
  "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
4923
5001
  "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ=="
4924
5002
  },
5003
+ "node_modules/jju": {
5004
+ "version": "1.4.0",
5005
+ "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
5006
+ "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA=="
5007
+ },
4925
5008
  "node_modules/js-sdsl": {
4926
5009
  "version": "4.3.0",
4927
5010
  "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
@@ -5327,6 +5410,37 @@
5327
5410
  "url": "https://github.com/sponsors/ljharb"
5328
5411
  }
5329
5412
  },
5413
+ "node_modules/minipass": {
5414
+ "version": "4.2.8",
5415
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
5416
+ "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",
5417
+ "engines": {
5418
+ "node": ">=8"
5419
+ }
5420
+ },
5421
+ "node_modules/minizlib": {
5422
+ "version": "2.1.2",
5423
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
5424
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
5425
+ "dependencies": {
5426
+ "minipass": "^3.0.0",
5427
+ "yallist": "^4.0.0"
5428
+ },
5429
+ "engines": {
5430
+ "node": ">= 8"
5431
+ }
5432
+ },
5433
+ "node_modules/minizlib/node_modules/minipass": {
5434
+ "version": "3.3.6",
5435
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
5436
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
5437
+ "dependencies": {
5438
+ "yallist": "^4.0.0"
5439
+ },
5440
+ "engines": {
5441
+ "node": ">=8"
5442
+ }
5443
+ },
5330
5444
  "node_modules/mkdirp-classic": {
5331
5445
  "version": "0.5.3",
5332
5446
  "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
@@ -5465,6 +5579,14 @@
5465
5579
  "integrity": "sha512-tukRdb9Beu27t6dN+XztSRHq9J0B/CoAOySGzHfn8UTfmqipA5yNT/sDUEyYdAV3Hpka6Wx6kOMxuObdOex60Q==",
5466
5580
  "dev": true
5467
5581
  },
5582
+ "node_modules/mri": {
5583
+ "version": "1.1.6",
5584
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz",
5585
+ "integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==",
5586
+ "engines": {
5587
+ "node": ">=4"
5588
+ }
5589
+ },
5468
5590
  "node_modules/ms": {
5469
5591
  "version": "2.1.2",
5470
5592
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -7332,6 +7454,22 @@
7332
7454
  "url": "https://github.com/sponsors/ljharb"
7333
7455
  }
7334
7456
  },
7457
+ "node_modules/tar": {
7458
+ "version": "6.1.13",
7459
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
7460
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
7461
+ "dependencies": {
7462
+ "chownr": "^2.0.0",
7463
+ "fs-minipass": "^2.0.0",
7464
+ "minipass": "^4.0.0",
7465
+ "minizlib": "^2.1.1",
7466
+ "mkdirp": "^1.0.3",
7467
+ "yallist": "^4.0.0"
7468
+ },
7469
+ "engines": {
7470
+ "node": ">=10"
7471
+ }
7472
+ },
7335
7473
  "node_modules/tar-fs": {
7336
7474
  "version": "2.1.1",
7337
7475
  "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
@@ -7402,6 +7540,25 @@
7402
7540
  "node": ">= 0.8.0"
7403
7541
  }
7404
7542
  },
7543
+ "node_modules/tar/node_modules/chownr": {
7544
+ "version": "2.0.0",
7545
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
7546
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
7547
+ "engines": {
7548
+ "node": ">=10"
7549
+ }
7550
+ },
7551
+ "node_modules/tar/node_modules/mkdirp": {
7552
+ "version": "1.0.4",
7553
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
7554
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
7555
+ "bin": {
7556
+ "mkdirp": "bin/cmd.js"
7557
+ },
7558
+ "engines": {
7559
+ "node": ">=10"
7560
+ }
7561
+ },
7405
7562
  "node_modules/text-table": {
7406
7563
  "version": "0.2.0",
7407
7564
  "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -7424,6 +7581,51 @@
7424
7581
  "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
7425
7582
  "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
7426
7583
  },
7584
+ "node_modules/tiged": {
7585
+ "version": "2.12.4",
7586
+ "resolved": "https://registry.npmjs.org/tiged/-/tiged-2.12.4.tgz",
7587
+ "integrity": "sha512-pRYCAS3zc8aInlIK1knLU57VhQ7W7vq0e/t1/3Cpjh73hOU4KHgjIm8GRnef2fzeU+c8vAJsKULXUxGaCsp7rw==",
7588
+ "dependencies": {
7589
+ "colorette": "1.2.1",
7590
+ "enquirer": "2.3.6",
7591
+ "fs-extra": "10.1.0",
7592
+ "fuzzysearch": "1.0.3",
7593
+ "https-proxy-agent": "5.0.0",
7594
+ "mri": "1.1.6",
7595
+ "rimraf": "3.0.2",
7596
+ "tar": "^6.1.11",
7597
+ "tiny-glob": "0.2.8"
7598
+ },
7599
+ "bin": {
7600
+ "degit": "bin.js",
7601
+ "tiged": "bin.js"
7602
+ },
7603
+ "engines": {
7604
+ "node": ">=8.0.0"
7605
+ }
7606
+ },
7607
+ "node_modules/tiged/node_modules/fs-extra": {
7608
+ "version": "10.1.0",
7609
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
7610
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
7611
+ "dependencies": {
7612
+ "graceful-fs": "^4.2.0",
7613
+ "jsonfile": "^6.0.1",
7614
+ "universalify": "^2.0.0"
7615
+ },
7616
+ "engines": {
7617
+ "node": ">=12"
7618
+ }
7619
+ },
7620
+ "node_modules/tiny-glob": {
7621
+ "version": "0.2.8",
7622
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.8.tgz",
7623
+ "integrity": "sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==",
7624
+ "dependencies": {
7625
+ "globalyzer": "0.1.0",
7626
+ "globrex": "^0.1.2"
7627
+ }
7628
+ },
7427
7629
  "node_modules/tmp": {
7428
7630
  "version": "0.0.33",
7429
7631
  "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -8685,6 +8887,14 @@
8685
8887
  "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
8686
8888
  "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ=="
8687
8889
  },
8890
+ "agent-base": {
8891
+ "version": "6.0.2",
8892
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
8893
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
8894
+ "requires": {
8895
+ "debug": "4"
8896
+ }
8897
+ },
8688
8898
  "agentkeepalive": {
8689
8899
  "version": "4.2.1",
8690
8900
  "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
@@ -9443,6 +9653,11 @@
9443
9653
  "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
9444
9654
  "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
9445
9655
  },
9656
+ "colorette": {
9657
+ "version": "1.2.1",
9658
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
9659
+ "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw=="
9660
+ },
9446
9661
  "compress-commons": {
9447
9662
  "version": "1.2.2",
9448
9663
  "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz",
@@ -9791,6 +10006,14 @@
9791
10006
  "once": "^1.4.0"
9792
10007
  }
9793
10008
  },
10009
+ "enquirer": {
10010
+ "version": "2.3.6",
10011
+ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
10012
+ "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
10013
+ "requires": {
10014
+ "ansi-colors": "^4.1.1"
10015
+ }
10016
+ },
9794
10017
  "entities": {
9795
10018
  "version": "4.4.0",
9796
10019
  "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
@@ -10704,6 +10927,24 @@
10704
10927
  "universalify": "^2.0.0"
10705
10928
  }
10706
10929
  },
10930
+ "fs-minipass": {
10931
+ "version": "2.1.0",
10932
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
10933
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
10934
+ "requires": {
10935
+ "minipass": "^3.0.0"
10936
+ },
10937
+ "dependencies": {
10938
+ "minipass": {
10939
+ "version": "3.3.6",
10940
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
10941
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
10942
+ "requires": {
10943
+ "yallist": "^4.0.0"
10944
+ }
10945
+ }
10946
+ }
10947
+ },
10707
10948
  "fs.realpath": {
10708
10949
  "version": "1.0.0",
10709
10950
  "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -10739,6 +10980,11 @@
10739
10980
  "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
10740
10981
  "dev": true
10741
10982
  },
10983
+ "fuzzysearch": {
10984
+ "version": "1.0.3",
10985
+ "resolved": "https://registry.npmjs.org/fuzzysearch/-/fuzzysearch-1.0.3.tgz",
10986
+ "integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg=="
10987
+ },
10742
10988
  "generative-bayesian-network": {
10743
10989
  "version": "2.1.8",
10744
10990
  "resolved": "https://registry.npmjs.org/generative-bayesian-network/-/generative-bayesian-network-2.1.8.tgz",
@@ -10844,6 +11090,11 @@
10844
11090
  "define-properties": "^1.1.3"
10845
11091
  }
10846
11092
  },
11093
+ "globalyzer": {
11094
+ "version": "0.1.0",
11095
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
11096
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
11097
+ },
10847
11098
  "globby": {
10848
11099
  "version": "11.1.0",
10849
11100
  "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
@@ -10857,6 +11108,11 @@
10857
11108
  "slash": "^3.0.0"
10858
11109
  }
10859
11110
  },
11111
+ "globrex": {
11112
+ "version": "0.1.2",
11113
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
11114
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
11115
+ },
10860
11116
  "gopd": {
10861
11117
  "version": "1.0.1",
10862
11118
  "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -11145,6 +11401,15 @@
11145
11401
  "resolve-alpn": "^1.2.0"
11146
11402
  }
11147
11403
  },
11404
+ "https-proxy-agent": {
11405
+ "version": "5.0.0",
11406
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
11407
+ "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
11408
+ "requires": {
11409
+ "agent-base": "6",
11410
+ "debug": "4"
11411
+ }
11412
+ },
11148
11413
  "humanize-ms": {
11149
11414
  "version": "1.2.1",
11150
11415
  "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
@@ -11571,6 +11836,11 @@
11571
11836
  }
11572
11837
  }
11573
11838
  },
11839
+ "jju": {
11840
+ "version": "1.4.0",
11841
+ "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
11842
+ "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA=="
11843
+ },
11574
11844
  "js-sdsl": {
11575
11845
  "version": "4.3.0",
11576
11846
  "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
@@ -11881,6 +12151,30 @@
11881
12151
  "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
11882
12152
  "dev": true
11883
12153
  },
12154
+ "minipass": {
12155
+ "version": "4.2.8",
12156
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
12157
+ "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="
12158
+ },
12159
+ "minizlib": {
12160
+ "version": "2.1.2",
12161
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
12162
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
12163
+ "requires": {
12164
+ "minipass": "^3.0.0",
12165
+ "yallist": "^4.0.0"
12166
+ },
12167
+ "dependencies": {
12168
+ "minipass": {
12169
+ "version": "3.3.6",
12170
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
12171
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
12172
+ "requires": {
12173
+ "yallist": "^4.0.0"
12174
+ }
12175
+ }
12176
+ }
12177
+ },
11884
12178
  "mkdirp-classic": {
11885
12179
  "version": "0.5.3",
11886
12180
  "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
@@ -11996,6 +12290,11 @@
11996
12290
  "integrity": "sha512-tukRdb9Beu27t6dN+XztSRHq9J0B/CoAOySGzHfn8UTfmqipA5yNT/sDUEyYdAV3Hpka6Wx6kOMxuObdOex60Q==",
11997
12291
  "dev": true
11998
12292
  },
12293
+ "mri": {
12294
+ "version": "1.1.6",
12295
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz",
12296
+ "integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ=="
12297
+ },
11999
12298
  "ms": {
12000
12299
  "version": "2.1.2",
12001
12300
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -13386,6 +13685,31 @@
13386
13685
  "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
13387
13686
  "dev": true
13388
13687
  },
13688
+ "tar": {
13689
+ "version": "6.1.13",
13690
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
13691
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
13692
+ "requires": {
13693
+ "chownr": "^2.0.0",
13694
+ "fs-minipass": "^2.0.0",
13695
+ "minipass": "^4.0.0",
13696
+ "minizlib": "^2.1.1",
13697
+ "mkdirp": "^1.0.3",
13698
+ "yallist": "^4.0.0"
13699
+ },
13700
+ "dependencies": {
13701
+ "chownr": {
13702
+ "version": "2.0.0",
13703
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
13704
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
13705
+ },
13706
+ "mkdirp": {
13707
+ "version": "1.0.4",
13708
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
13709
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
13710
+ }
13711
+ }
13712
+ },
13389
13713
  "tar-fs": {
13390
13714
  "version": "2.1.1",
13391
13715
  "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
@@ -13465,6 +13789,43 @@
13465
13789
  "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
13466
13790
  "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
13467
13791
  },
13792
+ "tiged": {
13793
+ "version": "2.12.4",
13794
+ "resolved": "https://registry.npmjs.org/tiged/-/tiged-2.12.4.tgz",
13795
+ "integrity": "sha512-pRYCAS3zc8aInlIK1knLU57VhQ7W7vq0e/t1/3Cpjh73hOU4KHgjIm8GRnef2fzeU+c8vAJsKULXUxGaCsp7rw==",
13796
+ "requires": {
13797
+ "colorette": "1.2.1",
13798
+ "enquirer": "2.3.6",
13799
+ "fs-extra": "10.1.0",
13800
+ "fuzzysearch": "1.0.3",
13801
+ "https-proxy-agent": "5.0.0",
13802
+ "mri": "1.1.6",
13803
+ "rimraf": "3.0.2",
13804
+ "tar": "^6.1.11",
13805
+ "tiny-glob": "0.2.8"
13806
+ },
13807
+ "dependencies": {
13808
+ "fs-extra": {
13809
+ "version": "10.1.0",
13810
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
13811
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
13812
+ "requires": {
13813
+ "graceful-fs": "^4.2.0",
13814
+ "jsonfile": "^6.0.1",
13815
+ "universalify": "^2.0.0"
13816
+ }
13817
+ }
13818
+ }
13819
+ },
13820
+ "tiny-glob": {
13821
+ "version": "0.2.8",
13822
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.8.tgz",
13823
+ "integrity": "sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==",
13824
+ "requires": {
13825
+ "globalyzer": "0.1.0",
13826
+ "globrex": "^0.1.2"
13827
+ }
13828
+ },
13468
13829
  "tmp": {
13469
13830
  "version": "0.0.33",
13470
13831
  "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -1 +1 @@
1
- {"version":"0.16.2","commands":{"call":{"id":"call","description":"Runs a specific actor remotely on the Apify cloud platform.\nThe actor is run under your current Apify account. Therefore you need to be logged in by calling \"apify login\". It takes input for the actor from the default local key-value store by default.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"build":{"name":"build","type":"option","char":"b","description":"Tag or number of the build to run (e.g. \"latest\" or \"1.2.34\").","required":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout for the actor run in seconds. Zero value means there is no timeout.","required":false},"memory":{"name":"memory","type":"option","char":"m","description":"Amount of memory allocated for the actor run, in megabytes.","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to run to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command runs the remote actor specified in the \".actor/actor.json\" file.","required":false}]},"check-version":{"id":"check-version","description":"Checks that installed Apify CLI version is up to date.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["cv"],"flags":{"enforce-update":{"name":"enforce-update","type":"boolean","char":"e","description":"[Optional] Enforce version update from NPM","required":false,"allowNo":false}},"args":[]},"create":{"id":"create","description":"Creates a new actor project directory from a selected boilerplate template.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","char":"t","description":"Template for the actor. If not provided, the command will prompt for it.\nVisit https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to find available template names.","required":false},"skip-dependency-install":{"name":"skip-dependency-install","type":"boolean","description":"Skip installing actor dependencies.","required":false,"allowNo":false},"template-archive-url":{"name":"template-archive-url","type":"option","description":"Actor template archive url. Useful for developing new templates.","hidden":true,"required":false}},"args":[{"name":"actorName","description":"Name of the actor and its directory","required":false}]},"edit-input-schema":{"id":"edit-input-schema","description":"Lets you edit your input schema that would be used on the platform in a visual input schema editor.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["eis"],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided default platform location for input schema is used.","required":false}]},"info":{"id":"info","description":"Displays information about the currently active Apify account.\nThe information is printed to the console.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"init":{"id":"init","description":"Initializes a new actor project in an existing directory.\nThe command only creates the \".actor/actor.json\" file and the \"storage\" directory in the current directory, but will not touch anything else.\n\nWARNING: The directory at \"storage\" will be overwritten if it already exists.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"actorName","description":"Name of the actor. If not provided, you will be prompted for it.","required":false}]},"login-new":{"id":"login-new","description":"Logs in to your Apify account using your API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"login":{"id":"login","description":"Logs in to your Apify account using a provided API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"logout":{"id":"logout","description":"Logs out of your Apify account.\nThe command deletes the API token and all other account information stored in the ~/.apify directory. To log in again, call \"apify login\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"push":{"id":"push","description":"Uploads the actor to the Apify platform and builds it there.\nThe actor settings are read from the \".actor/actor.json\" file in the current directory, but they can be overridden using command-line options.\nNOTE: If the source files are smaller than 3 MB then they are uploaded as \n\"Multiple source files\", otherwise they are uploaded as \"Zip file\".\n\nWARNING: If the target actor already exists in your Apify account, it will be overwritten!","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version-number":{"name":"version-number","type":"option","description":"DEPRECATED: Use flag version instead. Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"version":{"name":"version","type":"option","char":"v","description":"Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"build-tag":{"name":"build-tag","type":"option","char":"b","description":"Build tag to be applied to the successful actor build. By default, it is taken from the \".actor/actor.json\" file","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to build to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actorId","description":"ID of an existing actor on the Apify platform where the files will be pushed. If not provided, the command will create or modify the actor with the name specified in \".actor/actor.json\" file.","required":false}]},"run":{"id":"run","description":"Runs the actor locally in the current directory.\nIt sets various APIFY_XYZ environment variables in order to provide a working execution environment for the actor. For example, this causes the actor input, as well as all other data in key-value stores, datasets or request queues to be stored in the \"storage\" directory, rather than on the Apify platform.\n\nNOTE: You can override the command's default behavior for Node.js actors by overriding the \"start\" script in the package.json file. You can set up your own main file or environment variables by changing it.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"purge":{"name":"purge","type":"boolean","char":"p","description":"Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store options.","required":false,"allowNo":false},"purge-queue":{"name":"purge-queue","type":"boolean","description":"Deletes the local directory containing the default request queue before the run starts.","required":false,"allowNo":false},"purge-dataset":{"name":"purge-dataset","type":"boolean","description":"Deletes the local directory containing the default dataset before the run starts.","required":false,"allowNo":false},"purge-key-value-store":{"name":"purge-key-value-store","type":"boolean","description":"Deletes all records from the default key-value store in the local directory before the run starts, except for the \"INPUT\" key.","required":false,"allowNo":false}},"args":[]},"vis":{"id":"vis","description":"Validates input schema and prints errors found.\nThe input schema for the actor is used from these locations in order of preference.\nThe first one found is validated as it would be the one used on the Apify platform.\n1. Directly embedded object in \".actor/actor.json\" under 'input' key\n2. Path to JSON file referenced in \".actor/actor.json\" under 'input' key\n3. JSON file at .actor/INPUT_SCHEMA.json\n4. JSON file at INPUT_SCHEMA.json\n\nYou can also pass any custom path to your input schema to have it validated instead.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.","required":false}]},"actor:get-input":{"id":"actor:get-input","description":"Gets the actor input value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:get-value":{"id":"actor:get-value","description":"Gets a value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"key","description":"Key of the record in key-value store","required":true}]},"actor":{"id":"actor","description":"Commands are designed to be used in actor runs. All commands are in PoC state, do not use in production environments.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:push-data":{"id":"actor:push-data","description":"Stores an object or an array of objects to the default dataset of the actor run.\nIt is possible to pass data using item argument or stdin.\nPassing data using argument:\n$ apify actor:push-data {\"foo\": \"bar\"}\nPassing data using stdin with pipe:\n$ cat ./test.json | apify actor:push-data\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"item","description":"JSON string with one object or array of objects containing data to be stored in the default dataset.","required":false}]},"actor:set-value":{"id":"actor:set-value","description":"Sets or removes record into the default KeyValueStore associated with the actor run.\nIt is possible to pass data using argument or stdin.\nPassing data using argument:\n$ apify actor:set-value KEY my-value\nPassing data using stdin with pipe:\n$ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"contentType":{"name":"contentType","type":"option","char":"c","description":"Specifies a custom MIME content type of the record. By default \"application/json\" is used.","required":false}},"args":[{"name":"key","description":"Key of the record in key-value store.","required":true},{"name":"value","description":"Record data, which can be one of the following values:\n- If empty, the record in the key-value store is deleted.\n- If no `contentType` flag is specified, value is expected to be any JSON string value.\n- If options.contentType is set, value is taken as is.","required":false}]},"secrets:add":{"id":"secrets:add","description":"Adds a new secret value.\nThe secrets are stored to a file at ~/.apify","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true},{"name":"value","description":"Value of the secret","required":true}]},"secrets":{"id":"secrets","description":"Manages secret values for actor environment variables.\n\nExample:\n$ apify secrets:add mySecret TopSecretValue123\n\nNow the \"mySecret\" value can be used in an environment variable defined in \".actor/actor.json\" file by adding the \"@\" prefix:\n\n{\n \"actorSpecification\": 1,\n \"name\": \"my_actor\",\n \"environmentVariables\": { \"SECRET_ENV_VAR\": \"@mySecret\" },\n \"version\": \"0.1\n}\n\nWhen the actor is pushed to Apify cloud, the \"SECRET_ENV_VAR\" and its value is stored as a secret environment variable of the actor.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"secrets:rm":{"id":"secrets:rm","description":"Removes the secret.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true}]}}}
1
+ {"version":"0.16.2","commands":{"call":{"id":"call","description":"Runs a specific actor remotely on the Apify cloud platform.\nThe actor is run under your current Apify account. Therefore you need to be logged in by calling \"apify login\". It takes input for the actor from the default local key-value store by default.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"build":{"name":"build","type":"option","char":"b","description":"Tag or number of the build to run (e.g. \"latest\" or \"1.2.34\").","required":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout for the actor run in seconds. Zero value means there is no timeout.","required":false},"memory":{"name":"memory","type":"option","char":"m","description":"Amount of memory allocated for the actor run, in megabytes.","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to run to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command runs the remote actor specified in the \".actor/actor.json\" file.","required":false}]},"check-version":{"id":"check-version","description":"Checks that installed Apify CLI version is up to date.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["cv"],"flags":{"enforce-update":{"name":"enforce-update","type":"boolean","char":"e","description":"[Optional] Enforce version update from NPM","required":false,"allowNo":false}},"args":[]},"create":{"id":"create","description":"Creates a new actor project directory from a selected boilerplate template.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","char":"t","description":"Template for the actor. If not provided, the command will prompt for it.\nVisit https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to find available template names.","required":false},"skip-dependency-install":{"name":"skip-dependency-install","type":"boolean","description":"Skip installing actor dependencies.","required":false,"allowNo":false},"template-archive-url":{"name":"template-archive-url","type":"option","description":"Actor template archive url. Useful for developing new templates.","hidden":true,"required":false}},"args":[{"name":"actorName","description":"Name of the actor and its directory","required":false}]},"edit-input-schema":{"id":"edit-input-schema","description":"Lets you edit your input schema that would be used on the platform in a visual input schema editor.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["eis"],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided default platform location for input schema is used.","required":false}]},"info":{"id":"info","description":"Displays information about the currently active Apify account.\nThe information is printed to the console.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"init":{"id":"init","description":"Initializes a new actor project in an existing directory.\nThe command only creates the \".actor/actor.json\" file and the \"storage\" directory in the current directory, but will not touch anything else.\n\nWARNING: The directory at \"storage\" will be overwritten if it already exists.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"actorName","description":"Name of the actor. If not provided, you will be prompted for it.","required":false}]},"login-new":{"id":"login-new","description":"Logs in to your Apify account using your API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"login":{"id":"login","description":"Logs in to your Apify account using a provided API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"logout":{"id":"logout","description":"Logs out of your Apify account.\nThe command deletes the API token and all other account information stored in the ~/.apify directory. To log in again, call \"apify login\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"pull":{"id":"pull","description":"Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version":{"name":"version","type":"option","char":"v","description":"Actor version number which will be pulled, e.g. 1.2. Default: the highest version","required":false}},"args":[{"name":"actorId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will update the Actor in the current directory based on its name in \".actor/actor.json\" file.","required":false}]},"push":{"id":"push","description":"Uploads the actor to the Apify platform and builds it there.\nThe actor settings are read from the \".actor/actor.json\" file in the current directory, but they can be overridden using command-line options.\nNOTE: If the source files are smaller than 3 MB then they are uploaded as \n\"Multiple source files\", otherwise they are uploaded as \"Zip file\".\n\nWARNING: If the target Actor already exists in your Apify account, it will be overwritten!","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version-number":{"name":"version-number","type":"option","description":"DEPRECATED: Use flag version instead. Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"version":{"name":"version","type":"option","char":"v","description":"Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"build-tag":{"name":"build-tag","type":"option","char":"b","description":"Build tag to be applied to the successful Actor build. By default, it is taken from the \".actor/actor.json\" file","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to build to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actorId","description":"Name or ID of the Actor to push (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will create or modify the actor with the name specified in \".actor/actor.json\" file.","required":false}]},"run":{"id":"run","description":"Runs the actor locally in the current directory.\nIt sets various APIFY_XYZ environment variables in order to provide a working execution environment for the actor. For example, this causes the actor input, as well as all other data in key-value stores, datasets or request queues to be stored in the \"storage\" directory, rather than on the Apify platform.\n\nNOTE: You can override the command's default behavior for Node.js actors by overriding the \"start\" script in the package.json file. You can set up your own main file or environment variables by changing it.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"purge":{"name":"purge","type":"boolean","char":"p","description":"Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store options.","required":false,"allowNo":false},"purge-queue":{"name":"purge-queue","type":"boolean","description":"Deletes the local directory containing the default request queue before the run starts.","required":false,"allowNo":false},"purge-dataset":{"name":"purge-dataset","type":"boolean","description":"Deletes the local directory containing the default dataset before the run starts.","required":false,"allowNo":false},"purge-key-value-store":{"name":"purge-key-value-store","type":"boolean","description":"Deletes all records from the default key-value store in the local directory before the run starts, except for the \"INPUT\" key.","required":false,"allowNo":false}},"args":[]},"vis":{"id":"vis","description":"Validates input schema and prints errors found.\nThe input schema for the actor is used from these locations in order of preference.\nThe first one found is validated as it would be the one used on the Apify platform.\n1. Directly embedded object in \".actor/actor.json\" under 'input' key\n2. Path to JSON file referenced in \".actor/actor.json\" under 'input' key\n3. JSON file at .actor/INPUT_SCHEMA.json\n4. JSON file at INPUT_SCHEMA.json\n\nYou can also pass any custom path to your input schema to have it validated instead.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.","required":false}]},"actor:get-input":{"id":"actor:get-input","description":"Gets the actor input value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:get-value":{"id":"actor:get-value","description":"Gets a value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"key","description":"Key of the record in key-value store","required":true}]},"actor":{"id":"actor","description":"Commands are designed to be used in actor runs. All commands are in PoC state, do not use in production environments.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:push-data":{"id":"actor:push-data","description":"Stores an object or an array of objects to the default dataset of the actor run.\nIt is possible to pass data using item argument or stdin.\nPassing data using argument:\n$ apify actor:push-data {\"foo\": \"bar\"}\nPassing data using stdin with pipe:\n$ cat ./test.json | apify actor:push-data\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"item","description":"JSON string with one object or array of objects containing data to be stored in the default dataset.","required":false}]},"actor:set-value":{"id":"actor:set-value","description":"Sets or removes record into the default KeyValueStore associated with the actor run.\nIt is possible to pass data using argument or stdin.\nPassing data using argument:\n$ apify actor:set-value KEY my-value\nPassing data using stdin with pipe:\n$ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"contentType":{"name":"contentType","type":"option","char":"c","description":"Specifies a custom MIME content type of the record. By default \"application/json\" is used.","required":false}},"args":[{"name":"key","description":"Key of the record in key-value store.","required":true},{"name":"value","description":"Record data, which can be one of the following values:\n- If empty, the record in the key-value store is deleted.\n- If no `contentType` flag is specified, value is expected to be any JSON string value.\n- If options.contentType is set, value is taken as is.","required":false}]},"secrets:add":{"id":"secrets:add","description":"Adds a new secret value.\nThe secrets are stored to a file at ~/.apify","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true},{"name":"value","description":"Value of the secret","required":true}]},"secrets":{"id":"secrets","description":"Manages secret values for actor environment variables.\n\nExample:\n$ apify secrets:add mySecret TopSecretValue123\n\nNow the \"mySecret\" value can be used in an environment variable defined in \".actor/actor.json\" file by adding the \"@\" prefix:\n\n{\n \"actorSpecification\": 1,\n \"name\": \"my_actor\",\n \"environmentVariables\": { \"SECRET_ENV_VAR\": \"@mySecret\" },\n \"version\": \"0.1\n}\n\nWhen the actor is pushed to Apify cloud, the \"SECRET_ENV_VAR\" and its value is stored as a secret environment variable of the actor.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"secrets:rm":{"id":"secrets:rm","description":"Removes the secret.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true}]}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-cli",
3
- "version": "0.16.2-beta.5",
3
+ "version": "0.16.2-beta.7",
4
4
  "description": "Apify command-line interface helps you create, develop, build and run Apify actors, and manage the Apify cloud platform.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -79,12 +79,14 @@
79
79
  "is-ci": "^3.0.1",
80
80
  "is-online": "^10.0.0",
81
81
  "istextorbinary": "^6.0.0",
82
+ "jju": "^1.4.0",
82
83
  "load-json-file": "^6.2.0",
83
84
  "mime": "^2.6.0",
84
85
  "open": "^8.4.0",
85
86
  "ow": "^0.28.1",
86
87
  "rimraf": "^3.0.2",
87
88
  "semver": "^7.3.5",
89
+ "tiged": "^2.12.4",
88
90
  "underscore": "^1.13.2",
89
91
  "write-json-file": "^4.3.0"
90
92
  },
@@ -0,0 +1,152 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const tiged = require('tiged');
4
+ const AdmZip = require('adm-zip');
5
+ const semverGt = require('semver/functions/gt');
6
+ const { get } = require('axios');
7
+ const { flags: flagsHelper } = require('@oclif/command');
8
+ const jju = require('jju');
9
+ const { ApifyCommand } = require('../lib/apify_command');
10
+ const { success, error } = require('../lib/outputs');
11
+ const { getLoggedClientOrThrow, getLocalConfigOrThrow, getLocalUserInfo } = require('../lib/utils');
12
+ const { LOCAL_CONFIG_PATH } = require('../lib/consts');
13
+
14
+ const extractGitHubZip = async (url, directoryPath) => {
15
+ const { data } = await get(url, { responseType: 'arraybuffer' });
16
+
17
+ const zipFile = new AdmZip(Buffer.from(data, 'binary'));
18
+
19
+ zipFile.extractEntryTo(zipFile.getEntries()[0].entryName, directoryPath, false);
20
+ };
21
+
22
+ class PullCommand extends ApifyCommand {
23
+ async run() {
24
+ const { args, flags } = this.parse(PullCommand);
25
+ const localConfig = await getLocalConfigOrThrow();
26
+ const userInfo = await getLocalUserInfo();
27
+ const apifyClient = await getLoggedClientOrThrow();
28
+ const cwd = process.cwd();
29
+
30
+ const isActorAutomaticallyDetected = !args?.actorId;
31
+ const usernameOrId = userInfo.username || userInfo.id;
32
+
33
+ const actorId = args?.actorId || localConfig?.id || (localConfig.name ? `${usernameOrId}/${localConfig.name}` : undefined);
34
+
35
+ if (!actorId) throw new Error('Cannot find Actor in this directory.');
36
+
37
+ let actor;
38
+ try {
39
+ actor = await apifyClient.actor(actorId).get();
40
+ } catch {
41
+ throw new Error(`Cannot find Actor with ID/name '${actorId}' in your account.`);
42
+ }
43
+
44
+ if (!actor) throw new Error(`Cannot find Actor with ID/name '${actorId}' in your account.`);
45
+
46
+ const { name, versions } = actor;
47
+
48
+ let correctVersion = null;
49
+ if (flags?.version) {
50
+ correctVersion = versions.find((version) => version.versionNumber === flags?.version);
51
+ if (!correctVersion) {
52
+ throw new Error(`Cannot find version ${flags?.version} of Actor ${actorId}.`);
53
+ }
54
+ }
55
+
56
+ if (!correctVersion) {
57
+ correctVersion = versions.reduce((match, curr) => {
58
+ if (semverGt(`${curr.versionNumber}.0`, `${match.versionNumber}.0`)) return curr;
59
+ return match;
60
+ });
61
+ }
62
+
63
+ const dirpath = isActorAutomaticallyDetected ? cwd : path.join(cwd, name);
64
+ fs.mkdirSync(dirpath, { recursive: true });
65
+
66
+ if (!isActorAutomaticallyDetected && !(fs.readdirSync(dirpath).length === 0)) {
67
+ error(`Directory ${dirpath} is not empty. Please empty it or choose another directory.`);
68
+ return;
69
+ }
70
+
71
+ switch (correctVersion.sourceType) {
72
+ case 'TARBALL': {
73
+ await extractGitHubZip(correctVersion.tarballUrl, dirpath);
74
+
75
+ break;
76
+ }
77
+ case 'SOURCE_FILES': {
78
+ const { sourceFiles } = correctVersion;
79
+ for (const file of sourceFiles) {
80
+ const folderPath = file.folder ? file.folder : path.dirname(file.name);
81
+ fs.mkdirSync(`${dirpath}/${folderPath}`, { recursive: true }, null);
82
+
83
+ if (!file.folder) {
84
+ const fileContent = file.format === 'BASE64' ? Buffer.from(file.content, 'base64') : file.content;
85
+
86
+ if (file.name === LOCAL_CONFIG_PATH) {
87
+ const actorJson = jju.parse(fileContent);
88
+ actorJson.name = actor.name;
89
+ fs.writeFileSync(`${dirpath}/${file.name}`, jju.update(fileContent, actorJson));
90
+ } else {
91
+ fs.writeFileSync(`${dirpath}/${file.name}`, fileContent);
92
+ }
93
+ }
94
+ }
95
+
96
+ break;
97
+ }
98
+ case 'GIT_REPO': {
99
+ // e.g. https://github.com/jakubbalada/Datasety.git#master:RejstrikPolitickychStran
100
+ const { gitRepoUrl } = correctVersion;
101
+ const [repoUrl, branchDirPart] = gitRepoUrl.split('#');
102
+
103
+ let branch;
104
+ let dir;
105
+ if (branchDirPart) [branch, dir] = branchDirPart.split(':');
106
+ let branchDirRepoUrl = repoUrl;
107
+ if (dir) branchDirRepoUrl += `/${dir}`;
108
+ if (branch) branchDirRepoUrl += `#${branch}`;
109
+
110
+ const emitter = tiged(branchDirRepoUrl);
111
+ try {
112
+ await emitter.clone(dirpath);
113
+ } catch (err) {
114
+ throw new Error(`Failed to pull Actor from ${gitRepoUrl}. ${err.message}`);
115
+ }
116
+
117
+ break;
118
+ }
119
+ case 'GITHUB_GIST': {
120
+ await extractGitHubZip(`${correctVersion.gitHubGistUrl}/archive/master.zip`, dirpath);
121
+
122
+ break;
123
+ }
124
+ default:
125
+ throw new Error(`Unknown source type: ${correctVersion.sourceType}`);
126
+ }
127
+
128
+ success(isActorAutomaticallyDetected ? `Actor ${name} updated at ${dirpath}/` : `Pulled to ${dirpath}/`);
129
+ }
130
+ }
131
+
132
+ PullCommand.description = 'Pulls an Actor from the Apify platform to the current directory. '
133
+ + 'If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.';
134
+
135
+ PullCommand.flags = {
136
+ version: flagsHelper.string({
137
+ char: 'v',
138
+ description: 'Actor version number which will be pulled, e.g. 1.2. Default: the highest version',
139
+ required: false,
140
+ }),
141
+ };
142
+
143
+ PullCommand.args = [
144
+ {
145
+ name: 'actorId',
146
+ required: false,
147
+ description: 'Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). '
148
+ + 'If not provided, the command will update the Actor in the current directory based on its name in ".actor/actor.json" file.',
149
+ },
150
+ ];
151
+
152
+ module.exports = PullCommand;
@@ -190,7 +190,7 @@ PushCommand.description = 'Uploads the actor to the Apify platform and builds it
190
190
  + `The actor settings are read from the "${LOCAL_CONFIG_PATH}" file in the current directory, but they can be overridden using command-line options.\n`
191
191
  + `NOTE: If the source files are smaller than ${MAX_MULTIFILE_BYTES / (1024 ** 2)} MB then they are uploaded as \n`
192
192
  + '"Multiple source files", otherwise they are uploaded as "Zip file".\n\n'
193
- + 'WARNING: If the target actor already exists in your Apify account, it will be overwritten!';
193
+ + 'WARNING: If the target Actor already exists in your Apify account, it will be overwritten!';
194
194
 
195
195
  PushCommand.flags = {
196
196
  'version-number': flagsHelper.string({
@@ -205,7 +205,7 @@ PushCommand.flags = {
205
205
  }),
206
206
  'build-tag': flagsHelper.string({
207
207
  char: 'b',
208
- description: `Build tag to be applied to the successful actor build. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file`,
208
+ description: `Build tag to be applied to the successful Actor build. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file`,
209
209
  required: false,
210
210
  }),
211
211
  'wait-for-finish': flagsHelper.string({
@@ -224,7 +224,7 @@ PushCommand.args = [
224
224
  {
225
225
  name: 'actorId',
226
226
  required: false,
227
- description: 'ID of an existing actor on the Apify platform where the files will be pushed. '
227
+ description: 'Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). '
228
228
  + `If not provided, the command will create or modify the actor with the name specified in "${LOCAL_CONFIG_PATH}" file.`,
229
229
  },
230
230
  ];