netlify-cli 10.3.0 → 10.4.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "10.3.0",
4
+ "version": "10.4.0",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Abraham Schilling <AbrahamSchilling@gmail.com> (https://gitlab.com/n4bb12)",
@@ -13,7 +13,6 @@
13
13
  "Ardie Wen",
14
14
  "Arthur Puyou <arthur@puyou.fr> (https://twitter.com/apuyou)",
15
15
  "Ashal Farhan",
16
- "Axel Fuhrmann (https://twitter.com/axelfuh)",
17
16
  "Battulga Tsogtgerel <theonlytulga@gmail.com>",
18
17
  "Be <be.0@gmx.com> (https://beasintheverb.me/)",
19
18
  "Benaiah Mischenko <benaiah@mischenko.com> (https://benaiah.me)",
@@ -30,6 +29,7 @@
30
29
  "Cole Bosmann",
31
30
  "Dan Croak (https://twitter.com/croaky)",
32
31
  "Dan Loewenherz <dan@lionheartsw.com> (https://twitter.com/dwlz)",
32
+ "Daniel Tschinder (https://twitter.com/TschinderDaniel)",
33
33
  "Daniel Woelfel <dwwoelfel@gmail.com> (https://twitter.com/danielwoelfel)",
34
34
  "Dave Ackerman <dmackerman@gmail.com>",
35
35
  "David Calavera <david@netlify.com> (https://twitter.com/calavera)",
@@ -122,6 +122,7 @@
122
122
  "Tim Perry (https://twitter.com/pimterry)",
123
123
  "Tim Trautman (timtrautman.com)",
124
124
  "Tom Dyson (https://wagtail.io/)",
125
+ "Tom Hu (https://twitter.com/thomasrockhu)",
125
126
  "Travis Horn <travis@travishorn.com> (https://twitter.com/horn_travis)",
126
127
  "Try Ajitiono <ballinst@gmail.com> (https://twitter.com/Ajiballinst)",
127
128
  "Victor Dadfar",
@@ -208,13 +209,13 @@
208
209
  "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!**/*/package-lock.json\" \"!.github/**/*.md\""
209
210
  },
210
211
  "dependencies": {
211
- "@netlify/build": "^27.1.1",
212
- "@netlify/config": "^18.0.0",
213
- "@netlify/edge-bundler": "^1.1.0",
212
+ "@netlify/build": "^27.1.3",
213
+ "@netlify/config": "^18.0.1",
214
+ "@netlify/edge-bundler": "^1.2.0",
214
215
  "@netlify/framework-info": "^9.0.2",
215
216
  "@netlify/local-functions-proxy": "^1.1.1",
216
- "@netlify/plugins-list": "^6.19.0",
217
- "@netlify/zip-it-and-ship-it": "^5.9.0",
217
+ "@netlify/plugins-list": "^6.26.0",
218
+ "@netlify/zip-it-and-ship-it": "^5.9.2",
218
219
  "@octokit/rest": "^18.0.0",
219
220
  "@sindresorhus/slugify": "^1.1.0",
220
221
  "ansi-escapes": "^5.0.0",
@@ -27,6 +27,7 @@ const {
27
27
  readGraphQLOperationsSourceFile,
28
28
  } = require('../../lib/one-graph/cli-netlify-graph')
29
29
  const {
30
+ BANG,
30
31
  NETLIFYDEV,
31
32
  NETLIFYDEVERR,
32
33
  NETLIFYDEVLOG,
@@ -195,11 +196,19 @@ const startFrameworkServer = async function ({ settings }) {
195
196
  // 10 minutes
196
197
  const FRAMEWORK_PORT_TIMEOUT = 6e5
197
198
 
199
+ /**
200
+ * @typedef {Object} InspectSettings
201
+ * @property {boolean} enabled - Inspect enabled
202
+ * @property {boolean} pause - Pause on breakpoints
203
+ * @property {string|undefined} address - Host/port override (optional)
204
+ */
205
+
198
206
  /**
199
207
  *
200
208
  * @param {object} params
201
209
  * @param {*} params.addonsUrls
202
210
  * @param {import('../base-command').NetlifyOptions["config"]} params.config
211
+ * @param {InspectSettings} params.inspectSettings
203
212
  * @param {() => Promise<object>} params.getUpdatedConfig
204
213
  * @param {string} params.geolocationMode
205
214
  * @param {*} params.settings
@@ -213,6 +222,7 @@ const startProxyServer = async ({
213
222
  config,
214
223
  geolocationMode,
215
224
  getUpdatedConfig,
225
+ inspectSettings,
216
226
  offline,
217
227
  settings,
218
228
  site,
@@ -224,6 +234,7 @@ const startProxyServer = async ({
224
234
  configPath: site.configPath,
225
235
  geolocationMode,
226
236
  getUpdatedConfig,
237
+ inspectSettings,
227
238
  offline,
228
239
  projectDir: site.root,
229
240
  settings,
@@ -312,6 +323,46 @@ const startPollingForAPIAuthentication = async function (options) {
312
323
  await helper(siteInfo)
313
324
  }
314
325
 
326
+ /**
327
+ * @param {boolean|string} edgeInspect
328
+ * @param {boolean|string} edgeInspectBrk
329
+ * @returns {InspectSettings}
330
+ */
331
+ const generateInspectSettings = (edgeInspect, edgeInspectBrk) => {
332
+ const enabled = Boolean(edgeInspect) || Boolean(edgeInspectBrk)
333
+ const pause = Boolean(edgeInspectBrk)
334
+ const getAddress = () => {
335
+ if (edgeInspect) {
336
+ return typeof edgeInspect === 'string' ? edgeInspect : undefined
337
+ }
338
+ if (edgeInspectBrk) {
339
+ return typeof edgeInspectBrk === 'string' ? edgeInspectBrk : undefined
340
+ }
341
+ }
342
+
343
+ return {
344
+ enabled,
345
+ pause,
346
+ address: getAddress(),
347
+ }
348
+ }
349
+
350
+ const validateShortFlagArgs = (args) => {
351
+ if (args.startsWith('=')) {
352
+ throw new Error(
353
+ `Short flag options like -e or -E don't support the '=' sign
354
+ ${chalk.red(BANG)} Supported formats:
355
+ netlify dev -e
356
+ netlify dev -e 127.0.0.1:9229
357
+ netlify dev -e127.0.0.1:9229
358
+ netlify dev -E
359
+ netlify dev -E 127.0.0.1:9229
360
+ netlify dev -E127.0.0.1:9229`,
361
+ )
362
+ }
363
+ return args
364
+ }
365
+
315
366
  /**
316
367
  * The dev command
317
368
  * @param {import('commander').OptionValues} options
@@ -380,11 +431,14 @@ const dev = async (options, command) => {
380
431
  return normalizedNewConfig
381
432
  }
382
433
 
434
+ const inspectSettings = generateInspectSettings(options.edgeInspect, options.edgeInspectBrk)
435
+
383
436
  let url = await startProxyServer({
384
437
  addonsUrls,
385
438
  config,
386
439
  geolocationMode: options.geo,
387
440
  getUpdatedConfig,
441
+ inspectSettings,
388
442
  offline: options.offline,
389
443
  settings,
390
444
  site,
@@ -522,11 +576,31 @@ const createDevCommand = (program) => {
522
576
  .hideHelp(),
523
577
  )
524
578
  .addOption(new Option('--graph', 'enable Netlify Graph support').hideHelp())
579
+ .addOption(
580
+ new Option(
581
+ '-e, --edgeInspect [address]',
582
+ 'enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format',
583
+ )
584
+ .conflicts('edgeInspectBrk')
585
+ .argParser(validateShortFlagArgs),
586
+ )
587
+ .addOption(
588
+ new Option(
589
+ '-E, --edgeInspectBrk [address]',
590
+ 'enable the V8 Inspector Protocol for Edge Functions and pause execution on the first line of code, with an optional address in the host:port format',
591
+ )
592
+ .conflicts('edgeInspect')
593
+ .argParser(validateShortFlagArgs),
594
+ )
525
595
  .addExamples([
526
596
  'netlify dev',
527
597
  'netlify dev -d public',
528
598
  'netlify dev -c "hugo server -w" --targetPort 1313',
529
599
  'netlify dev --graph',
600
+ 'netlify dev --edgeInspect',
601
+ 'netlify dev --edgeInspect=127.0.0.1:9229',
602
+ 'netlify dev --edgeInspectBrk',
603
+ 'netlify dev --edgeInspectBrk=127.0.0.1:9229',
530
604
  'BROWSER=none netlify dev # disable browser auto opening',
531
605
  ])
532
606
  .action(dev)
@@ -2,4 +2,4 @@ module github.com/someone/{{name}}
2
2
 
3
3
  go 1.15
4
4
 
5
- require github.com/aws/aws-lambda-go v1.30.0
5
+ require github.com/aws/aws-lambda-go v1.31.1
@@ -2,4 +2,4 @@ module github.com/your-github-handle/{{name}}
2
2
 
3
3
  go 1.17
4
4
 
5
- require github.com/aws/aws-lambda-go v1.30.0
5
+ require github.com/aws/aws-lambda-go v1.31.1
@@ -15,7 +15,7 @@
15
15
  "author": "Netlify",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "axios": "^0.26.0",
18
+ "axios": "^0.27.0",
19
19
  "bad-words": "^3.0.3"
20
20
  }
21
21
  }
@@ -105,9 +105,9 @@
105
105
  }
106
106
  },
107
107
  "node_modules/stripe": {
108
- "version": "8.217.0",
109
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.217.0.tgz",
110
- "integrity": "sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA==",
108
+ "version": "8.222.0",
109
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.222.0.tgz",
110
+ "integrity": "sha512-hrA79fjmN2Eb6K3kxkDzU4ODeVGGjXQsuVaAPSUro6I9MM3X+BvIsVqdphm3BXWfimAGFvUqWtPtHy25mICY1w==",
111
111
  "dependencies": {
112
112
  "@types/node": ">=8.1.0",
113
113
  "qs": "^6.10.3"
@@ -184,9 +184,9 @@
184
184
  }
185
185
  },
186
186
  "stripe": {
187
- "version": "8.217.0",
188
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.217.0.tgz",
189
- "integrity": "sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA==",
187
+ "version": "8.222.0",
188
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.222.0.tgz",
189
+ "integrity": "sha512-hrA79fjmN2Eb6K3kxkDzU4ODeVGGjXQsuVaAPSUro6I9MM3X+BvIsVqdphm3BXWfimAGFvUqWtPtHy25mICY1w==",
190
190
  "requires": {
191
191
  "@types/node": ">=8.1.0",
192
192
  "qs": "^6.10.3"
@@ -105,9 +105,9 @@
105
105
  }
106
106
  },
107
107
  "node_modules/stripe": {
108
- "version": "8.217.0",
109
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.217.0.tgz",
110
- "integrity": "sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA==",
108
+ "version": "8.222.0",
109
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.222.0.tgz",
110
+ "integrity": "sha512-hrA79fjmN2Eb6K3kxkDzU4ODeVGGjXQsuVaAPSUro6I9MM3X+BvIsVqdphm3BXWfimAGFvUqWtPtHy25mICY1w==",
111
111
  "dependencies": {
112
112
  "@types/node": ">=8.1.0",
113
113
  "qs": "^6.10.3"
@@ -184,9 +184,9 @@
184
184
  }
185
185
  },
186
186
  "stripe": {
187
- "version": "8.217.0",
188
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.217.0.tgz",
189
- "integrity": "sha512-CHWazNOrb1EBxTpepv5hCKMxOwF/oW3E4zRi8/LZIy5FC2y7A7NzcuE1aErYXLId3bKPe20HOmWKvjDRU2bXaA==",
187
+ "version": "8.222.0",
188
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.222.0.tgz",
189
+ "integrity": "sha512-hrA79fjmN2Eb6K3kxkDzU4ODeVGGjXQsuVaAPSUro6I9MM3X+BvIsVqdphm3BXWfimAGFvUqWtPtHy25mICY1w==",
190
190
  "requires": {
191
191
  "@types/node": ">=8.1.0",
192
192
  "qs": "^6.10.3"
@@ -9,16 +9,22 @@
9
9
  "version": "1.0.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "axios": "^0.26.1",
12
+ "axios": "^0.27.0",
13
13
  "qs": "^6.7.0"
14
14
  }
15
15
  },
16
+ "node_modules/asynckit": {
17
+ "version": "0.4.0",
18
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
19
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
20
+ },
16
21
  "node_modules/axios": {
17
- "version": "0.26.1",
18
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
19
- "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
22
+ "version": "0.27.2",
23
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
24
+ "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
20
25
  "dependencies": {
21
- "follow-redirects": "^1.14.8"
26
+ "follow-redirects": "^1.14.9",
27
+ "form-data": "^4.0.0"
22
28
  }
23
29
  },
24
30
  "node_modules/call-bind": {
@@ -33,10 +39,29 @@
33
39
  "url": "https://github.com/sponsors/ljharb"
34
40
  }
35
41
  },
42
+ "node_modules/combined-stream": {
43
+ "version": "1.0.8",
44
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
45
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
46
+ "dependencies": {
47
+ "delayed-stream": "~1.0.0"
48
+ },
49
+ "engines": {
50
+ "node": ">= 0.8"
51
+ }
52
+ },
53
+ "node_modules/delayed-stream": {
54
+ "version": "1.0.0",
55
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
56
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
57
+ "engines": {
58
+ "node": ">=0.4.0"
59
+ }
60
+ },
36
61
  "node_modules/follow-redirects": {
37
- "version": "1.14.8",
38
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
39
- "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
62
+ "version": "1.15.0",
63
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz",
64
+ "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==",
40
65
  "funding": [
41
66
  {
42
67
  "type": "individual",
@@ -52,6 +77,19 @@
52
77
  }
53
78
  }
54
79
  },
80
+ "node_modules/form-data": {
81
+ "version": "4.0.0",
82
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
83
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
84
+ "dependencies": {
85
+ "asynckit": "^0.4.0",
86
+ "combined-stream": "^1.0.8",
87
+ "mime-types": "^2.1.12"
88
+ },
89
+ "engines": {
90
+ "node": ">= 6"
91
+ }
92
+ },
55
93
  "node_modules/function-bind": {
56
94
  "version": "1.1.1",
57
95
  "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -92,6 +130,25 @@
92
130
  "url": "https://github.com/sponsors/ljharb"
93
131
  }
94
132
  },
133
+ "node_modules/mime-db": {
134
+ "version": "1.52.0",
135
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
136
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
137
+ "engines": {
138
+ "node": ">= 0.6"
139
+ }
140
+ },
141
+ "node_modules/mime-types": {
142
+ "version": "2.1.35",
143
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
144
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
145
+ "dependencies": {
146
+ "mime-db": "1.52.0"
147
+ },
148
+ "engines": {
149
+ "node": ">= 0.6"
150
+ }
151
+ },
95
152
  "node_modules/object-inspect": {
96
153
  "version": "1.12.0",
97
154
  "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
@@ -129,12 +186,18 @@
129
186
  }
130
187
  },
131
188
  "dependencies": {
189
+ "asynckit": {
190
+ "version": "0.4.0",
191
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
192
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
193
+ },
132
194
  "axios": {
133
- "version": "0.26.1",
134
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
135
- "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
195
+ "version": "0.27.2",
196
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
197
+ "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
136
198
  "requires": {
137
- "follow-redirects": "^1.14.8"
199
+ "follow-redirects": "^1.14.9",
200
+ "form-data": "^4.0.0"
138
201
  }
139
202
  },
140
203
  "call-bind": {
@@ -146,10 +209,33 @@
146
209
  "get-intrinsic": "^1.0.2"
147
210
  }
148
211
  },
212
+ "combined-stream": {
213
+ "version": "1.0.8",
214
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
215
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
216
+ "requires": {
217
+ "delayed-stream": "~1.0.0"
218
+ }
219
+ },
220
+ "delayed-stream": {
221
+ "version": "1.0.0",
222
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
223
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
224
+ },
149
225
  "follow-redirects": {
150
- "version": "1.14.8",
151
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
152
- "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA=="
226
+ "version": "1.15.0",
227
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz",
228
+ "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ=="
229
+ },
230
+ "form-data": {
231
+ "version": "4.0.0",
232
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
233
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
234
+ "requires": {
235
+ "asynckit": "^0.4.0",
236
+ "combined-stream": "^1.0.8",
237
+ "mime-types": "^2.1.12"
238
+ }
153
239
  },
154
240
  "function-bind": {
155
241
  "version": "1.1.1",
@@ -179,6 +265,19 @@
179
265
  "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
180
266
  "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
181
267
  },
268
+ "mime-db": {
269
+ "version": "1.52.0",
270
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
271
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
272
+ },
273
+ "mime-types": {
274
+ "version": "2.1.35",
275
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
276
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
277
+ "requires": {
278
+ "mime-db": "1.52.0"
279
+ }
280
+ },
182
281
  "object-inspect": {
183
282
  "version": "1.12.0",
184
283
  "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
@@ -15,7 +15,7 @@
15
15
  "author": "Netlify",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "axios": "^0.26.0",
18
+ "axios": "^0.27.0",
19
19
  "qs": "^6.7.0"
20
20
  }
21
21
  }
@@ -6,9 +6,9 @@ version = "0.1.0"
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
 
8
8
  [dependencies]
9
- aws_lambda_events = "0.5.0"
10
- http = "0.2.6"
9
+ aws_lambda_events = "0.6.3"
10
+ http = "0.2.7"
11
11
  lambda_runtime = "0.5.1"
12
- log = "0.4.16"
12
+ log = "0.4.17"
13
13
  simple_logger = "1.16.0"
14
- tokio = "1.17.0"
14
+ tokio = "1.18.2"
@@ -26,9 +26,9 @@
26
26
  }
27
27
  },
28
28
  "node_modules/@types/node": {
29
- "version": "14.18.13",
30
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.13.tgz",
31
- "integrity": "sha512-Z6/KzgyWOga3pJNS42A+zayjhPbf2zM3hegRQaOPnLOzEi86VV++6FLDWgR1LGrVCRufP/ph2daa3tEa5br1zA=="
29
+ "version": "14.18.18",
30
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz",
31
+ "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig=="
32
32
  },
33
33
  "node_modules/is-promise": {
34
34
  "version": "4.0.0",
@@ -36,9 +36,9 @@
36
36
  "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
37
37
  },
38
38
  "node_modules/typescript": {
39
- "version": "4.6.3",
40
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
41
- "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
39
+ "version": "4.6.4",
40
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
41
+ "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==",
42
42
  "bin": {
43
43
  "tsc": "bin/tsc",
44
44
  "tsserver": "bin/tsserver"
@@ -58,9 +58,9 @@
58
58
  }
59
59
  },
60
60
  "@types/node": {
61
- "version": "14.18.13",
62
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.13.tgz",
63
- "integrity": "sha512-Z6/KzgyWOga3pJNS42A+zayjhPbf2zM3hegRQaOPnLOzEi86VV++6FLDWgR1LGrVCRufP/ph2daa3tEa5br1zA=="
61
+ "version": "14.18.18",
62
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz",
63
+ "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig=="
64
64
  },
65
65
  "is-promise": {
66
66
  "version": "4.0.0",
@@ -68,9 +68,9 @@
68
68
  "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
69
69
  },
70
70
  "typescript": {
71
- "version": "4.6.3",
72
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
73
- "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw=="
71
+ "version": "4.6.4",
72
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
73
+ "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg=="
74
74
  }
75
75
  }
76
76
  }
@@ -47,6 +47,7 @@ const initializeProxy = async ({
47
47
  configPath,
48
48
  geolocationMode,
49
49
  getUpdatedConfig,
50
+ inspectSettings,
50
51
  offline,
51
52
  projectDir,
52
53
  settings,
@@ -67,6 +68,7 @@ const initializeProxy = async ({
67
68
  directories: [internalFunctionsPath, userFunctionsPath].filter(Boolean),
68
69
  getUpdatedConfig,
69
70
  importMaps: [importMap].filter(Boolean),
71
+ inspectSettings,
70
72
  internalFunctions,
71
73
  port: isolatePort,
72
74
  projectDir,
@@ -133,6 +135,7 @@ const prepareServer = async ({
133
135
  directories,
134
136
  getUpdatedConfig,
135
137
  importMaps,
138
+ inspectSettings,
136
139
  internalFunctions,
137
140
  port,
138
141
  projectDir,
@@ -150,6 +153,7 @@ const prepareServer = async ({
150
153
  )}. The file does not seem to have a function as the default export.`,
151
154
  formatImportError: (name) => `${NETLIFYDEVERR} ${chalk.red('Failed')} to run Edge Function ${chalk.yellow(name)}:`,
152
155
  importMaps,
156
+ inspectSettings,
153
157
  port,
154
158
  })
155
159
  const registry = new EdgeFunctionsRegistry({
@@ -137,8 +137,9 @@ class NetlifyFunction {
137
137
  // Not sure why `settings.port` was used here nor does a valid reference exist.
138
138
  // However, it remains here to serve whatever purpose for which it was added.
139
139
  const port = this.settings.port || this.settings.functionsPort
140
+ const protocol = this.settings.https ? 'https' : 'http'
141
+ const url = new URL(`/.netlify/functions/${this.name}`, `${protocol}://localhost:${port}`)
140
142
 
141
- const url = new URL(`/.netlify/functions/${this.name}`, `http://localhost:${port}`)
142
143
  return url.href
143
144
  }
144
145
  }
@@ -55,11 +55,12 @@ const invokeFunction = async ({ context, event, func, timeout }) => {
55
55
  })
56
56
 
57
57
  try {
58
- const { body, headers, statusCode } = JSON.parse(stdout)
58
+ const { body, headers, multiValueHeaders, statusCode } = JSON.parse(stdout)
59
59
 
60
60
  return {
61
61
  body,
62
62
  headers,
63
+ multiValueHeaders,
63
64
  statusCode,
64
65
  }
65
66
  } catch {
@@ -54,11 +54,12 @@ const invokeFunction = async ({ context, event, func, timeout }) => {
54
54
  })
55
55
 
56
56
  try {
57
- const { body, headers, statusCode } = JSON.parse(stdout)
57
+ const { body, headers, multiValueHeaders, statusCode } = JSON.parse(stdout)
58
58
 
59
59
  return {
60
60
  body,
61
61
  headers,
62
+ multiValueHeaders,
62
63
  statusCode,
63
64
  }
64
65
  } catch {
@@ -1,4 +1,5 @@
1
1
  // @ts-check
2
+ const { get } = require('dot-prop')
2
3
  const jwtDecode = require('jwt-decode')
3
4
 
4
5
  const {
@@ -89,7 +90,8 @@ const createHandler = function (options) {
89
90
  {},
90
91
  )
91
92
  const rawQuery = new URLSearchParams(request.query).toString()
92
- const url = new URL(requestPath, `${request.protocol}://${request.get('host') || 'localhost'}`)
93
+ const protocol = get(options, 'config.dev.https') ? 'https' : 'http'
94
+ const url = new URL(requestPath, `${protocol}://${request.get('host') || 'localhost'}`)
93
95
  url.search = rawQuery
94
96
  const rawUrl = url.toString()
95
97
  const event = {
@@ -467,6 +467,7 @@ const startProxy = async function ({
467
467
  configPath,
468
468
  geolocationMode,
469
469
  getUpdatedConfig,
470
+ inspectSettings,
470
471
  offline,
471
472
  projectDir,
472
473
  settings,
@@ -478,6 +479,7 @@ const startProxy = async function ({
478
479
  configPath,
479
480
  geolocationMode,
480
481
  getUpdatedConfig,
482
+ inspectSettings,
481
483
  offline,
482
484
  projectDir,
483
485
  settings,