@@ -83,18 +83,18 @@ class FunctionsInvokeCommand extends Command {
8383 } else {
8484 // NOT an event triggered function, but may still want to simulate authentication locally
8585 let _isAuthed = false ;
86- if ( typeof flags . auth === "undefined" ) {
86+ if ( typeof flags . identity === "undefined" ) {
8787 const { isAuthed } = await inquirer . prompt ( [
8888 {
8989 type : "confirm" ,
9090 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)` ,
9292 default : true
9393 }
9494 ] ) ;
9595 _isAuthed = isAuthed ;
9696 } else {
97- _isAuthed = flags . auth ;
97+ _isAuthed = flags . identity ;
9898 }
9999 if ( _isAuthed ) {
100100 headers = {
@@ -217,8 +217,8 @@ FunctionsInvokeCommand.examples = [
217217 "$ netlify functions:invoke" ,
218218 "$ netlify functions:invoke myfunction" ,
219219 "$ 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 " ,
222222 '$ netlify functions:invoke myfunction --payload "{"foo": 1}"' ,
223223 '$ netlify functions:invoke myfunction --querystring "foo=1' ,
224224 '$ netlify functions:invoke myfunction --payload "./pathTo.json"'
@@ -248,10 +248,9 @@ FunctionsInvokeCommand.flags = {
248248 description :
249249 "Supply POST payload in stringified json, or a path to a json file"
250250 } ) ,
251- auth : flags . boolean ( {
252- char : "a" ,
251+ identity : flags . boolean ( {
253252 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" ,
255254 allowNo : true
256255 } )
257256} ;
0 commit comments