Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 08d9ed5

Browse files
DavidWellsswyxio
authored andcommitted
change —auth flag to —identity (#224)
1 parent 61bd64c commit 08d9ed5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/commands/functions/invoke.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy