netlify-cli 12.6.0 → 12.7.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
@@ -34,6 +34,7 @@ See the [CLI command line reference](https://cli.netlify.com/commands/) to get s
34
34
  - [login](#login)
35
35
  - [open](#open)
36
36
  - [recipes](#recipes)
37
+ - [serve](#serve)
37
38
  - [sites](#sites)
38
39
  - [status](#status)
39
40
  - [switch](#switch)
@@ -219,6 +220,10 @@ Open settings for the site linked to the current folder
219
220
  | [`recipes:list`](/docs/commands/recipes.md#recipeslist) | (Beta) List the recipes available to create and modify files in a project |
220
221
 
221
222
 
223
+ ### [serve](/docs/commands/serve.md)
224
+
225
+ (Beta) Build the site for production and serve locally. This does not watch the code for changes, so if you need to rebuild your site then you must exit and run `serve` again.
226
+
222
227
  ### [sites](/docs/commands/sites.md)
223
228
 
224
229
  Handle various site operations
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "12.6.0",
3
+ "version": "12.7.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "12.6.0",
9
+ "version": "12.7.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -46,6 +46,7 @@
46
46
  "execa": "^5.0.0",
47
47
  "express": "^4.17.1",
48
48
  "express-logging": "^1.1.1",
49
+ "extract-zip": "^2.0.1",
49
50
  "fastify": "^4.10.2",
50
51
  "find-up": "^5.0.0",
51
52
  "flush-write-stream": "^2.0.0",
@@ -67,7 +68,7 @@
67
68
  "is-plain-obj": "^3.0.0",
68
69
  "is-wsl": "^2.2.0",
69
70
  "isexe": "^2.0.0",
70
- "jsonwebtoken": "^8.5.1",
71
+ "jsonwebtoken": "^9.0.0",
71
72
  "jwt-decode": "^3.0.0",
72
73
  "lambda-local": "^2.0.1",
73
74
  "listr": "^0.14.3",
@@ -5613,6 +5614,15 @@
5613
5614
  "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz",
5614
5615
  "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw=="
5615
5616
  },
5617
+ "node_modules/@types/yauzl": {
5618
+ "version": "2.10.0",
5619
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
5620
+ "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
5621
+ "optional": true,
5622
+ "dependencies": {
5623
+ "@types/node": "*"
5624
+ }
5625
+ },
5616
5626
  "node_modules/@typescript-eslint/eslint-plugin": {
5617
5627
  "version": "5.18.0",
5618
5628
  "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz",
@@ -12390,6 +12400,39 @@
12390
12400
  "node": ">=0.10.0"
12391
12401
  }
12392
12402
  },
12403
+ "node_modules/extract-zip": {
12404
+ "version": "2.0.1",
12405
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
12406
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
12407
+ "dependencies": {
12408
+ "debug": "^4.1.1",
12409
+ "get-stream": "^5.1.0",
12410
+ "yauzl": "^2.10.0"
12411
+ },
12412
+ "bin": {
12413
+ "extract-zip": "cli.js"
12414
+ },
12415
+ "engines": {
12416
+ "node": ">= 10.17.0"
12417
+ },
12418
+ "optionalDependencies": {
12419
+ "@types/yauzl": "^2.9.1"
12420
+ }
12421
+ },
12422
+ "node_modules/extract-zip/node_modules/get-stream": {
12423
+ "version": "5.2.0",
12424
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
12425
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
12426
+ "dependencies": {
12427
+ "pump": "^3.0.0"
12428
+ },
12429
+ "engines": {
12430
+ "node": ">=8"
12431
+ },
12432
+ "funding": {
12433
+ "url": "https://github.com/sponsors/sindresorhus"
12434
+ }
12435
+ },
12393
12436
  "node_modules/extsprintf": {
12394
12437
  "version": "1.3.0",
12395
12438
  "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
@@ -15345,32 +15388,18 @@
15345
15388
  }
15346
15389
  },
15347
15390
  "node_modules/jsonwebtoken": {
15348
- "version": "8.5.1",
15349
- "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
15350
- "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
15391
+ "version": "9.0.0",
15392
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
15393
+ "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
15351
15394
  "dependencies": {
15352
15395
  "jws": "^3.2.2",
15353
- "lodash.includes": "^4.3.0",
15354
- "lodash.isboolean": "^3.0.3",
15355
- "lodash.isinteger": "^4.0.4",
15356
- "lodash.isnumber": "^3.0.3",
15357
- "lodash.isplainobject": "^4.0.6",
15358
- "lodash.isstring": "^4.0.1",
15359
- "lodash.once": "^4.0.0",
15396
+ "lodash": "^4.17.21",
15360
15397
  "ms": "^2.1.1",
15361
- "semver": "^5.6.0"
15398
+ "semver": "^7.3.8"
15362
15399
  },
15363
15400
  "engines": {
15364
- "node": ">=4",
15365
- "npm": ">=1.4.28"
15366
- }
15367
- },
15368
- "node_modules/jsonwebtoken/node_modules/semver": {
15369
- "version": "5.7.1",
15370
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
15371
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
15372
- "bin": {
15373
- "semver": "bin/semver"
15401
+ "node": ">=12",
15402
+ "npm": ">=6"
15374
15403
  }
15375
15404
  },
15376
15405
  "node_modules/jsprim": {
@@ -16033,12 +16062,14 @@
16033
16062
  "node_modules/lodash.includes": {
16034
16063
  "version": "4.3.0",
16035
16064
  "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
16036
- "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
16065
+ "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=",
16066
+ "dev": true
16037
16067
  },
16038
16068
  "node_modules/lodash.isboolean": {
16039
16069
  "version": "3.0.3",
16040
16070
  "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
16041
- "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
16071
+ "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=",
16072
+ "dev": true
16042
16073
  },
16043
16074
  "node_modules/lodash.isempty": {
16044
16075
  "version": "4.4.0",
@@ -16048,12 +16079,14 @@
16048
16079
  "node_modules/lodash.isinteger": {
16049
16080
  "version": "4.0.4",
16050
16081
  "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
16051
- "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
16082
+ "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=",
16083
+ "dev": true
16052
16084
  },
16053
16085
  "node_modules/lodash.isnumber": {
16054
16086
  "version": "3.0.3",
16055
16087
  "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
16056
- "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
16088
+ "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=",
16089
+ "dev": true
16057
16090
  },
16058
16091
  "node_modules/lodash.isplainobject": {
16059
16092
  "version": "4.0.6",
@@ -16063,7 +16096,8 @@
16063
16096
  "node_modules/lodash.isstring": {
16064
16097
  "version": "4.0.1",
16065
16098
  "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
16066
- "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
16099
+ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
16100
+ "dev": true
16067
16101
  },
16068
16102
  "node_modules/lodash.merge": {
16069
16103
  "version": "4.6.2",
@@ -16074,7 +16108,8 @@
16074
16108
  "node_modules/lodash.once": {
16075
16109
  "version": "4.1.1",
16076
16110
  "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
16077
- "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
16111
+ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
16112
+ "dev": true
16078
16113
  },
16079
16114
  "node_modules/lodash.some": {
16080
16115
  "version": "4.6.0",
@@ -23920,6 +23955,37 @@
23920
23955
  "node": ">= 0.8"
23921
23956
  }
23922
23957
  },
23958
+ "node_modules/verdaccio/node_modules/jsonwebtoken": {
23959
+ "version": "8.5.1",
23960
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
23961
+ "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
23962
+ "dev": true,
23963
+ "dependencies": {
23964
+ "jws": "^3.2.2",
23965
+ "lodash.includes": "^4.3.0",
23966
+ "lodash.isboolean": "^3.0.3",
23967
+ "lodash.isinteger": "^4.0.4",
23968
+ "lodash.isnumber": "^3.0.3",
23969
+ "lodash.isplainobject": "^4.0.6",
23970
+ "lodash.isstring": "^4.0.1",
23971
+ "lodash.once": "^4.0.0",
23972
+ "ms": "^2.1.1",
23973
+ "semver": "^5.6.0"
23974
+ },
23975
+ "engines": {
23976
+ "node": ">=4",
23977
+ "npm": ">=1.4.28"
23978
+ }
23979
+ },
23980
+ "node_modules/verdaccio/node_modules/jsonwebtoken/node_modules/semver": {
23981
+ "version": "5.7.1",
23982
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
23983
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
23984
+ "dev": true,
23985
+ "bin": {
23986
+ "semver": "bin/semver"
23987
+ }
23988
+ },
23923
23989
  "node_modules/verdaccio/node_modules/lru-cache": {
23924
23990
  "version": "7.14.0",
23925
23991
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz",
@@ -28152,6 +28218,15 @@
28152
28218
  "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz",
28153
28219
  "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw=="
28154
28220
  },
28221
+ "@types/yauzl": {
28222
+ "version": "2.10.0",
28223
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
28224
+ "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
28225
+ "optional": true,
28226
+ "requires": {
28227
+ "@types/node": "*"
28228
+ }
28229
+ },
28155
28230
  "@typescript-eslint/eslint-plugin": {
28156
28231
  "version": "5.18.0",
28157
28232
  "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz",
@@ -33278,6 +33353,27 @@
33278
33353
  }
33279
33354
  }
33280
33355
  },
33356
+ "extract-zip": {
33357
+ "version": "2.0.1",
33358
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
33359
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
33360
+ "requires": {
33361
+ "@types/yauzl": "^2.9.1",
33362
+ "debug": "^4.1.1",
33363
+ "get-stream": "^5.1.0",
33364
+ "yauzl": "^2.10.0"
33365
+ },
33366
+ "dependencies": {
33367
+ "get-stream": {
33368
+ "version": "5.2.0",
33369
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
33370
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
33371
+ "requires": {
33372
+ "pump": "^3.0.0"
33373
+ }
33374
+ }
33375
+ }
33376
+ },
33281
33377
  "extsprintf": {
33282
33378
  "version": "1.3.0",
33283
33379
  "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
@@ -35452,27 +35548,14 @@
35452
35548
  }
35453
35549
  },
35454
35550
  "jsonwebtoken": {
35455
- "version": "8.5.1",
35456
- "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
35457
- "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
35551
+ "version": "9.0.0",
35552
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
35553
+ "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
35458
35554
  "requires": {
35459
35555
  "jws": "^3.2.2",
35460
- "lodash.includes": "^4.3.0",
35461
- "lodash.isboolean": "^3.0.3",
35462
- "lodash.isinteger": "^4.0.4",
35463
- "lodash.isnumber": "^3.0.3",
35464
- "lodash.isplainobject": "^4.0.6",
35465
- "lodash.isstring": "^4.0.1",
35466
- "lodash.once": "^4.0.0",
35556
+ "lodash": "^4.17.21",
35467
35557
  "ms": "^2.1.1",
35468
- "semver": "^5.6.0"
35469
- },
35470
- "dependencies": {
35471
- "semver": {
35472
- "version": "5.7.1",
35473
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
35474
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
35475
- }
35558
+ "semver": "^7.3.8"
35476
35559
  }
35477
35560
  },
35478
35561
  "jsprim": {
@@ -35991,12 +36074,14 @@
35991
36074
  "lodash.includes": {
35992
36075
  "version": "4.3.0",
35993
36076
  "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
35994
- "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
36077
+ "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=",
36078
+ "dev": true
35995
36079
  },
35996
36080
  "lodash.isboolean": {
35997
36081
  "version": "3.0.3",
35998
36082
  "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
35999
- "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
36083
+ "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=",
36084
+ "dev": true
36000
36085
  },
36001
36086
  "lodash.isempty": {
36002
36087
  "version": "4.4.0",
@@ -36006,12 +36091,14 @@
36006
36091
  "lodash.isinteger": {
36007
36092
  "version": "4.0.4",
36008
36093
  "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
36009
- "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
36094
+ "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=",
36095
+ "dev": true
36010
36096
  },
36011
36097
  "lodash.isnumber": {
36012
36098
  "version": "3.0.3",
36013
36099
  "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
36014
- "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
36100
+ "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=",
36101
+ "dev": true
36015
36102
  },
36016
36103
  "lodash.isplainobject": {
36017
36104
  "version": "4.0.6",
@@ -36021,7 +36108,8 @@
36021
36108
  "lodash.isstring": {
36022
36109
  "version": "4.0.1",
36023
36110
  "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
36024
- "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
36111
+ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
36112
+ "dev": true
36025
36113
  },
36026
36114
  "lodash.merge": {
36027
36115
  "version": "4.6.2",
@@ -36032,7 +36120,8 @@
36032
36120
  "lodash.once": {
36033
36121
  "version": "4.1.1",
36034
36122
  "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
36035
- "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
36123
+ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
36124
+ "dev": true
36036
36125
  },
36037
36126
  "lodash.some": {
36038
36127
  "version": "4.6.0",
@@ -41924,6 +42013,32 @@
41924
42013
  "toidentifier": "1.0.1"
41925
42014
  }
41926
42015
  },
42016
+ "jsonwebtoken": {
42017
+ "version": "8.5.1",
42018
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
42019
+ "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
42020
+ "dev": true,
42021
+ "requires": {
42022
+ "jws": "^3.2.2",
42023
+ "lodash.includes": "^4.3.0",
42024
+ "lodash.isboolean": "^3.0.3",
42025
+ "lodash.isinteger": "^4.0.4",
42026
+ "lodash.isnumber": "^3.0.3",
42027
+ "lodash.isplainobject": "^4.0.6",
42028
+ "lodash.isstring": "^4.0.1",
42029
+ "lodash.once": "^4.0.0",
42030
+ "ms": "^2.1.1",
42031
+ "semver": "^5.6.0"
42032
+ },
42033
+ "dependencies": {
42034
+ "semver": {
42035
+ "version": "5.7.1",
42036
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
42037
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
42038
+ "dev": true
42039
+ }
42040
+ }
42041
+ },
41927
42042
  "lru-cache": {
41928
42043
  "version": "7.14.0",
41929
42044
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.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": "12.6.0",
4
+ "version": "12.7.0",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
@@ -111,6 +111,7 @@
111
111
  "execa": "^5.0.0",
112
112
  "express": "^4.17.1",
113
113
  "express-logging": "^1.1.1",
114
+ "extract-zip": "^2.0.1",
114
115
  "fastify": "^4.10.2",
115
116
  "find-up": "^5.0.0",
116
117
  "flush-write-stream": "^2.0.0",
@@ -132,7 +133,7 @@
132
133
  "is-plain-obj": "^3.0.0",
133
134
  "is-wsl": "^2.2.0",
134
135
  "isexe": "^2.0.0",
135
- "jsonwebtoken": "^8.5.1",
136
+ "jsonwebtoken": "^9.0.0",
136
137
  "jwt-decode": "^3.0.0",
137
138
  "lambda-local": "^2.0.1",
138
139
  "listr": "^0.14.3",
@@ -469,11 +469,7 @@ export default class BaseCommand extends Command {
469
469
  return await resolveConfig({
470
470
  config: options.config,
471
471
  cwd,
472
- context:
473
- options.context ||
474
- process.env.CONTEXT ||
475
- // Dev commands have a default context of `dev`, otherwise we let netlify/config handle default behavior
476
- (['dev', 'dev:exec'].includes(this.name()) ? 'dev' : undefined),
472
+ context: options.context || process.env.CONTEXT || this.getDefaultContext(),
477
473
  debug: this.opts().debug,
478
474
  siteId: options.siteId || (typeof options.site === 'string' && options.site) || state.get('siteId'),
479
475
  token,
@@ -505,4 +501,19 @@ export default class BaseCommand extends Command {
505
501
  exit(1)
506
502
  }
507
503
  }
504
+
505
+ /**
506
+ * Returns the context that should be used in case one hasn't been explicitly
507
+ * set. The default context is `dev` most of the time, but some commands may
508
+ * wish to override that.
509
+ *
510
+ * @returns {string}
511
+ */
512
+ getDefaultContext() {
513
+ if (this.name() === 'serve') {
514
+ return 'production'
515
+ }
516
+
517
+ return 'dev'
518
+ }
508
519
  }