netlify-cli 8.6.18 → 8.6.22

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,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "8.6.18",
3
+ "version": "8.6.22",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "8.6.18",
9
+ "version": "8.6.22",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -15,7 +15,7 @@
15
15
  "@netlify/framework-info": "^8.0.0",
16
16
  "@netlify/local-functions-proxy": "^1.1.1",
17
17
  "@netlify/plugin-edge-handlers": "^3.0.2",
18
- "@netlify/plugins-list": "^6.2.0",
18
+ "@netlify/plugins-list": "^6.2.1",
19
19
  "@netlify/routing-local-proxy": "^0.34.1",
20
20
  "@netlify/zip-it-and-ship-it": "5.4.0",
21
21
  "@octokit/rest": "^18.0.0",
@@ -3322,9 +3322,9 @@
3322
3322
  "integrity": "sha512-BPAcfDPoHlRQNKktbsbnpACGdypPFBuX4xQlsWDE7B8XXcfII+SpOLay3/qZmCLb39kV5S1RTYwXdkx2lwLYng=="
3323
3323
  },
3324
3324
  "node_modules/@netlify/plugins-list": {
3325
- "version": "6.2.0",
3326
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.2.0.tgz",
3327
- "integrity": "sha512-ZkrNrq1A/pVt32XsSLye9We0v+f0yqnOMD32Yu17KoMsL6AVF0KOyiAqjuJFNOZlusTkLgmZuMAbtmriybP0AQ==",
3325
+ "version": "6.2.1",
3326
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.2.1.tgz",
3327
+ "integrity": "sha512-/sXe4hjTFgKnRDFDiqU1qLvRCc+JtOqTLFf3aMNA6Xp7bSKGtTYJFOwTpPIUUOyLaDqbBdU3IOjemc6EtyC8qg==",
3328
3328
  "engines": {
3329
3329
  "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
3330
3330
  }
@@ -16363,11 +16363,11 @@
16363
16363
  }
16364
16364
  },
16365
16365
  "node_modules/prettyjson": {
16366
- "version": "1.2.1",
16367
- "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.1.tgz",
16368
- "integrity": "sha1-/P+rQdGcq0365eV15kJGYZsS0ok=",
16366
+ "version": "1.2.5",
16367
+ "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.5.tgz",
16368
+ "integrity": "sha512-rksPWtoZb2ZpT5OVgtmy0KHVM+Dca3iVwWY9ifwhcexfjebtgjg3wmrUt9PvJ59XIYBcknQeYHD8IAnVlh9lAw==",
16369
16369
  "dependencies": {
16370
- "colors": "^1.1.2",
16370
+ "colors": "1.4.0",
16371
16371
  "minimist": "^1.2.0"
16372
16372
  },
16373
16373
  "bin": {
@@ -22350,9 +22350,9 @@
22350
22350
  }
22351
22351
  },
22352
22352
  "@netlify/plugins-list": {
22353
- "version": "6.2.0",
22354
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.2.0.tgz",
22355
- "integrity": "sha512-ZkrNrq1A/pVt32XsSLye9We0v+f0yqnOMD32Yu17KoMsL6AVF0KOyiAqjuJFNOZlusTkLgmZuMAbtmriybP0AQ=="
22353
+ "version": "6.2.1",
22354
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.2.1.tgz",
22355
+ "integrity": "sha512-/sXe4hjTFgKnRDFDiqU1qLvRCc+JtOqTLFf3aMNA6Xp7bSKGtTYJFOwTpPIUUOyLaDqbBdU3IOjemc6EtyC8qg=="
22356
22356
  },
22357
22357
  "@netlify/routing-local-proxy": {
22358
22358
  "version": "0.34.1",
@@ -32204,11 +32204,11 @@
32204
32204
  }
32205
32205
  },
32206
32206
  "prettyjson": {
32207
- "version": "1.2.1",
32208
- "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.1.tgz",
32209
- "integrity": "sha1-/P+rQdGcq0365eV15kJGYZsS0ok=",
32207
+ "version": "1.2.5",
32208
+ "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.5.tgz",
32209
+ "integrity": "sha512-rksPWtoZb2ZpT5OVgtmy0KHVM+Dca3iVwWY9ifwhcexfjebtgjg3wmrUt9PvJ59XIYBcknQeYHD8IAnVlh9lAw==",
32210
32210
  "requires": {
32211
- "colors": "^1.1.2",
32211
+ "colors": "1.4.0",
32212
32212
  "minimist": "^1.2.0"
32213
32213
  }
32214
32214
  },
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.6.18",
4
+ "version": "8.6.22",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
@@ -83,7 +83,7 @@
83
83
  "@netlify/framework-info": "^8.0.0",
84
84
  "@netlify/local-functions-proxy": "^1.1.1",
85
85
  "@netlify/plugin-edge-handlers": "^3.0.2",
86
- "@netlify/plugins-list": "^6.2.0",
86
+ "@netlify/plugins-list": "^6.2.1",
87
87
  "@netlify/routing-local-proxy": "^0.34.1",
88
88
  "@netlify/zip-it-and-ship-it": "5.4.0",
89
89
  "@octokit/rest": "^18.0.0",
@@ -23,6 +23,7 @@ const events = [
23
23
  'identity-signup',
24
24
  'identity-login',
25
25
  ]
26
+
26
27
  const eventTriggeredFunctions = new Set([...events, ...events.map((name) => `${name}${BACKGROUND}`)])
27
28
 
28
29
  const DEFAULT_PORT = 8888
@@ -186,20 +187,8 @@ const functionsInvoke = async (nameArgument, options, command) => {
186
187
  }
187
188
  } else {
188
189
  // NOT an event triggered function, but may still want to simulate authentication locally
189
- let isAuthenticated = false
190
- if (typeof options.identity === 'undefined') {
191
- const { isAuthed } = await inquirer.prompt([
192
- {
193
- type: 'confirm',
194
- name: 'isAuthed',
195
- message: `Invoke with emulated Netlify Identity authentication headers? (pass --identity/--no-identity to override)`,
196
- default: true,
197
- },
198
- ])
199
- isAuthenticated = isAuthed
200
- } else {
201
- isAuthenticated = options.identity
202
- }
190
+ const isAuthenticated = Boolean(options.identity)
191
+
203
192
  if (isAuthenticated) {
204
193
  headers = {
205
194
  authorization:
@@ -1,17 +1,19 @@
1
1
  // @ts-check
2
2
  const { mkdir } = require('fs').promises
3
- const { isAbsolute, join } = require('path')
3
+ const { extname, isAbsolute, join } = require('path')
4
4
  const { env } = require('process')
5
5
 
6
6
  const terminalLink = require('terminal-link')
7
7
 
8
- const { NETLIFYDEVERR, NETLIFYDEVLOG, chalk, log, warn } = require('../../utils')
8
+ const { NETLIFYDEVERR, NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, log, warn } = require('../../utils')
9
9
  const { getLogMessage } = require('../log')
10
10
 
11
11
  const { NetlifyFunction } = require('./netlify-function')
12
12
  const runtimes = require('./runtimes')
13
13
  const { watchDebounced } = require('./watcher')
14
14
 
15
+ const ZIP_EXTENSION = '.zip'
16
+
15
17
  class FunctionsRegistry {
16
18
  constructor({ capabilities, config, isConnected = false, projectRoot, settings, timeouts }) {
17
19
  this.capabilities = capabilities
@@ -141,6 +143,13 @@ class FunctionsRegistry {
141
143
  )
142
144
  }
143
145
 
146
+ // This fixes the bug described here https://github.com/netlify/zip-it-and-ship-it/issues/637
147
+ // If the current function's file is a zip bundle, we ignore it and log a helpful message.
148
+ if (extname(func.mainFile) === ZIP_EXTENSION) {
149
+ log(`${NETLIFYDEVWARN} Skipped bundled function ${chalk.yellow(name)}. Unzip the archive to load it from source.`)
150
+ return
151
+ }
152
+
144
153
  this.functions.set(name, func)
145
154
  this.buildFunctionAndWatchFiles(func)
146
155