netlify-cli 8.9.10 → 8.11.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.
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "8.9.10",
3
+ "version": "8.11.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "8.9.10",
9
+ "version": "8.11.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^26.1.4",
13
+ "@netlify/build": "^26.2.0",
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",
19
19
  "@netlify/routing-local-proxy": "^0.34.1",
20
- "@netlify/zip-it-and-ship-it": "^5.4.1",
20
+ "@netlify/zip-it-and-ship-it": "^5.5.0",
21
21
  "@octokit/rest": "^18.0.0",
22
22
  "@sindresorhus/slugify": "^1.1.0",
23
23
  "ansi-escapes": "^5.0.0",
@@ -2387,9 +2387,9 @@
2387
2387
  }
2388
2388
  },
2389
2389
  "node_modules/@netlify/build": {
2390
- "version": "26.1.4",
2391
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.4.tgz",
2392
- "integrity": "sha512-05NGq1kChEifsvCdqX9rw0jHMKsdbD60Nj9bOBLrByGvw5FJ92949gpazjAggfLQoaIPZTLkPGZO86L0nu/MZw==",
2390
+ "version": "26.2.0",
2391
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.0.tgz",
2392
+ "integrity": "sha512-2yNzdO0nCRIZ5TLB7WUlis2NTSonVjairWnd1s/Tt9SBF3L3Z+IU/xSiXgAwYZ/xe+tkziUltwrx9l8rxm2VGw==",
2393
2393
  "dependencies": {
2394
2394
  "@bugsnag/js": "^7.0.0",
2395
2395
  "@netlify/cache-utils": "^4.0.0",
@@ -2399,8 +2399,9 @@
2399
2399
  "@netlify/plugin-edge-handlers": "^3.0.4",
2400
2400
  "@netlify/plugins-list": "^6.3.0",
2401
2401
  "@netlify/run-utils": "^4.0.0",
2402
- "@netlify/zip-it-and-ship-it": "^5.4.0",
2402
+ "@netlify/zip-it-and-ship-it": "^5.5.0",
2403
2403
  "@sindresorhus/slugify": "^1.1.0",
2404
+ "@types/node": "^16.0.0",
2404
2405
  "ansi-escapes": "^4.3.2",
2405
2406
  "chalk": "^4.1.2",
2406
2407
  "clean-stack": "^3.0.1",
@@ -2439,9 +2440,10 @@
2439
2440
  "supports-color": "^8.0.0",
2440
2441
  "tmp-promise": "^3.0.2",
2441
2442
  "ts-node": "^10.4.0",
2443
+ "typescript": "^4.5.4",
2442
2444
  "update-notifier": "^5.0.0",
2443
2445
  "uuid": "^8.0.0",
2444
- "yargs": "^16.0.0"
2446
+ "yargs": "^17.3.1"
2445
2447
  },
2446
2448
  "bin": {
2447
2449
  "netlify-build": "src/core/bin.js"
@@ -2461,6 +2463,11 @@
2461
2463
  "url": "https://github.com/sindresorhus/is?sponsor=1"
2462
2464
  }
2463
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
+ },
2464
2471
  "node_modules/@netlify/build/node_modules/ansi-escapes": {
2465
2472
  "version": "4.3.2",
2466
2473
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -2600,20 +2607,28 @@
2600
2607
  }
2601
2608
  },
2602
2609
  "node_modules/@netlify/build/node_modules/yargs": {
2603
- "version": "16.2.0",
2604
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
2605
- "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==",
2606
2613
  "dependencies": {
2607
2614
  "cliui": "^7.0.2",
2608
2615
  "escalade": "^3.1.1",
2609
2616
  "get-caller-file": "^2.0.5",
2610
2617
  "require-directory": "^2.1.1",
2611
- "string-width": "^4.2.0",
2618
+ "string-width": "^4.2.3",
2612
2619
  "y18n": "^5.0.5",
2613
- "yargs-parser": "^20.2.2"
2620
+ "yargs-parser": "^21.0.0"
2614
2621
  },
2615
2622
  "engines": {
2616
- "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"
2617
2632
  }
2618
2633
  },
2619
2634
  "node_modules/@netlify/cache-utils": {
@@ -2787,9 +2802,9 @@
2787
2802
  }
2788
2803
  },
2789
2804
  "node_modules/@netlify/framework-info": {
2790
- "version": "8.0.2",
2791
- "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-8.0.2.tgz",
2792
- "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==",
2793
2808
  "dependencies": {
2794
2809
  "ajv": "^8.0.0",
2795
2810
  "filter-obj": "^2.0.1",
@@ -3163,9 +3178,9 @@
3163
3178
  }
3164
3179
  },
3165
3180
  "node_modules/@netlify/zip-it-and-ship-it": {
3166
- "version": "5.4.1",
3167
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.1.tgz",
3168
- "integrity": "sha512-ArusY1DrK+neNs1EF8vHbBHCBP4PI9fFVQxH1Zcuz0rvF9Q1vCiG2g8nL6JsJTW4eUibvy96BGD22egOvxpxtA==",
3181
+ "version": "5.5.0",
3182
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.5.0.tgz",
3183
+ "integrity": "sha512-V7hVGr8xwdiPF7kmH+TSvekorjFI/OTYe34dlEvEmPhEuDG3LejRjy2XzQ0hW5TpFXvd4V+JRPH4jMh85Xt6qg==",
3169
3184
  "dependencies": {
3170
3185
  "@babel/parser": "^7.15.7",
3171
3186
  "@netlify/esbuild": "^0.13.6",
@@ -23694,9 +23709,9 @@
23694
23709
  }
23695
23710
  },
23696
23711
  "@netlify/build": {
23697
- "version": "26.1.4",
23698
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.1.4.tgz",
23699
- "integrity": "sha512-05NGq1kChEifsvCdqX9rw0jHMKsdbD60Nj9bOBLrByGvw5FJ92949gpazjAggfLQoaIPZTLkPGZO86L0nu/MZw==",
23712
+ "version": "26.2.0",
23713
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.0.tgz",
23714
+ "integrity": "sha512-2yNzdO0nCRIZ5TLB7WUlis2NTSonVjairWnd1s/Tt9SBF3L3Z+IU/xSiXgAwYZ/xe+tkziUltwrx9l8rxm2VGw==",
23700
23715
  "requires": {
23701
23716
  "@bugsnag/js": "^7.0.0",
23702
23717
  "@netlify/cache-utils": "^4.0.0",
@@ -23706,8 +23721,9 @@
23706
23721
  "@netlify/plugin-edge-handlers": "^3.0.4",
23707
23722
  "@netlify/plugins-list": "^6.3.0",
23708
23723
  "@netlify/run-utils": "^4.0.0",
23709
- "@netlify/zip-it-and-ship-it": "^5.4.0",
23724
+ "@netlify/zip-it-and-ship-it": "^5.5.0",
23710
23725
  "@sindresorhus/slugify": "^1.1.0",
23726
+ "@types/node": "^16.0.0",
23711
23727
  "ansi-escapes": "^4.3.2",
23712
23728
  "chalk": "^4.1.2",
23713
23729
  "clean-stack": "^3.0.1",
@@ -23746,9 +23762,10 @@
23746
23762
  "supports-color": "^8.0.0",
23747
23763
  "tmp-promise": "^3.0.2",
23748
23764
  "ts-node": "^10.4.0",
23765
+ "typescript": "^4.5.4",
23749
23766
  "update-notifier": "^5.0.0",
23750
23767
  "uuid": "^8.0.0",
23751
- "yargs": "^16.0.0"
23768
+ "yargs": "^17.3.1"
23752
23769
  },
23753
23770
  "dependencies": {
23754
23771
  "@sindresorhus/is": {
@@ -23756,6 +23773,11 @@
23756
23773
  "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
23757
23774
  "integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg=="
23758
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
+ },
23759
23781
  "ansi-escapes": {
23760
23782
  "version": "4.3.2",
23761
23783
  "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -23849,18 +23871,23 @@
23849
23871
  "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
23850
23872
  },
23851
23873
  "yargs": {
23852
- "version": "16.2.0",
23853
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
23854
- "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==",
23855
23877
  "requires": {
23856
23878
  "cliui": "^7.0.2",
23857
23879
  "escalade": "^3.1.1",
23858
23880
  "get-caller-file": "^2.0.5",
23859
23881
  "require-directory": "^2.1.1",
23860
- "string-width": "^4.2.0",
23882
+ "string-width": "^4.2.3",
23861
23883
  "y18n": "^5.0.5",
23862
- "yargs-parser": "^20.2.2"
23884
+ "yargs-parser": "^21.0.0"
23863
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=="
23864
23891
  }
23865
23892
  }
23866
23893
  },
@@ -24008,9 +24035,9 @@
24008
24035
  }
24009
24036
  },
24010
24037
  "@netlify/framework-info": {
24011
- "version": "8.0.2",
24012
- "resolved": "https://registry.npmjs.org/@netlify/framework-info/-/framework-info-8.0.2.tgz",
24013
- "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==",
24014
24041
  "requires": {
24015
24042
  "ajv": "^8.0.0",
24016
24043
  "filter-obj": "^2.0.1",
@@ -24229,9 +24256,9 @@
24229
24256
  }
24230
24257
  },
24231
24258
  "@netlify/zip-it-and-ship-it": {
24232
- "version": "5.4.1",
24233
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.4.1.tgz",
24234
- "integrity": "sha512-ArusY1DrK+neNs1EF8vHbBHCBP4PI9fFVQxH1Zcuz0rvF9Q1vCiG2g8nL6JsJTW4eUibvy96BGD22egOvxpxtA==",
24259
+ "version": "5.5.0",
24260
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.5.0.tgz",
24261
+ "integrity": "sha512-V7hVGr8xwdiPF7kmH+TSvekorjFI/OTYe34dlEvEmPhEuDG3LejRjy2XzQ0hW5TpFXvd4V+JRPH4jMh85Xt6qg==",
24235
24262
  "requires": {
24236
24263
  "@babel/parser": "^7.15.7",
24237
24264
  "@netlify/esbuild": "^0.13.6",
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.10",
4
+ "version": "8.11.0",
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.2.0",
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",
85
85
  "@netlify/routing-local-proxy": "^0.34.1",
86
- "@netlify/zip-it-and-ship-it": "^5.4.1",
86
+ "@netlify/zip-it-and-ship-it": "^5.5.0",
87
87
  "@octokit/rest": "^18.0.0",
88
88
  "@sindresorhus/slugify": "^1.1.0",
89
89
  "ansi-escapes": "^5.0.0",
@@ -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))
@@ -13,6 +13,7 @@ const normalizeFunctionsConfig = ({ functionsConfig = {}, projectRoot }) =>
13
13
  nodeBundler: config.node_bundler === 'esbuild' ? 'esbuild_zisi' : config.node_bundler,
14
14
  processDynamicNodeImports: true,
15
15
  schedule: config.schedule,
16
+ zipGo: true,
16
17
  },
17
18
  }),
18
19
  {},
@@ -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) {