netlify-cli 12.13.2 → 12.14.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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.14.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "12.
|
|
9
|
+
"version": "12.14.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ import { NETLIFYDEVERR, NETLIFYDEVLOG, chalk, log, warn, watchDebounced } from '
|
|
|
25
25
|
* @type {object}
|
|
26
26
|
* @property {string} function
|
|
27
27
|
* @property {string} path
|
|
28
|
+
* @property {string=} name
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
31
|
/**
|
|
@@ -32,6 +33,7 @@ import { NETLIFYDEVERR, NETLIFYDEVLOG, chalk, log, warn, watchDebounced } from '
|
|
|
32
33
|
* @type {object}
|
|
33
34
|
* @property {string} function
|
|
34
35
|
* @property {string} pattern
|
|
36
|
+
* @property {string=} name
|
|
35
37
|
*/
|
|
36
38
|
|
|
37
39
|
/** @typedef {(EdgeFunctionDeclarationWithPath | EdgeFunctionDeclarationWithPattern)} EdgeFunctionDeclaration */
|
|
@@ -194,11 +196,11 @@ export class EdgeFunctionsRegistry {
|
|
|
194
196
|
await this.build(functionsFound)
|
|
195
197
|
|
|
196
198
|
deletedFunctions.forEach((func) => {
|
|
197
|
-
EdgeFunctionsRegistry.logDeletedFunction(func)
|
|
199
|
+
EdgeFunctionsRegistry.logDeletedFunction(func, this.findDisplayName(func.name))
|
|
198
200
|
})
|
|
199
201
|
|
|
200
202
|
newFunctions.forEach((func) => {
|
|
201
|
-
EdgeFunctionsRegistry.logAddedFunction(func)
|
|
203
|
+
EdgeFunctionsRegistry.logAddedFunction(func, this.findDisplayName(func.name))
|
|
202
204
|
})
|
|
203
205
|
} catch {
|
|
204
206
|
// no-op
|
|
@@ -257,7 +259,8 @@ export class EdgeFunctionsRegistry {
|
|
|
257
259
|
log(`${NETLIFYDEVLOG} ${chalk.green('Reloaded')} edge functions`)
|
|
258
260
|
} else {
|
|
259
261
|
functionNames.forEach((functionName) => {
|
|
260
|
-
|
|
262
|
+
const displayName = this.findDisplayName(functionName)
|
|
263
|
+
log(`${NETLIFYDEVLOG} ${chalk.green('Reloaded')} edge function ${chalk.yellow(displayName || functionName)}`)
|
|
261
264
|
})
|
|
262
265
|
}
|
|
263
266
|
} catch {
|
|
@@ -282,12 +285,12 @@ export class EdgeFunctionsRegistry {
|
|
|
282
285
|
return this.initialization
|
|
283
286
|
}
|
|
284
287
|
|
|
285
|
-
static logAddedFunction(func) {
|
|
286
|
-
log(`${NETLIFYDEVLOG} ${chalk.green('Loaded')} edge function ${chalk.yellow(func.name)}`)
|
|
288
|
+
static logAddedFunction(func, displayName) {
|
|
289
|
+
log(`${NETLIFYDEVLOG} ${chalk.green('Loaded')} edge function ${chalk.yellow(displayName || func.name)}`)
|
|
287
290
|
}
|
|
288
291
|
|
|
289
|
-
static logDeletedFunction(func) {
|
|
290
|
-
log(`${NETLIFYDEVLOG} ${chalk.magenta('Removed')} edge function ${chalk.yellow(func.name)}`)
|
|
292
|
+
static logDeletedFunction(func, displayName) {
|
|
293
|
+
log(`${NETLIFYDEVLOG} ${chalk.magenta('Removed')} edge function ${chalk.yellow(displayName || func.name)}`)
|
|
291
294
|
}
|
|
292
295
|
|
|
293
296
|
/**
|
|
@@ -444,7 +447,7 @@ export class EdgeFunctionsRegistry {
|
|
|
444
447
|
const functions = await this.bundler.find(directories)
|
|
445
448
|
|
|
446
449
|
functions.forEach((func) => {
|
|
447
|
-
EdgeFunctionsRegistry.logAddedFunction(func)
|
|
450
|
+
EdgeFunctionsRegistry.logAddedFunction(func, this.findDisplayName(func.name))
|
|
448
451
|
})
|
|
449
452
|
|
|
450
453
|
this.functions = functions
|
|
@@ -481,4 +484,8 @@ export class EdgeFunctionsRegistry {
|
|
|
481
484
|
|
|
482
485
|
this.directoryWatchers.set(directory, watcher)
|
|
483
486
|
}
|
|
487
|
+
|
|
488
|
+
findDisplayName(func) {
|
|
489
|
+
return this.declarationsFromConfig?.find((declaration) => declaration.function === func)?.name
|
|
490
|
+
}
|
|
484
491
|
}
|