netlify-cli 8.9.9 → 8.10.2

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/bin/run CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- /* eslint-disable promise/prefer-await-to-then,promise/prefer-await-to-callbacks,eslint-comments/disable-enable-pair */
3
2
  const process = require('process')
4
3
 
5
4
  const updateNotifier = require('update-notifier')
@@ -18,23 +17,13 @@ if (require.main === module) {
18
17
  pkg,
19
18
  updateCheckInterval: UPDATE_CHECK_INTERVAL,
20
19
  }).notify()
21
- } catch (error) {
20
+ } catch (error_) {
22
21
  console.log('Error checking for updates:')
23
- console.log(error)
22
+ console.log(error_)
24
23
  }
25
24
 
26
- /** @type {Error} */
27
- let caughtError
28
-
29
25
  const program = createMainCommand()
30
26
 
31
- program.parseAsync(process.argv).catch((error) => {
32
- caughtError = error
33
- })
34
-
35
- // long running commands like dev server cannot be caught by a post action hook
36
- // they are running on the main command
37
- process.on('exit', () => {
38
- program.onEnd(caughtError)
39
- })
27
+ // eslint-disable-next-line promise/prefer-await-to-then
28
+ program.parseAsync(process.argv).catch((error_) => program.onEnd(error_))
40
29
  }
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "8.9.9",
3
+ "version": "8.10.2",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "8.9.9",
9
+ "version": "8.10.2",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^26.1.4",
13
+ "@netlify/build": "^26.1.7",
14
14
  "@netlify/config": "^17.0.3",
15
- "@netlify/framework-info": "^8.0.2",
15
+ "@netlify/framework-info": "^9.0.0",
16
16
  "@netlify/local-functions-proxy": "^1.1.1",
17
17
  "@netlify/plugin-edge-handlers": "^3.0.4",
18
18
  "@netlify/plugins-list": "^6.3.0",
@@ -134,6 +134,7 @@
134
134
  "mock-fs": "^5.1.2",
135
135
  "mock-require": "^3.0.3",
136
136
  "p-timeout": "^4.0.0",
137
+ "proxyquire": "^2.1.3",
137
138
  "seedrandom": "^3.0.5",
138
139
  "serialize-javascript": "^6.0.0",
139
140
  "sinon": "^12.0.0",
@@ -2386,9 +2387,9 @@
2386
2387
  }
2387
2388
  },
2388
2389
  "node_modules/@netlify/build": {
2389
- "version": "26.1.4",
2390
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.4.tgz",
2391
- "integrity": "sha512-05NGq1kChEifsvCdqX9rw0jHMKsdbD60Nj9bOBLrByGvw5FJ92949gpazjAggfLQoaIPZTLkPGZO86L0nu/MZw==",
2390
+ "version": "26.1.7",
2391
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.7.tgz",
2392
+ "integrity": "sha512-WZiXVp3doX+Ryd0M/MfBtDwMZjGZImD12mSkWQ7bSZTTFuLwBUfQCRraSB17iBavRHJk6xb/1RaMKFFwPRjsmw==",
2392
2393
  "dependencies": {
2393
2394
  "@bugsnag/js": "^7.0.0",
2394
2395
  "@netlify/cache-utils": "^4.0.0",
@@ -2398,8 +2399,9 @@
2398
2399
  "@netlify/plugin-edge-handlers": "^3.0.4",
2399
2400
  "@netlify/plugins-list": "^6.3.0",
2400
2401
  "@netlify/run-utils": "^4.0.0",
2401
- "@netlify/zip-it-and-ship-it": "^5.4.0",
2402
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
2402
2403
  "@sindresorhus/slugify": "^1.1.0",
2404
+ "@types/node": "^16.0.0",
2403
2405
  "ansi-escapes": "^4.3.2",
2404
2406
  "chalk": "^4.1.2",
2405
2407
  "clean-stack": "^3.0.1",
@@ -2438,9 +2440,10 @@
2438
2440
  "supports-color": "^8.0.0",
2439
2441
  "tmp-promise": "^3.0.2",
2440
2442
  "ts-node": "^10.4.0",
2443
+ "typescript": "^4.5.4",
2441
2444
  "update-notifier": "^5.0.0",
2442
2445
  "uuid": "^8.0.0",
2443
- "yargs": "^16.0.0"
2446
+ "yargs": "^17.3.1"
2444
2447
  },
2445
2448
  "bin": {
2446
2449
  "netlify-build": "src/core/bin.js"
@@ -2460,6 +2463,11 @@
2460
2463
  "url": "https://github.com/sindresorhus/is?sponsor=1"
2461
2464
  }
2462
2465
  },
2466
+ "node_modules/@netlify/build/node_modules/@types/node": {
2467
+ "version": "16.11.21",
2468
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
2469
+ "integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
2470
+ },
2463
2471
  "node_modules/@netlify/build/node_modules/ansi-escapes": {
2464
2472
  "version": "4.3.2",
2465
2473
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -2599,20 +2607,28 @@
2599
2607
  }
2600
2608
  },
2601
2609
  "node_modules/@netlify/build/node_modules/yargs": {
2602
- "version": "16.2.0",
2603
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
2604
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
2610
+ "version": "17.3.1",
2611
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
2612
+ "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
2605
2613
  "dependencies": {
2606
2614
  "cliui": "^7.0.2",
2607
2615
  "escalade": "^3.1.1",
2608
2616
  "get-caller-file": "^2.0.5",
2609
2617
  "require-directory": "^2.1.1",
2610
- "string-width": "^4.2.0",
2618
+ "string-width": "^4.2.3",
2611
2619
  "y18n": "^5.0.5",
2612
- "yargs-parser": "^20.2.2"
2620
+ "yargs-parser": "^21.0.0"
2613
2621
  },
2614
2622
  "engines": {
2615
- "node": ">=10"
2623
+ "node": ">=12"
2624
+ }
2625
+ },
2626
+ "node_modules/@netlify/build/node_modules/yargs-parser": {
2627
+ "version": "21.0.0",
2628
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz",
2629
+ "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==",
2630
+ "engines": {
2631
+ "node": ">=12"
2616
2632
  }
2617
2633
  },
2618
2634
  "node_modules/@netlify/cache-utils": {
@@ -2786,9 +2802,9 @@
2786
2802
  }
2787
2803
  },
2788
2804
  "node_modules/@netlify/framework-info": {
2789
- "version": "8.0.2",
2790
- "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-8.0.2.tgz",
2791
- "integrity": "sha512-lRI4On9XVEuAtwOGtUEbljAUhyR8SLBHKxVYJ6SQ7TM8XGEZkPB23/2q7OktGTMK+qqK/QS1DohuahNFw8+pqQ==",
2805
+ "version": "9.0.0",
2806
+ "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-9.0.0.tgz",
2807
+ "integrity": "sha512-I4TzDRKmFaagcLCwmFeSr5tPsfT/fxBBaPpDv192fb468R4WbI0TVfTAqlTGJEmc6cHllXpgbVNCRvpeJAP7Fw==",
2792
2808
  "dependencies": {
2793
2809
  "ajv": "^8.0.0",
2794
2810
  "filter-obj": "^2.0.1",
@@ -10432,6 +10448,19 @@
10432
10448
  "node": ">=6"
10433
10449
  }
10434
10450
  },
10451
+ "node_modules/fill-keys": {
10452
+ "version": "1.0.2",
10453
+ "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
10454
+ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=",
10455
+ "dev": true,
10456
+ "dependencies": {
10457
+ "is-object": "~1.0.1",
10458
+ "merge-descriptors": "~1.0.0"
10459
+ },
10460
+ "engines": {
10461
+ "node": ">=0.10.0"
10462
+ }
10463
+ },
10435
10464
  "node_modules/fill-range": {
10436
10465
  "version": "7.0.1",
10437
10466
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -14854,6 +14883,12 @@
14854
14883
  "node": ">=6.0"
14855
14884
  }
14856
14885
  },
14886
+ "node_modules/module-not-found-error": {
14887
+ "version": "1.0.1",
14888
+ "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz",
14889
+ "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=",
14890
+ "dev": true
14891
+ },
14857
14892
  "node_modules/moize": {
14858
14893
  "version": "6.1.0",
14859
14894
  "resolved": "https://registry.npmjs.org/moize/-/moize-6.1.0.tgz",
@@ -17488,6 +17523,34 @@
17488
17523
  "node": ">= 0.10"
17489
17524
  }
17490
17525
  },
17526
+ "node_modules/proxyquire": {
17527
+ "version": "2.1.3",
17528
+ "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz",
17529
+ "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==",
17530
+ "dev": true,
17531
+ "dependencies": {
17532
+ "fill-keys": "^1.0.2",
17533
+ "module-not-found-error": "^1.0.1",
17534
+ "resolve": "^1.11.1"
17535
+ }
17536
+ },
17537
+ "node_modules/proxyquire/node_modules/resolve": {
17538
+ "version": "1.21.0",
17539
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz",
17540
+ "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
17541
+ "dev": true,
17542
+ "dependencies": {
17543
+ "is-core-module": "^2.8.0",
17544
+ "path-parse": "^1.0.7",
17545
+ "supports-preserve-symlinks-flag": "^1.0.0"
17546
+ },
17547
+ "bin": {
17548
+ "resolve": "bin/resolve"
17549
+ },
17550
+ "funding": {
17551
+ "url": "https://github.com/sponsors/ljharb"
17552
+ }
17553
+ },
17491
17554
  "node_modules/ps-list": {
17492
17555
  "version": "7.2.0",
17493
17556
  "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-7.2.0.tgz",
@@ -23646,9 +23709,9 @@
23646
23709
  }
23647
23710
  },
23648
23711
  "@netlify/build": {
23649
- "version": "26.1.4",
23650
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.4.tgz",
23651
- "integrity": "sha512-05NGq1kChEifsvCdqX9rw0jHMKsdbD60Nj9bOBLrByGvw5FJ92949gpazjAggfLQoaIPZTLkPGZO86L0nu/MZw==",
23712
+ "version": "26.1.7",
23713
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.7.tgz",
23714
+ "integrity": "sha512-WZiXVp3doX+Ryd0M/MfBtDwMZjGZImD12mSkWQ7bSZTTFuLwBUfQCRraSB17iBavRHJk6xb/1RaMKFFwPRjsmw==",
23652
23715
  "requires": {
23653
23716
  "@bugsnag/js": "^7.0.0",
23654
23717
  "@netlify/cache-utils": "^4.0.0",
@@ -23658,8 +23721,9 @@
23658
23721
  "@netlify/plugin-edge-handlers": "^3.0.4",
23659
23722
  "@netlify/plugins-list": "^6.3.0",
23660
23723
  "@netlify/run-utils": "^4.0.0",
23661
- "@netlify/zip-it-and-ship-it": "^5.4.0",
23724
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
23662
23725
  "@sindresorhus/slugify": "^1.1.0",
23726
+ "@types/node": "^16.0.0",
23663
23727
  "ansi-escapes": "^4.3.2",
23664
23728
  "chalk": "^4.1.2",
23665
23729
  "clean-stack": "^3.0.1",
@@ -23698,9 +23762,10 @@
23698
23762
  "supports-color": "^8.0.0",
23699
23763
  "tmp-promise": "^3.0.2",
23700
23764
  "ts-node": "^10.4.0",
23765
+ "typescript": "^4.5.4",
23701
23766
  "update-notifier": "^5.0.0",
23702
23767
  "uuid": "^8.0.0",
23703
- "yargs": "^16.0.0"
23768
+ "yargs": "^17.3.1"
23704
23769
  },
23705
23770
  "dependencies": {
23706
23771
  "@sindresorhus/is": {
@@ -23708,6 +23773,11 @@
23708
23773
  "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
23709
23774
  "integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg=="
23710
23775
  },
23776
+ "@types/node": {
23777
+ "version": "16.11.21",
23778
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
23779
+ "integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
23780
+ },
23711
23781
  "ansi-escapes": {
23712
23782
  "version": "4.3.2",
23713
23783
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -23801,18 +23871,23 @@
23801
23871
  "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
23802
23872
  },
23803
23873
  "yargs": {
23804
- "version": "16.2.0",
23805
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
23806
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
23874
+ "version": "17.3.1",
23875
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
23876
+ "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
23807
23877
  "requires": {
23808
23878
  "cliui": "^7.0.2",
23809
23879
  "escalade": "^3.1.1",
23810
23880
  "get-caller-file": "^2.0.5",
23811
23881
  "require-directory": "^2.1.1",
23812
- "string-width": "^4.2.0",
23882
+ "string-width": "^4.2.3",
23813
23883
  "y18n": "^5.0.5",
23814
- "yargs-parser": "^20.2.2"
23884
+ "yargs-parser": "^21.0.0"
23815
23885
  }
23886
+ },
23887
+ "yargs-parser": {
23888
+ "version": "21.0.0",
23889
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz",
23890
+ "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA=="
23816
23891
  }
23817
23892
  }
23818
23893
  },
@@ -23960,9 +24035,9 @@
23960
24035
  }
23961
24036
  },
23962
24037
  "@netlify/framework-info": {
23963
- "version": "8.0.2",
23964
- "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-8.0.2.tgz",
23965
- "integrity": "sha512-lRI4On9XVEuAtwOGtUEbljAUhyR8SLBHKxVYJ6SQ7TM8XGEZkPB23/2q7OktGTMK+qqK/QS1DohuahNFw8+pqQ==",
24038
+ "version": "9.0.0",
24039
+ "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-9.0.0.tgz",
24040
+ "integrity": "sha512-I4TzDRKmFaagcLCwmFeSr5tPsfT/fxBBaPpDv192fb468R4WbI0TVfTAqlTGJEmc6cHllXpgbVNCRvpeJAP7Fw==",
23966
24041
  "requires": {
23967
24042
  "ajv": "^8.0.0",
23968
24043
  "filter-obj": "^2.0.1",
@@ -29792,6 +29867,16 @@
29792
29867
  "trim-repeated": "^1.0.0"
29793
29868
  }
29794
29869
  },
29870
+ "fill-keys": {
29871
+ "version": "1.0.2",
29872
+ "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
29873
+ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=",
29874
+ "dev": true,
29875
+ "requires": {
29876
+ "is-object": "~1.0.1",
29877
+ "merge-descriptors": "~1.0.0"
29878
+ }
29879
+ },
29795
29880
  "fill-range": {
29796
29881
  "version": "7.0.1",
29797
29882
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -33098,6 +33183,12 @@
33098
33183
  "node-source-walk": "^4.0.0"
33099
33184
  }
33100
33185
  },
33186
+ "module-not-found-error": {
33187
+ "version": "1.0.1",
33188
+ "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz",
33189
+ "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=",
33190
+ "dev": true
33191
+ },
33101
33192
  "moize": {
33102
33193
  "version": "6.1.0",
33103
33194
  "resolved": "https://registry.npmjs.org/moize/-/moize-6.1.0.tgz",
@@ -35107,6 +35198,30 @@
35107
35198
  "ipaddr.js": "1.9.1"
35108
35199
  }
35109
35200
  },
35201
+ "proxyquire": {
35202
+ "version": "2.1.3",
35203
+ "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz",
35204
+ "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==",
35205
+ "dev": true,
35206
+ "requires": {
35207
+ "fill-keys": "^1.0.2",
35208
+ "module-not-found-error": "^1.0.1",
35209
+ "resolve": "^1.11.1"
35210
+ },
35211
+ "dependencies": {
35212
+ "resolve": {
35213
+ "version": "1.21.0",
35214
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz",
35215
+ "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
35216
+ "dev": true,
35217
+ "requires": {
35218
+ "is-core-module": "^2.8.0",
35219
+ "path-parse": "^1.0.7",
35220
+ "supports-preserve-symlinks-flag": "^1.0.0"
35221
+ }
35222
+ }
35223
+ }
35224
+ },
35110
35225
  "ps-list": {
35111
35226
  "version": "7.2.0",
35112
35227
  "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-7.2.0.tgz",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "8.9.9",
4
+ "version": "8.10.2",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
@@ -76,9 +76,9 @@
76
76
  "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!.github/**/*.md\""
77
77
  },
78
78
  "dependencies": {
79
- "@netlify/build": "^26.1.4",
79
+ "@netlify/build": "^26.1.7",
80
80
  "@netlify/config": "^17.0.3",
81
- "@netlify/framework-info": "^8.0.2",
81
+ "@netlify/framework-info": "^9.0.0",
82
82
  "@netlify/local-functions-proxy": "^1.1.1",
83
83
  "@netlify/plugin-edge-handlers": "^3.0.4",
84
84
  "@netlify/plugins-list": "^6.3.0",
@@ -196,6 +196,7 @@
196
196
  "mock-fs": "^5.1.2",
197
197
  "mock-require": "^3.0.3",
198
198
  "p-timeout": "^4.0.0",
199
+ "proxyquire": "^2.1.3",
199
200
  "seedrandom": "^3.0.5",
200
201
  "serialize-javascript": "^6.0.0",
201
202
  "sinon": "^12.0.0",
@@ -303,12 +303,14 @@ class BaseCommand extends Command {
303
303
  debug(`${this.name()}:onEnd`)(`Status: ${status}`)
304
304
  debug(`${this.name()}:onEnd`)(`Duration: ${duration}ms`)
305
305
 
306
- await track('command', {
307
- ...payload,
308
- command: this.name(),
309
- duration,
310
- status,
311
- })
306
+ try {
307
+ await track('command', {
308
+ ...payload,
309
+ command: this.name(),
310
+ duration,
311
+ status,
312
+ })
313
+ } catch {}
312
314
 
313
315
  if (error_ !== undefined) {
314
316
  error(error_ instanceof Error ? error_ : format(error_), { exit: false })
@@ -316,6 +316,7 @@ const createDevCommand = (program) => {
316
316
  .option('-f ,--functions <folder>', 'specify a functions folder to serve')
317
317
  .option('-o ,--offline', 'disables any features that require network access')
318
318
  .option('-l, --live', 'start a public live session', false)
319
+ .option('--functionsPort <port>', 'port of functions server', (value) => Number.parseInt(value))
319
320
  .addOption(
320
321
  new Option('--staticServerPort <port>', 'port of the static app server used when no framework is detected')
321
322
  .argParser((value) => Number.parseInt(value))
@@ -4,10 +4,11 @@ const process = require('process')
4
4
 
5
5
  const { fetchLatest, fetchVersion, newerVersion, updateAvailable } = require('gh-release-fetch')
6
6
  const isExe = require('isexe')
7
+ const terminalLink = require('terminal-link')
7
8
 
8
9
  // cannot directly import from ../utils as it would create a circular dependency.
9
10
  // the file `src/utils/live-tunnel.js` depends on this file
10
- const { NETLIFYDEVWARN, log } = require('../utils/command-helpers')
11
+ const { NETLIFYDEVWARN, chalk, error, log } = require('../utils/command-helpers')
11
12
  const execa = require('../utils/execa')
12
13
 
13
14
  const isWindows = () => process.platform === 'win32'
@@ -62,27 +63,80 @@ const shouldFetchLatestVersion = async ({ binPath, execArgs, execName, latestVer
62
63
  latestVersion,
63
64
  })
64
65
  return outdated
65
- } catch (error) {
66
+ } catch (error_) {
66
67
  if (exists) {
67
68
  log(NETLIFYDEVWARN, `failed checking for new version of '${packageName}'. Using existing version`)
68
69
  return false
69
70
  }
70
- throw error
71
+ throw error_
71
72
  }
72
73
  }
73
74
 
75
+ const getArch = () => {
76
+ switch (process.arch) {
77
+ case 'x64':
78
+ return 'amd64'
79
+ case 'ia32':
80
+ return '386'
81
+ default:
82
+ return process.arch
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Tries to get the latest release from the github releases to download the binary.
88
+ * Is throwing an error if there is no binary that matches the system os or arch
89
+ * @param {object} config
90
+ * @param {string} config.destination
91
+ * @param {string} config.execName
92
+ * @param {string} config.destination
93
+ * @param {string} config.extension
94
+ * @param {string} config.packageName
95
+ * @param {string} [config.latestVersion ]
96
+ */
74
97
  const fetchLatestVersion = async ({ destination, execName, extension, latestVersion, packageName }) => {
75
98
  const win = isWindows()
99
+ const arch = getArch()
76
100
  const platform = win ? 'windows' : process.platform
101
+ const pkgName = `${execName}-${platform}-${arch}.${extension}`
102
+
77
103
  const release = {
78
104
  repository: getRepository({ packageName }),
79
- package: `${execName}-${platform}-amd64.${extension}`,
105
+ package: pkgName,
80
106
  destination,
81
107
  extract: true,
82
108
  }
83
109
 
84
110
  const options = getOptions()
85
- await (latestVersion ? fetchVersion({ ...release, version: latestVersion }, options) : fetchLatest(release, options))
111
+ const fetch = latestVersion
112
+ ? fetchVersion({ ...release, version: latestVersion }, options)
113
+ : fetchLatest(release, options)
114
+
115
+ try {
116
+ await fetch
117
+ } catch (error_) {
118
+ if (typeof error_ === 'object' && 'statusCode' in error_ && error_.statusCode === 404) {
119
+ const createIssueLink = new URL('https://github.com/netlify/cli/issues/new')
120
+ createIssueLink.searchParams.set('assignees', '')
121
+ createIssueLink.searchParams.set('labels', 'type: bug')
122
+ createIssueLink.searchParams.set('template', 'bug_report.md')
123
+ createIssueLink.searchParams.set(
124
+ 'title',
125
+ `${execName} is not supported on ${platform} with CPU architecture ${arch}`,
126
+ )
127
+
128
+ const issueLink = terminalLink('Create a new CLI issue', createIssueLink.href)
129
+
130
+ error(`The operating system ${chalk.cyan(platform)} with the CPU architecture ${chalk.cyan(
131
+ arch,
132
+ )} is currently not supported!
133
+
134
+ Please open up an issue on our CLI repository so that we can support it:
135
+ ${issueLink}`)
136
+ }
137
+
138
+ error(error_)
139
+ }
86
140
  }
87
141
 
88
- module.exports = { getExecName, shouldFetchLatestVersion, fetchLatestVersion }
142
+ module.exports = { getArch, getExecName, shouldFetchLatestVersion, fetchLatestVersion }
@@ -179,7 +179,7 @@ const error = (message = '', options = {}) => {
179
179
  if (process.env.DEBUG) {
180
180
  process.stderr.write(` ${bang} Warning: ${err.stack.split('\n').join(`\n ${bang} `)}`)
181
181
  } else {
182
- process.stderr.write(` ${bang} ${err.name}: ${err.message}\n`)
182
+ process.stderr.write(` ${bang} ${chalk.red(`${err.name}:`)} ${err.message}\n`)
183
183
  }
184
184
  } else {
185
185
  throw err
@@ -3,7 +3,7 @@ const { EOL } = require('os')
3
3
  const path = require('path')
4
4
  const process = require('process')
5
5
 
6
- const { getFramework, listFrameworks } = require('@netlify/framework-info')
6
+ const frameworkInfoPromise = import('@netlify/framework-info')
7
7
  const fuzzy = require('fuzzy')
8
8
  const getPort = require('get-port')
9
9
  const isPlainObject = require('is-plain-obj')
@@ -182,6 +182,7 @@ const getSettingsFromFramework = (framework) => {
182
182
  const hasDevCommand = (framework) => Array.isArray(framework.dev.commands) && framework.dev.commands.length !== 0
183
183
 
184
184
  const detectFrameworkSettings = async ({ projectDir }) => {
185
+ const { listFrameworks } = await frameworkInfoPromise
185
186
  const projectFrameworks = await listFrameworks({ projectDir })
186
187
  const frameworks = projectFrameworks.filter((framework) => hasDevCommand(framework))
187
188
 
@@ -276,6 +277,7 @@ const mergeSettings = async ({ devConfig, frameworkSettings = {} }) => {
276
277
  */
277
278
  const handleForcedFramework = async ({ devConfig, projectDir }) => {
278
279
  // this throws if `devConfig.framework` is not a supported framework
280
+ const { getFramework } = await frameworkInfoPromise
279
281
  const frameworkSettings = getSettingsFromFramework(await getFramework(devConfig.framework, { projectDir }))
280
282
  return mergeSettings({ devConfig, frameworkSettings })
281
283
  }
@@ -1,7 +1,8 @@
1
1
  // @ts-check
2
- const { listFrameworks } = require('@netlify/framework-info')
2
+ const frameworkInfoPromise = import('@netlify/framework-info')
3
3
 
4
4
  const getFrameworkInfo = async ({ baseDirectory, nodeVersion }) => {
5
+ const { listFrameworks } = await frameworkInfoPromise
5
6
  const frameworks = await listFrameworks({ projectDir: baseDirectory, nodeVersion })
6
7
  // several frameworks can be detected - first one has highest priority
7
8
  if (frameworks.length !== 0) {