apify-cli 0.15.1 → 0.16.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -298,7 +298,7 @@ USAGE
298
298
  $ apify actor
299
299
  ```
300
300
 
301
- _See code: [src/commands/actor/index.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/actor/index.js)_
301
+ _See code: [src/commands/actor/index.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/actor/index.js)_
302
302
 
303
303
  ## `apify actor:get-input`
304
304
 
@@ -309,7 +309,7 @@ USAGE
309
309
  $ apify actor:get-input
310
310
  ```
311
311
 
312
- _See code: [src/commands/actor/get-input.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/actor/get-input.js)_
312
+ _See code: [src/commands/actor/get-input.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/actor/get-input.js)_
313
313
 
314
314
  ## `apify actor:get-value KEY`
315
315
 
@@ -323,7 +323,7 @@ ARGUMENTS
323
323
  KEY Key of the record in key-value store
324
324
  ```
325
325
 
326
- _See code: [src/commands/actor/get-value.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/actor/get-value.js)_
326
+ _See code: [src/commands/actor/get-value.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/actor/get-value.js)_
327
327
 
328
328
  ## `apify actor:push-data [ITEM]`
329
329
 
@@ -344,7 +344,7 @@ DESCRIPTION
344
344
  $ cat ./test.json | apify actor:push-data
345
345
  ```
346
346
 
347
- _See code: [src/commands/actor/push-data.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/actor/push-data.js)_
347
+ _See code: [src/commands/actor/push-data.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/actor/push-data.js)_
348
348
 
349
349
  ## `apify actor:set-value KEY [VALUE]`
350
350
 
@@ -374,7 +374,7 @@ DESCRIPTION
374
374
  $ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain
375
375
  ```
376
376
 
377
- _See code: [src/commands/actor/set-value.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/actor/set-value.js)_
377
+ _See code: [src/commands/actor/set-value.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/actor/set-value.js)_
378
378
 
379
379
  ## `apify call [ACTID]`
380
380
 
@@ -399,7 +399,7 @@ DESCRIPTION
399
399
  takes input for the actor from the default local key-value store by default.
400
400
  ```
401
401
 
402
- _See code: [src/commands/call.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/call.js)_
402
+ _See code: [src/commands/call.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/call.js)_
403
403
 
404
404
  ## `apify create [ACTORNAME]`
405
405
 
@@ -421,7 +421,7 @@ OPTIONS
421
421
  --skip-dependency-install Skip installing actor dependencies.
422
422
  ```
423
423
 
424
- _See code: [src/commands/create.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/create.js)_
424
+ _See code: [src/commands/create.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/create.js)_
425
425
 
426
426
  ## `apify info`
427
427
 
@@ -435,7 +435,7 @@ DESCRIPTION
435
435
  The information is printed to the console.
436
436
  ```
437
437
 
438
- _See code: [src/commands/info.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/info.js)_
438
+ _See code: [src/commands/info.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/info.js)_
439
439
 
440
440
  ## `apify init [ACTORNAME]`
441
441
 
@@ -455,7 +455,7 @@ DESCRIPTION
455
455
  WARNING: The directory at "storage" will be overwritten if it already exists.
456
456
  ```
457
457
 
458
- _See code: [src/commands/init.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/init.js)_
458
+ _See code: [src/commands/init.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/init.js)_
459
459
 
460
460
  ## `apify login`
461
461
 
@@ -473,7 +473,7 @@ DESCRIPTION
473
473
  "apify" commands. To log out, call "apify logout".
474
474
  ```
475
475
 
476
- _See code: [src/commands/login.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/login.js)_
476
+ _See code: [src/commands/login.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/login.js)_
477
477
 
478
478
  ## `apify logout`
479
479
 
@@ -488,7 +488,7 @@ DESCRIPTION
488
488
  call "apify login".
489
489
  ```
490
490
 
491
- _See code: [src/commands/logout.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/logout.js)_
491
+ _See code: [src/commands/logout.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/logout.js)_
492
492
 
493
493
  ## `apify push [ACTORID]`
494
494
 
@@ -523,7 +523,7 @@ DESCRIPTION
523
523
  WARNING: If the target actor already exists in your Apify account, it will be overwritten!
524
524
  ```
525
525
 
526
- _See code: [src/commands/push.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/push.js)_
526
+ _See code: [src/commands/push.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/push.js)_
527
527
 
528
528
  ## `apify run`
529
529
 
@@ -553,7 +553,7 @@ DESCRIPTION
553
553
  package.json file. You can set up your own main file or environment variables by changing it.
554
554
  ```
555
555
 
556
- _See code: [src/commands/run.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/run.js)_
556
+ _See code: [src/commands/run.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/run.js)_
557
557
 
558
558
  ## `apify secrets`
559
559
 
@@ -581,7 +581,7 @@ DESCRIPTION
581
581
  of the actor.
582
582
  ```
583
583
 
584
- _See code: [src/commands/secrets/index.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/secrets/index.js)_
584
+ _See code: [src/commands/secrets/index.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/secrets/index.js)_
585
585
 
586
586
  ## `apify secrets:add NAME VALUE`
587
587
 
@@ -599,7 +599,7 @@ DESCRIPTION
599
599
  The secrets are stored to a file at ~/.apify
600
600
  ```
601
601
 
602
- _See code: [src/commands/secrets/add.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/secrets/add.js)_
602
+ _See code: [src/commands/secrets/add.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/secrets/add.js)_
603
603
 
604
604
  ## `apify secrets:rm NAME`
605
605
 
@@ -613,7 +613,7 @@ ARGUMENTS
613
613
  NAME Name of the secret
614
614
  ```
615
615
 
616
- _See code: [src/commands/secrets/rm.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/secrets/rm.js)_
616
+ _See code: [src/commands/secrets/rm.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/secrets/rm.js)_
617
617
 
618
618
  ## `apify vis [PATH]`
619
619
 
@@ -637,5 +637,5 @@ DESCRIPTION
637
637
  You can also pass any custom path to your input schema to have it validated instead.
638
638
  ```
639
639
 
640
- _See code: [src/commands/vis.js](https://github.com/apify/apify-cli/blob/v0.15.1/src/commands/vis.js)_
640
+ _See code: [src/commands/vis.js](https://github.com/apify/apify-cli/blob/v0.16.0/src/commands/vis.js)_
641
641
  <!-- commandsstop -->
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "apify-cli",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "apify-cli",
9
- "version": "0.15.1",
9
+ "version": "0.16.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "Apache-2.0",
12
12
  "dependencies": {
@@ -20,6 +20,7 @@
20
20
  "@oclif/errors": "^1.3.5",
21
21
  "@oclif/plugin-commands": "^2.1.0",
22
22
  "@oclif/plugin-help": "^5.1.12",
23
+ "adm-zip": "^0.5.10",
23
24
  "ajv": "^8.10.0",
24
25
  "apify-client": "^2.2.0",
25
26
  "archiver-promise": "^1.0.0",
@@ -28,6 +29,7 @@
28
29
  "computer-name": "^0.1.0",
29
30
  "cors": "^2.8.5",
30
31
  "detect-indent": "^6.1.0",
32
+ "escape-string-regexp": "^4.0.0",
31
33
  "express": "^4.18.2",
32
34
  "globby": "^11.1.0",
33
35
  "inquirer": "^7.3.3",
@@ -40,7 +42,6 @@
40
42
  "rimraf": "^3.0.2",
41
43
  "semver": "^7.3.5",
42
44
  "underscore": "^1.13.2",
43
- "unzipper": "^0.10.11",
44
45
  "write-json-file": "^4.3.0"
45
46
  },
46
47
  "bin": {
@@ -1392,26 +1393,6 @@
1392
1393
  }
1393
1394
  ]
1394
1395
  },
1395
- "node_modules/big-integer": {
1396
- "version": "1.6.51",
1397
- "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
1398
- "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
1399
- "engines": {
1400
- "node": ">=0.6"
1401
- }
1402
- },
1403
- "node_modules/binary": {
1404
- "version": "0.3.0",
1405
- "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
1406
- "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==",
1407
- "dependencies": {
1408
- "buffers": "~0.1.1",
1409
- "chainsaw": "~0.1.0"
1410
- },
1411
- "engines": {
1412
- "node": "*"
1413
- }
1414
- },
1415
1396
  "node_modules/binary-extensions": {
1416
1397
  "version": "2.2.0",
1417
1398
  "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -1441,11 +1422,6 @@
1441
1422
  "safe-buffer": "^5.1.1"
1442
1423
  }
1443
1424
  },
1444
- "node_modules/bluebird": {
1445
- "version": "3.4.7",
1446
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
1447
- "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA=="
1448
- },
1449
1425
  "node_modules/body-parser": {
1450
1426
  "version": "1.20.1",
1451
1427
  "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
@@ -1598,22 +1574,6 @@
1598
1574
  "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
1599
1575
  "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
1600
1576
  },
1601
- "node_modules/buffer-indexof-polyfill": {
1602
- "version": "1.0.2",
1603
- "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
1604
- "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==",
1605
- "engines": {
1606
- "node": ">=0.10"
1607
- }
1608
- },
1609
- "node_modules/buffers": {
1610
- "version": "0.1.1",
1611
- "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
1612
- "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==",
1613
- "engines": {
1614
- "node": ">=0.2.0"
1615
- }
1616
- },
1617
1577
  "node_modules/bytes": {
1618
1578
  "version": "3.1.2",
1619
1579
  "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -1744,17 +1704,6 @@
1744
1704
  "integrity": "sha512-gea2rl5SgzF11CopH4yCmFTmPCXSN+e2GSJL33SfM+/WPP/cDk1tmrc0GDU2JRiFVJUJel/2zaNkNfyJKN7CtA==",
1745
1705
  "dev": true
1746
1706
  },
1747
- "node_modules/chainsaw": {
1748
- "version": "0.1.0",
1749
- "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
1750
- "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==",
1751
- "dependencies": {
1752
- "traverse": ">=0.3.0 <0.4"
1753
- },
1754
- "engines": {
1755
- "node": "*"
1756
- }
1757
- },
1758
1707
  "node_modules/chalk": {
1759
1708
  "version": "4.1.2",
1760
1709
  "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -2464,14 +2413,6 @@
2464
2413
  "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
2465
2414
  "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg=="
2466
2415
  },
2467
- "node_modules/duplexer2": {
2468
- "version": "0.1.4",
2469
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
2470
- "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==",
2471
- "dependencies": {
2472
- "readable-stream": "^2.0.2"
2473
- }
2474
- },
2475
2416
  "node_modules/ee-first": {
2476
2417
  "version": "1.1.1",
2477
2418
  "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -3700,31 +3641,6 @@
3700
3641
  "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
3701
3642
  }
3702
3643
  },
3703
- "node_modules/fstream": {
3704
- "version": "1.0.12",
3705
- "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
3706
- "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
3707
- "dependencies": {
3708
- "graceful-fs": "^4.1.2",
3709
- "inherits": "~2.0.0",
3710
- "mkdirp": ">=0.5 0",
3711
- "rimraf": "2"
3712
- },
3713
- "engines": {
3714
- "node": ">=0.6"
3715
- }
3716
- },
3717
- "node_modules/fstream/node_modules/rimraf": {
3718
- "version": "2.7.1",
3719
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
3720
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
3721
- "dependencies": {
3722
- "glob": "^7.1.3"
3723
- },
3724
- "bin": {
3725
- "rimraf": "bin.js"
3726
- }
3727
- },
3728
3644
  "node_modules/function-bind": {
3729
3645
  "version": "1.1.1",
3730
3646
  "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -5114,11 +5030,6 @@
5114
5030
  "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
5115
5031
  "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
5116
5032
  },
5117
- "node_modules/listenercount": {
5118
- "version": "1.0.1",
5119
- "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz",
5120
- "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ=="
5121
- },
5122
5033
  "node_modules/load-json-file": {
5123
5034
  "version": "6.2.0",
5124
5035
  "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz",
@@ -5366,21 +5277,11 @@
5366
5277
  "version": "1.2.7",
5367
5278
  "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
5368
5279
  "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
5280
+ "dev": true,
5369
5281
  "funding": {
5370
5282
  "url": "https://github.com/sponsors/ljharb"
5371
5283
  }
5372
5284
  },
5373
- "node_modules/mkdirp": {
5374
- "version": "0.5.6",
5375
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
5376
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
5377
- "dependencies": {
5378
- "minimist": "^1.2.6"
5379
- },
5380
- "bin": {
5381
- "mkdirp": "bin/cmd.js"
5382
- }
5383
- },
5384
5285
  "node_modules/mkdirp-classic": {
5385
5286
  "version": "0.5.3",
5386
5287
  "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
@@ -7025,11 +6926,6 @@
7025
6926
  "node": ">= 0.8.0"
7026
6927
  }
7027
6928
  },
7028
- "node_modules/setimmediate": {
7029
- "version": "1.0.5",
7030
- "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
7031
- "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA=="
7032
- },
7033
6929
  "node_modules/setprototypeof": {
7034
6930
  "version": "1.2.0",
7035
6931
  "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
@@ -7518,14 +7414,6 @@
7518
7414
  "node": ">=0.6"
7519
7415
  }
7520
7416
  },
7521
- "node_modules/traverse": {
7522
- "version": "0.3.9",
7523
- "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
7524
- "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==",
7525
- "engines": {
7526
- "node": "*"
7527
- }
7528
- },
7529
7417
  "node_modules/tsconfig-paths": {
7530
7418
  "version": "3.14.1",
7531
7419
  "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
@@ -7678,23 +7566,6 @@
7678
7566
  "node": ">= 0.8"
7679
7567
  }
7680
7568
  },
7681
- "node_modules/unzipper": {
7682
- "version": "0.10.11",
7683
- "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz",
7684
- "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==",
7685
- "dependencies": {
7686
- "big-integer": "^1.6.17",
7687
- "binary": "~0.3.0",
7688
- "bluebird": "~3.4.1",
7689
- "buffer-indexof-polyfill": "~1.0.0",
7690
- "duplexer2": "~0.1.4",
7691
- "fstream": "^1.0.12",
7692
- "graceful-fs": "^4.2.2",
7693
- "listenercount": "~1.0.1",
7694
- "readable-stream": "~2.3.6",
7695
- "setimmediate": "~1.0.4"
7696
- }
7697
- },
7698
7569
  "node_modules/update-browserslist-db": {
7699
7570
  "version": "1.0.10",
7700
7571
  "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
@@ -9076,20 +8947,6 @@
9076
8947
  "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
9077
8948
  "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
9078
8949
  },
9079
- "big-integer": {
9080
- "version": "1.6.51",
9081
- "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
9082
- "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg=="
9083
- },
9084
- "binary": {
9085
- "version": "0.3.0",
9086
- "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
9087
- "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==",
9088
- "requires": {
9089
- "buffers": "~0.1.1",
9090
- "chainsaw": "~0.1.0"
9091
- }
9092
- },
9093
8950
  "binary-extensions": {
9094
8951
  "version": "2.2.0",
9095
8952
  "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -9110,11 +8967,6 @@
9110
8967
  "safe-buffer": "^5.1.1"
9111
8968
  }
9112
8969
  },
9113
- "bluebird": {
9114
- "version": "3.4.7",
9115
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
9116
- "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA=="
9117
- },
9118
8970
  "body-parser": {
9119
8971
  "version": "1.20.1",
9120
8972
  "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
@@ -9226,16 +9078,6 @@
9226
9078
  "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
9227
9079
  "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
9228
9080
  },
9229
- "buffer-indexof-polyfill": {
9230
- "version": "1.0.2",
9231
- "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
9232
- "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A=="
9233
- },
9234
- "buffers": {
9235
- "version": "0.1.1",
9236
- "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
9237
- "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ=="
9238
- },
9239
9081
  "bytes": {
9240
9082
  "version": "3.1.2",
9241
9083
  "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -9325,14 +9167,6 @@
9325
9167
  "integrity": "sha512-gea2rl5SgzF11CopH4yCmFTmPCXSN+e2GSJL33SfM+/WPP/cDk1tmrc0GDU2JRiFVJUJel/2zaNkNfyJKN7CtA==",
9326
9168
  "dev": true
9327
9169
  },
9328
- "chainsaw": {
9329
- "version": "0.1.0",
9330
- "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
9331
- "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==",
9332
- "requires": {
9333
- "traverse": ">=0.3.0 <0.4"
9334
- }
9335
- },
9336
9170
  "chalk": {
9337
9171
  "version": "4.1.2",
9338
9172
  "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -9861,14 +9695,6 @@
9861
9695
  "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
9862
9696
  "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg=="
9863
9697
  },
9864
- "duplexer2": {
9865
- "version": "0.1.4",
9866
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
9867
- "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==",
9868
- "requires": {
9869
- "readable-stream": "^2.0.2"
9870
- }
9871
- },
9872
9698
  "ee-first": {
9873
9699
  "version": "1.1.1",
9874
9700
  "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -10831,27 +10657,6 @@
10831
10657
  "dev": true,
10832
10658
  "optional": true
10833
10659
  },
10834
- "fstream": {
10835
- "version": "1.0.12",
10836
- "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
10837
- "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
10838
- "requires": {
10839
- "graceful-fs": "^4.1.2",
10840
- "inherits": "~2.0.0",
10841
- "mkdirp": ">=0.5 0",
10842
- "rimraf": "2"
10843
- },
10844
- "dependencies": {
10845
- "rimraf": {
10846
- "version": "2.7.1",
10847
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
10848
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
10849
- "requires": {
10850
- "glob": "^7.1.3"
10851
- }
10852
- }
10853
- }
10854
- },
10855
10660
  "function-bind": {
10856
10661
  "version": "1.1.1",
10857
10662
  "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -11828,11 +11633,6 @@
11828
11633
  "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
11829
11634
  "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
11830
11635
  },
11831
- "listenercount": {
11832
- "version": "1.0.1",
11833
- "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz",
11834
- "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ=="
11835
- },
11836
11636
  "load-json-file": {
11837
11637
  "version": "6.2.0",
11838
11638
  "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz",
@@ -12011,15 +11811,8 @@
12011
11811
  "minimist": {
12012
11812
  "version": "1.2.7",
12013
11813
  "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
12014
- "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
12015
- },
12016
- "mkdirp": {
12017
- "version": "0.5.6",
12018
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
12019
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
12020
- "requires": {
12021
- "minimist": "^1.2.6"
12022
- }
11814
+ "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
11815
+ "dev": true
12023
11816
  },
12024
11817
  "mkdirp-classic": {
12025
11818
  "version": "0.5.3",
@@ -13242,11 +13035,6 @@
13242
13035
  "send": "0.18.0"
13243
13036
  }
13244
13037
  },
13245
- "setimmediate": {
13246
- "version": "1.0.5",
13247
- "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
13248
- "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA=="
13249
- },
13250
13038
  "setprototypeof": {
13251
13039
  "version": "1.2.0",
13252
13040
  "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
@@ -13636,11 +13424,6 @@
13636
13424
  "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
13637
13425
  "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
13638
13426
  },
13639
- "traverse": {
13640
- "version": "0.3.9",
13641
- "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
13642
- "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ=="
13643
- },
13644
13427
  "tsconfig-paths": {
13645
13428
  "version": "3.14.1",
13646
13429
  "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
@@ -13759,23 +13542,6 @@
13759
13542
  "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
13760
13543
  "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
13761
13544
  },
13762
- "unzipper": {
13763
- "version": "0.10.11",
13764
- "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz",
13765
- "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==",
13766
- "requires": {
13767
- "big-integer": "^1.6.17",
13768
- "binary": "~0.3.0",
13769
- "bluebird": "~3.4.1",
13770
- "buffer-indexof-polyfill": "~1.0.0",
13771
- "duplexer2": "~0.1.4",
13772
- "fstream": "^1.0.12",
13773
- "graceful-fs": "^4.2.2",
13774
- "listenercount": "~1.0.1",
13775
- "readable-stream": "~2.3.6",
13776
- "setimmediate": "~1.0.4"
13777
- }
13778
- },
13779
13545
  "update-browserslist-db": {
13780
13546
  "version": "1.0.10",
13781
13547
  "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
@@ -1 +1 @@
1
- {"version":"0.15.1","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.0","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}]}}}
package/package.json CHANGED
@@ -1,108 +1,109 @@
1
1
  {
2
- "name": "apify-cli",
3
- "version": "0.15.1",
4
- "description": "Apify command-line interface helps you create, develop, build and run Apify actors, and manage the Apify cloud platform.",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "mocha --timeout 180000 --recursive",
8
- "test-python": "mocha --timeout 180000 --recursive --grep '\\[python\\]'",
9
- "lint": "eslint src test",
10
- "lint:fix": "eslint src test --fix",
11
- "commands-md": "npm run manifest && oclif-dev readme",
12
- "prepare-release": "npm run commands-md && npm run prod-shrinkwrap",
13
- "prod-shrinkwrap": "rm -rf node_modules && npm install --production && npm shrinkwrap",
14
- "manifest": "rm -f oclif.manifest.json && oclif-dev manifest",
15
- "postinstall": "node \"./src/bin/run\" check-version"
16
- },
17
- "files": [
18
- "src",
19
- "oclif.manifest.json",
20
- "index.js",
21
- "package.json"
22
- ],
23
- "bin": {
24
- "apify": "./src/bin/run"
25
- },
26
- "contributors": [
27
- "Jakub Drobník <jakub.drobnik@apify.com>",
28
- "Jan Curn <jan@apify.com>"
29
- ],
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/apify/apify-cli.git"
33
- },
34
- "keywords": [
35
- "apify",
36
- "client",
37
- "node",
38
- "command",
39
- "line",
40
- "bash"
41
- ],
42
- "author": {
43
- "name": "Apify",
44
- "email": "support@apify.com",
45
- "url": "https://www.apify.com"
46
- },
47
- "license": "Apache-2.0",
48
- "bugs": {
49
- "url": "https://github.com/apify/apify-cli/issues"
50
- },
51
- "homepage": "https://github.com/apify/apify-cli#readme",
52
- "engines": {
53
- "node": ">=16.0.0"
54
- },
55
- "dependencies": {
56
- "@apify/actor-templates": "^0.1.3",
57
- "@apify/consts": "^2.7.0",
58
- "@apify/input_schema": "^3.3.0",
59
- "@apify/utilities": "^2.2.3",
60
- "@crawlee/memory-storage": "^3.0.3",
61
- "@oclif/command": "^1.8.16",
62
- "@oclif/config": "^1.18.3",
63
- "@oclif/errors": "^1.3.5",
64
- "@oclif/plugin-commands": "^2.1.0",
65
- "@oclif/plugin-help": "^5.1.12",
66
- "ajv": "^8.10.0",
67
- "apify-client": "^2.2.0",
68
- "archiver-promise": "^1.0.0",
69
- "axios": "^0.21.1",
70
- "chalk": "^4.1.2",
71
- "computer-name": "^0.1.0",
72
- "cors": "^2.8.5",
73
- "detect-indent": "^6.1.0",
74
- "express": "^4.18.2",
75
- "globby": "^11.1.0",
76
- "inquirer": "^7.3.3",
77
- "is-online": "^10.0.0",
78
- "istextorbinary": "^6.0.0",
79
- "load-json-file": "^6.2.0",
80
- "mime": "^2.6.0",
81
- "open": "^8.4.0",
82
- "ow": "^0.28.1",
83
- "rimraf": "^3.0.2",
84
- "semver": "^7.3.5",
85
- "underscore": "^1.13.2",
86
- "unzipper": "^0.10.11",
87
- "write-json-file": "^4.3.0"
88
- },
89
- "devDependencies": {
90
- "@apify/eslint-config": "^0.2.3",
91
- "@oclif/dev-cli": "^1.26.0",
92
- "@oclif/test": "^2.1.0",
93
- "chai": "^4.3.4",
94
- "chai-match": "^1.1.1",
95
- "eslint": "^8.11.0",
96
- "mocha": "^10.0.0",
97
- "sinon": "^9.2.4"
98
- },
99
- "oclif": {
100
- "bin": "apify",
101
- "commands": "./src/commands",
102
- "hooks": {
103
- "init": [
104
- "./src/hooks/init"
105
- ]
106
- }
2
+ "name": "apify-cli",
3
+ "version": "0.16.0-beta.0",
4
+ "description": "Apify command-line interface helps you create, develop, build and run Apify actors, and manage the Apify cloud platform.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "mocha --timeout 180000 --recursive",
8
+ "test-python": "mocha --timeout 180000 --recursive --grep '\\[python\\]'",
9
+ "lint": "eslint src test",
10
+ "lint:fix": "eslint src test --fix",
11
+ "commands-md": "npm run manifest && oclif-dev readme",
12
+ "prepare-release": "npm run commands-md && npm run prod-shrinkwrap",
13
+ "prod-shrinkwrap": "rm -rf node_modules && npm install --production && npm shrinkwrap",
14
+ "manifest": "rm -f oclif.manifest.json && oclif-dev manifest",
15
+ "postinstall": "node \"./src/bin/run\" check-version"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "oclif.manifest.json",
20
+ "index.js",
21
+ "package.json"
22
+ ],
23
+ "bin": {
24
+ "apify": "./src/bin/run"
25
+ },
26
+ "contributors": [
27
+ "Jakub Drobník <jakub.drobnik@apify.com>",
28
+ "Jan Curn <jan@apify.com>"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/apify/apify-cli.git"
33
+ },
34
+ "keywords": [
35
+ "apify",
36
+ "client",
37
+ "node",
38
+ "command",
39
+ "line",
40
+ "bash"
41
+ ],
42
+ "author": {
43
+ "name": "Apify",
44
+ "email": "support@apify.com",
45
+ "url": "https://www.apify.com"
46
+ },
47
+ "license": "Apache-2.0",
48
+ "bugs": {
49
+ "url": "https://github.com/apify/apify-cli/issues"
50
+ },
51
+ "homepage": "https://github.com/apify/apify-cli#readme",
52
+ "engines": {
53
+ "node": ">=16.0.0"
54
+ },
55
+ "dependencies": {
56
+ "@apify/actor-templates": "^0.1.3",
57
+ "@apify/consts": "^2.7.0",
58
+ "@apify/input_schema": "^3.3.0",
59
+ "@apify/utilities": "^2.2.3",
60
+ "@crawlee/memory-storage": "^3.0.3",
61
+ "@oclif/command": "^1.8.16",
62
+ "@oclif/config": "^1.18.3",
63
+ "@oclif/errors": "^1.3.5",
64
+ "@oclif/plugin-commands": "^2.1.0",
65
+ "@oclif/plugin-help": "^5.1.12",
66
+ "adm-zip": "^0.5.10",
67
+ "ajv": "^8.10.0",
68
+ "apify-client": "^2.2.0",
69
+ "archiver-promise": "^1.0.0",
70
+ "axios": "^0.21.1",
71
+ "chalk": "^4.1.2",
72
+ "computer-name": "^0.1.0",
73
+ "cors": "^2.8.5",
74
+ "detect-indent": "^6.1.0",
75
+ "escape-string-regexp": "^4.0.0",
76
+ "express": "^4.18.2",
77
+ "globby": "^11.1.0",
78
+ "inquirer": "^7.3.3",
79
+ "is-online": "^10.0.0",
80
+ "istextorbinary": "^6.0.0",
81
+ "load-json-file": "^6.2.0",
82
+ "mime": "^2.6.0",
83
+ "open": "^8.4.0",
84
+ "ow": "^0.28.1",
85
+ "rimraf": "^3.0.2",
86
+ "semver": "^7.3.5",
87
+ "underscore": "^1.13.2",
88
+ "write-json-file": "^4.3.0"
89
+ },
90
+ "devDependencies": {
91
+ "@apify/eslint-config": "^0.2.3",
92
+ "@oclif/dev-cli": "^1.26.0",
93
+ "@oclif/test": "^2.1.0",
94
+ "chai": "^4.3.4",
95
+ "chai-match": "^1.1.1",
96
+ "eslint": "^8.11.0",
97
+ "mocha": "^10.0.0",
98
+ "sinon": "^9.2.4"
99
+ },
100
+ "oclif": {
101
+ "bin": "apify",
102
+ "commands": "./src/commands",
103
+ "hooks": {
104
+ "init": [
105
+ "./src/hooks/init"
106
+ ]
107
107
  }
108
+ }
108
109
  }
@@ -1,8 +1,10 @@
1
1
  const { flags: flagsHelper } = require('@oclif/command');
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
+ const { finished } = require('stream');
5
+ const { promisify } = require('util');
4
6
  const actorTemplates = require('@apify/actor-templates');
5
- const unzipper = require('unzipper');
7
+ const AdmZip = require('adm-zip');
6
8
  const semver = require('semver');
7
9
  const { ApifyCommand } = require('../lib/apify_command');
8
10
  const execWithLog = require('../lib/exec');
@@ -67,8 +69,11 @@ class CreateCommand extends ApifyCommand {
67
69
  }
68
70
 
69
71
  const zipStream = await httpsGet(templateArchiveUrl);
70
- const unzip = unzipper.Extract({ path: actFolderDir });
71
- await zipStream.pipe(unzip).promise();
72
+ const chunks = [];
73
+ zipStream.on('data', (chunk) => chunks.push(chunk));
74
+ await promisify(finished)(zipStream);
75
+ const zip = new AdmZip(Buffer.concat(chunks));
76
+ zip.extractAllTo(actFolderDir, true);
72
77
 
73
78
  // There may be .actor/actor.json file in used template - let's try to load it and change the name prop value to actorName
74
79
  const localConfig = await getJsonFileContent(path.join(actFolderDir, LOCAL_CONFIG_PATH));
@@ -21,15 +21,11 @@ const API_BASE_URL = CONSOLE_BASE_URL.includes('localhost') ? 'http://localhost:
21
21
  // Not really checked right now, but it might come useful if we ever need to do some breaking changes
22
22
  const API_VERSION = 'v1';
23
23
 
24
- let tokenPrompt;
25
- let promptUi;
26
-
27
24
  const tryToLogin = async (token) => {
28
25
  const isUserLogged = await getLoggedClient(token, API_BASE_URL);
29
26
  const userInfo = getLocalUserInfo();
30
27
  if (isUserLogged) {
31
28
  outputs.success(`You are logged in to Apify as ${userInfo.username || userInfo.id}!`);
32
- promptUi.close();
33
29
  } else {
34
30
  outputs.error('Login to Apify failed, the provided API token is not valid.');
35
31
  }
@@ -41,8 +37,23 @@ class LoginNewCommand extends ApifyCommand {
41
37
  outputs.warning('This command is still experimental and might break at any time. Use at your own risk.\n');
42
38
 
43
39
  const { flags } = this.parse(LoginNewCommand);
44
- let { token } = flags;
45
- if (!token) {
40
+ const { token } = flags;
41
+ if (token) {
42
+ return tryToLogin(token);
43
+ }
44
+
45
+ const answer = await inquirer.prompt([{
46
+ type: 'list',
47
+ name: 'loginMethod',
48
+ message: 'Choose how you want to log in to Apify',
49
+ choices: [
50
+ { value: 'console', name: 'Through Apify Console in your default browser', short: 'Through Apify Console' },
51
+ { value: 'manual', name: 'Enter API token manually', short: 'Manually' },
52
+ ],
53
+ loop: false,
54
+ }]);
55
+
56
+ if (answer.loginMethod === 'console') {
46
57
  let server;
47
58
  const app = express();
48
59
 
@@ -89,8 +100,6 @@ class LoginNewCommand extends ApifyCommand {
89
100
  apiRouter.post('/login-token', async (req, res) => {
90
101
  try {
91
102
  if (req.body.apiToken) {
92
- console.log('canceled');
93
- outputs.info('Got token from console...');
94
103
  await tryToLogin(req.body.apiToken);
95
104
  } else {
96
105
  throw new Error('Request did not contain API token');
@@ -121,28 +130,23 @@ class LoginNewCommand extends ApifyCommand {
121
130
  // Listening on port 0 will assign a random available port
122
131
  server = app.listen(0);
123
132
  const { port } = server.address();
124
- outputs.info(`Waiting for token from Apify console (on port ${port})...`);
125
133
 
126
134
  const consoleUrl = new URL(CONSOLE_BASE_URL);
127
135
  consoleUrl.searchParams.set('localCliCommand', 'login');
128
136
  consoleUrl.searchParams.set('localCliPort', port);
129
137
  consoleUrl.searchParams.set('localCliToken', authToken);
130
138
  consoleUrl.searchParams.set('localCliApiVersion', API_VERSION);
131
- consoleUrl.searchParams.set('localCliComputerName', encodeURIComponent(computerName()));
139
+ try {
140
+ consoleUrl.searchParams.set('localCliComputerName', encodeURIComponent(computerName()));
141
+ } catch {
142
+ // Ignore errors from fetching computer name as it's not critical
143
+ }
132
144
 
133
145
  outputs.info(`Opening Apify Console at "${consoleUrl.href}"...`);
134
- outputs.info('You can also paste your Apify token below');
135
146
  await open(consoleUrl.href);
136
- tokenPrompt = inquirer.prompt([{ name: 'token', message: 'token:', type: 'password' }]);
137
- promptUi = tokenPrompt.ui;
138
- const { token: insertedToken } = await tokenPrompt;
139
- server.close();
140
- const loginSuccessful = await tryToLogin(insertedToken);
141
- if (loginSuccessful) {
142
- token = insertedToken;
143
- }
144
147
  } else {
145
- return tryToLogin(token);
148
+ const tokenAnswer = await inquirer.prompt([{ name: 'token', message: 'Insert your Apify API token', type: 'password' }]);
149
+ return tryToLogin(tokenAnswer.token);
146
150
  }
147
151
  }
148
152
  }
@@ -3,6 +3,8 @@ const { flags: flagsHelper } = require('@oclif/command');
3
3
  const actorTemplates = require('@apify/actor-templates');
4
4
  const { ACT_JOB_STATUSES, ACT_SOURCE_TYPES,
5
5
  MAX_MULTIFILE_BYTES } = require('@apify/consts');
6
+ const open = require('open');
7
+ const inquirer = require('inquirer');
6
8
  const { ApifyCommand } = require('../lib/apify_command');
7
9
  const { createActZip, getLoggedClientOrThrow,
8
10
  outputJobLog, getLocalUserInfo, getActorLocalFilePaths,
@@ -32,6 +34,8 @@ class PushCommand extends ApifyCommand {
32
34
  const apifyClient = await getLoggedClientOrThrow();
33
35
  const localConfig = await getLocalConfigOrThrow();
34
36
  const userInfo = await getLocalUserInfo();
37
+ const isOrganizationLoggedIn = !!userInfo.organizationOwnerUserId;
38
+ const redirectUrlPart = isOrganizationLoggedIn ? `/organization/${userInfo.id}` : '';
35
39
 
36
40
  let actorId;
37
41
  let actor;
@@ -152,12 +156,26 @@ class PushCommand extends ApifyCommand {
152
156
 
153
157
  build = await apifyClient.build(build.id).get();
154
158
 
155
- outputs.link('Actor build detail', `https://console.apify.com/actors/${build.actId}#/builds/${build.buildNumber}`);
159
+ outputs.link('Actor build detail', `https://console.apify.com${redirectUrlPart}/actors/${build.actId}#/builds/${build.buildNumber}`);
160
+
161
+ const shouldOpenBrowser = await inquirer.prompt([
162
+ { type: 'confirm', name: 'continue', message: 'Do you want to open the actor detail in your browser?', default: true },
163
+ ]);
164
+
165
+ if (shouldOpenBrowser.continue) {
166
+ open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
167
+ }
156
168
 
157
169
  if (build.status === ACT_JOB_STATUSES.SUCCEEDED) {
158
170
  outputs.success('Actor was deployed to Apify cloud and built there.');
171
+ } else if (build.status === ACT_JOB_STATUSES.READY) {
172
+ outputs.warning('Build is waiting for allocation.');
159
173
  } else if (build.status === ACT_JOB_STATUSES.RUNNING) {
160
- outputs.warning('Build is still running!');
174
+ outputs.warning('Build is still running.');
175
+ } else if (build.status === ACT_JOB_STATUSES.ABORTED || build.status === ACT_JOB_STATUSES.ABORTING) {
176
+ outputs.warning('Build was aborted!');
177
+ } else if (build.status === ACT_JOB_STATUSES.TIMED_OUT || build.status === ACT_JOB_STATUSES.TIMING_OUT) {
178
+ outputs.warning('Build timed out!');
161
179
  } else {
162
180
  outputs.error('Build failed!');
163
181
  }
package/src/lib/utils.js CHANGED
@@ -23,6 +23,7 @@ const {
23
23
  spawnSync,
24
24
  } = require('child_process');
25
25
  const semver = require('semver');
26
+ const escapeStringRegexp = require('escape-string-regexp');
26
27
  const {
27
28
  GLOBAL_CONFIGS_FOLDER,
28
29
  AUTH_FILE_PATH,
@@ -229,6 +230,8 @@ const setLocalConfig = async (localConfig, actDir) => {
229
230
  writeJson.sync(path.join(actDir, LOCAL_CONFIG_PATH), localConfig);
230
231
  };
231
232
 
233
+ const GITIGNORE_REQUIRED_CONTENTS = [getLocalStorageDir(), 'node_modules', '.venv'];
234
+
232
235
  const setLocalEnv = async (actDir) => {
233
236
  // Create folders for emulation Apify stores
234
237
  const keyValueStorePath = getLocalKeyValueStorePath();
@@ -237,13 +240,27 @@ const setLocalEnv = async (actDir) => {
237
240
  ensureFolderExistsSync(actDir, getLocalRequestQueuePath());
238
241
  ensureFolderExistsSync(actDir, keyValueStorePath);
239
242
 
240
- // Update gitignore
241
- const localStorageDir = getLocalStorageDir();
242
- const gitingore = path.join(actDir, '.gitignore');
243
- if (fs.existsSync(gitingore)) {
244
- fs.writeFileSync(gitingore, `\n${localStorageDir}`, { flag: 'a' });
245
- } else {
246
- fs.writeFileSync(gitingore, `${localStorageDir}\nnode_modules`, { flag: 'w' });
243
+ // Create or update gitignore
244
+ const gitignorePath = path.join(actDir, '.gitignore');
245
+ let gitignoreContents = '';
246
+ if (fs.existsSync(gitignorePath)) {
247
+ gitignoreContents = fs.readFileSync(gitignorePath, { encoding: 'utf-8' });
248
+ }
249
+
250
+ const gitignoreAdditions = [];
251
+ for (const gitignoreRequirement of GITIGNORE_REQUIRED_CONTENTS) {
252
+ if (!RegExp(`^${escapeStringRegexp(gitignoreRequirement)}$`, 'mg').test(gitignoreContents)) {
253
+ gitignoreAdditions.push(gitignoreRequirement);
254
+ }
255
+ }
256
+
257
+ if (gitignoreAdditions.length > 0) {
258
+ if (gitignoreContents.length > 0) {
259
+ gitignoreAdditions.unshift('# Added by Apify CLI');
260
+ fs.writeFileSync(gitignorePath, `\n${gitignoreAdditions.join('\n')}\n`, { flag: 'a' });
261
+ } else {
262
+ fs.writeFileSync(gitignorePath, `${gitignoreAdditions.join('\n')}\n`, { flag: 'w' });
263
+ }
247
264
  }
248
265
 
249
266
  // Create an empty INPUT.json file if it does not exist.
@@ -385,7 +402,7 @@ const purgeDefaultKeyValueStore = async () => {
385
402
  await Promise.all(deletePromises);
386
403
  };
387
404
 
388
- const outputJobLog = async (job, jobStatus, timeout) => {
405
+ const outputJobLog = async (job, timeout) => {
389
406
  const { id: logId, status } = job;
390
407
  // In case job was already done just output log
391
408
  if (ACT_JOB_TERMINAL_STATUSES.includes(status)) {