netlify-cli 8.9.8 → 8.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,23 +1,23 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "8.9.8",
3
+ "version": "8.10.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "8.9.8",
9
+ "version": "8.10.1",
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
15
  "@netlify/framework-info": "^8.0.2",
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",
19
19
  "@netlify/routing-local-proxy": "^0.34.1",
20
- "@netlify/zip-it-and-ship-it": "^5.4.0",
20
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
21
21
  "@octokit/rest": "^18.0.0",
22
22
  "@sindresorhus/slugify": "^1.1.0",
23
23
  "ansi-escapes": "^5.0.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": {
@@ -3162,9 +3178,9 @@
3162
3178
  }
3163
3179
  },
3164
3180
  "node_modules/@netlify/zip-it-and-ship-it": {
3165
- "version": "5.4.0",
3166
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.0.tgz",
3167
- "integrity": "sha512-JVUr7S6GTHnPpwtD+g/+qzhKvhXwXoHGeisaHt1YYARRRd+XdvwFYo8yY2JzT7hM26uz99tpKwzDSfcL+WR1rQ==",
3181
+ "version": "5.4.1",
3182
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.1.tgz",
3183
+ "integrity": "sha512-ArusY1DrK+neNs1EF8vHbBHCBP4PI9fFVQxH1Zcuz0rvF9Q1vCiG2g8nL6JsJTW4eUibvy96BGD22egOvxpxtA==",
3168
3184
  "dependencies": {
3169
3185
  "@babel/parser": "^7.15.7",
3170
3186
  "@netlify/esbuild": "^0.13.6",
@@ -3183,7 +3199,6 @@
3183
3199
  "is-builtin-module": "^3.1.0",
3184
3200
  "junk": "^3.1.0",
3185
3201
  "locate-path": "^6.0.0",
3186
- "make-dir": "^3.1.0",
3187
3202
  "merge-options": "^3.0.4",
3188
3203
  "minimatch": "^3.0.4",
3189
3204
  "p-map": "^4.0.0",
@@ -10433,6 +10448,19 @@
10433
10448
  "node": ">=6"
10434
10449
  }
10435
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
+ },
10436
10464
  "node_modules/fill-range": {
10437
10465
  "version": "7.0.1",
10438
10466
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -14855,6 +14883,12 @@
14855
14883
  "node": ">=6.0"
14856
14884
  }
14857
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
+ },
14858
14892
  "node_modules/moize": {
14859
14893
  "version": "6.1.0",
14860
14894
  "resolved": "https://registry.npmjs.org/moize/-/moize-6.1.0.tgz",
@@ -17489,6 +17523,34 @@
17489
17523
  "node": ">= 0.10"
17490
17524
  }
17491
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
+ },
17492
17554
  "node_modules/ps-list": {
17493
17555
  "version": "7.2.0",
17494
17556
  "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-7.2.0.tgz",
@@ -23647,9 +23709,9 @@
23647
23709
  }
23648
23710
  },
23649
23711
  "@netlify/build": {
23650
- "version": "26.1.4",
23651
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.4.tgz",
23652
- "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==",
23653
23715
  "requires": {
23654
23716
  "@bugsnag/js": "^7.0.0",
23655
23717
  "@netlify/cache-utils": "^4.0.0",
@@ -23659,8 +23721,9 @@
23659
23721
  "@netlify/plugin-edge-handlers": "^3.0.4",
23660
23722
  "@netlify/plugins-list": "^6.3.0",
23661
23723
  "@netlify/run-utils": "^4.0.0",
23662
- "@netlify/zip-it-and-ship-it": "^5.4.0",
23724
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
23663
23725
  "@sindresorhus/slugify": "^1.1.0",
23726
+ "@types/node": "^16.0.0",
23664
23727
  "ansi-escapes": "^4.3.2",
23665
23728
  "chalk": "^4.1.2",
23666
23729
  "clean-stack": "^3.0.1",
@@ -23699,9 +23762,10 @@
23699
23762
  "supports-color": "^8.0.0",
23700
23763
  "tmp-promise": "^3.0.2",
23701
23764
  "ts-node": "^10.4.0",
23765
+ "typescript": "^4.5.4",
23702
23766
  "update-notifier": "^5.0.0",
23703
23767
  "uuid": "^8.0.0",
23704
- "yargs": "^16.0.0"
23768
+ "yargs": "^17.3.1"
23705
23769
  },
23706
23770
  "dependencies": {
23707
23771
  "@sindresorhus/is": {
@@ -23709,6 +23773,11 @@
23709
23773
  "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
23710
23774
  "integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg=="
23711
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
+ },
23712
23781
  "ansi-escapes": {
23713
23782
  "version": "4.3.2",
23714
23783
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -23802,18 +23871,23 @@
23802
23871
  "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
23803
23872
  },
23804
23873
  "yargs": {
23805
- "version": "16.2.0",
23806
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
23807
- "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==",
23808
23877
  "requires": {
23809
23878
  "cliui": "^7.0.2",
23810
23879
  "escalade": "^3.1.1",
23811
23880
  "get-caller-file": "^2.0.5",
23812
23881
  "require-directory": "^2.1.1",
23813
- "string-width": "^4.2.0",
23882
+ "string-width": "^4.2.3",
23814
23883
  "y18n": "^5.0.5",
23815
- "yargs-parser": "^20.2.2"
23884
+ "yargs-parser": "^21.0.0"
23816
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=="
23817
23891
  }
23818
23892
  }
23819
23893
  },
@@ -24182,9 +24256,9 @@
24182
24256
  }
24183
24257
  },
24184
24258
  "@netlify/zip-it-and-ship-it": {
24185
- "version": "5.4.0",
24186
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.0.tgz",
24187
- "integrity": "sha512-JVUr7S6GTHnPpwtD+g/+qzhKvhXwXoHGeisaHt1YYARRRd+XdvwFYo8yY2JzT7hM26uz99tpKwzDSfcL+WR1rQ==",
24259
+ "version": "5.4.1",
24260
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.1.tgz",
24261
+ "integrity": "sha512-ArusY1DrK+neNs1EF8vHbBHCBP4PI9fFVQxH1Zcuz0rvF9Q1vCiG2g8nL6JsJTW4eUibvy96BGD22egOvxpxtA==",
24188
24262
  "requires": {
24189
24263
  "@babel/parser": "^7.15.7",
24190
24264
  "@netlify/esbuild": "^0.13.6",
@@ -24203,7 +24277,6 @@
24203
24277
  "is-builtin-module": "^3.1.0",
24204
24278
  "junk": "^3.1.0",
24205
24279
  "locate-path": "^6.0.0",
24206
- "make-dir": "^3.1.0",
24207
24280
  "merge-options": "^3.0.4",
24208
24281
  "minimatch": "^3.0.4",
24209
24282
  "p-map": "^4.0.0",
@@ -29794,6 +29867,16 @@
29794
29867
  "trim-repeated": "^1.0.0"
29795
29868
  }
29796
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
+ },
29797
29880
  "fill-range": {
29798
29881
  "version": "7.0.1",
29799
29882
  "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -33100,6 +33183,12 @@
33100
33183
  "node-source-walk": "^4.0.0"
33101
33184
  }
33102
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
+ },
33103
33192
  "moize": {
33104
33193
  "version": "6.1.0",
33105
33194
  "resolved": "https://registry.npmjs.org/moize/-/moize-6.1.0.tgz",
@@ -35109,6 +35198,30 @@
35109
35198
  "ipaddr.js": "1.9.1"
35110
35199
  }
35111
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
+ },
35112
35225
  "ps-list": {
35113
35226
  "version": "7.2.0",
35114
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.8",
4
+ "version": "8.10.1",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
@@ -76,14 +76,14 @@
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
81
  "@netlify/framework-info": "^8.0.2",
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",
85
85
  "@netlify/routing-local-proxy": "^0.34.1",
86
- "@netlify/zip-it-and-ship-it": "^5.4.0",
86
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
87
87
  "@octokit/rest": "^18.0.0",
88
88
  "@sindresorhus/slugify": "^1.1.0",
89
89
  "ansi-escapes": "^5.0.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