@@ -83,18 +83,18 @@ class FunctionsInvokeCommand extends Command {
83
83
} else {
84
84
// NOT an event triggered function, but may still want to simulate authentication locally
85
85
let _isAuthed = false ;
86
- if ( typeof flags . auth === "undefined" ) {
86
+ if ( typeof flags . identity === "undefined" ) {
87
87
const { isAuthed } = await inquirer . prompt ( [
88
88
{
89
89
type : "confirm" ,
90
90
name : "isAuthed" ,
91
- message : `Invoke with emulated Netlify Identity authentication headers? (pass -auth /--no-auth to override)` ,
91
+ message : `Invoke with emulated Netlify Identity authentication headers? (pass --identity /--no-identity to override)` ,
92
92
default : true
93
93
}
94
94
] ) ;
95
95
_isAuthed = isAuthed ;
96
96
} else {
97
- _isAuthed = flags . auth ;
97
+ _isAuthed = flags . identity ;
98
98
}
99
99
if ( _isAuthed ) {
100
100
headers = {
@@ -217,8 +217,8 @@ FunctionsInvokeCommand.examples = [
217
217
"$ netlify functions:invoke" ,
218
218
"$ netlify functions:invoke myfunction" ,
219
219
"$ netlify functions:invoke --name myfunction" ,
220
- "$ netlify functions:invoke --name myfunction --auth " ,
221
- "$ netlify functions:invoke --name myfunction --no-auth " ,
220
+ "$ netlify functions:invoke --name myfunction --identity " ,
221
+ "$ netlify functions:invoke --name myfunction --no-identity " ,
222
222
'$ netlify functions:invoke myfunction --payload "{"foo": 1}"' ,
223
223
'$ netlify functions:invoke myfunction --querystring "foo=1' ,
224
224
'$ netlify functions:invoke myfunction --payload "./pathTo.json"'
@@ -248,10 +248,9 @@ FunctionsInvokeCommand.flags = {
248
248
description :
249
249
"Supply POST payload in stringified json, or a path to a json file"
250
250
} ) ,
251
- auth : flags . boolean ( {
252
- char : "a" ,
251
+ identity : flags . boolean ( {
253
252
description :
254
- "simulate Netlify Identity authentication JWT. pass --no-auth to affirm unauthenticated request" ,
253
+ "simulate Netlify Identity authentication JWT. pass --no-identity to affirm unauthenticated request" ,
255
254
allowNo : true
256
255
} )
257
256
} ;
0 commit comments