passport-bridge 0.7.0 → 0.7.1
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/README.md +80 -48
- package/dist/boundedFile.js +46 -0
- package/dist/boundedMcpFetch.js +98 -0
- package/dist/boundedResponse.js +56 -0
- package/dist/bridge.js +426 -99
- package/dist/bridgeConfig.js +19 -0
- package/dist/bridgeShutdown.js +30 -0
- package/dist/cli.js +193 -37
- package/dist/cliArgs.js +2 -0
- package/dist/cliClient.js +24 -46
- package/dist/cliDeadline.js +27 -0
- package/dist/cliLogin.js +103 -0
- package/dist/cliOffline.js +53 -0
- package/dist/cliOutput.js +106 -0
- package/dist/cliPagination.js +55 -0
- package/dist/cliResult.js +87 -0
- package/dist/cliSession.js +163 -0
- package/dist/cliSupport.js +191 -0
- package/dist/completion.js +22 -9
- package/dist/credentials.js +584 -83
- package/dist/discover.js +60 -34
- package/dist/doctor.js +56 -13
- package/dist/legacyCliSecurity.js +26 -0
- package/dist/passport.js +87 -469
- package/dist/privateStableFile.js +170 -0
- package/dist/recoveryCleanup.js +17 -0
- package/dist/recoveryIdentity.js +80 -0
- package/dist/version.js +1 -1
- package/npm-shrinkwrap.json +1740 -0
- package/package.json +21 -7
- package/dist/discover.test.js +0 -51
package/dist/completion.js
CHANGED
|
@@ -11,6 +11,7 @@ const DESCRIPTIONS = {
|
|
|
11
11
|
resources: "List or read MCP resources",
|
|
12
12
|
prompts: "List or get MCP prompts",
|
|
13
13
|
discover: "Scan local MCP configuration for fleet governance",
|
|
14
|
+
session: "Reuse one authenticated session for NDJSON commands",
|
|
14
15
|
completion: "Generate shell completion",
|
|
15
16
|
help: "Show command help",
|
|
16
17
|
version: "Show CLI version and local context"
|
|
@@ -25,11 +26,22 @@ const COMMAND_FLAGS = {
|
|
|
25
26
|
prompts: ["--set", "--out"]
|
|
26
27
|
};
|
|
27
28
|
const VALUE_FLAGS = new Set([
|
|
28
|
-
"--profile",
|
|
29
|
-
"--
|
|
29
|
+
"--profile",
|
|
30
|
+
"--timeout",
|
|
31
|
+
"--caller",
|
|
32
|
+
"--cloud",
|
|
33
|
+
"--workspace",
|
|
34
|
+
"--client",
|
|
35
|
+
"--app",
|
|
36
|
+
"--args",
|
|
37
|
+
"--set",
|
|
38
|
+
"--set-json",
|
|
39
|
+
"--wait",
|
|
40
|
+
"--alias",
|
|
41
|
+
"--out"
|
|
30
42
|
]);
|
|
31
43
|
function flagsFor(command) {
|
|
32
|
-
return [...GLOBAL, ...(command ? COMMAND_FLAGS[command] ?? [] : [])];
|
|
44
|
+
return [...GLOBAL, ...(command ? (COMMAND_FLAGS[command] ?? []) : [])];
|
|
33
45
|
}
|
|
34
46
|
function bash() {
|
|
35
47
|
const commandWords = COMMANDS.join(" ");
|
|
@@ -64,9 +76,13 @@ complete -F _passport_completion passport
|
|
|
64
76
|
function zsh() {
|
|
65
77
|
const commands = COMMANDS.map((command) => ` '${command}:${DESCRIPTIONS[command]}'`).join("\n");
|
|
66
78
|
const cases = COMMANDS.map((command) => {
|
|
67
|
-
const flags = (COMMAND_FLAGS[command] ?? [])
|
|
79
|
+
const flags = (COMMAND_FLAGS[command] ?? [])
|
|
80
|
+
.map((flag) => ` '${flag}[${flag.slice(2).replaceAll("-", " ")}]${VALUE_FLAGS.has(flag) ? ":value:" : ""}'`)
|
|
81
|
+
.join("");
|
|
68
82
|
return flags ? ` ${command}) opts+=(${flags.trimStart()}) ;;` : "";
|
|
69
|
-
})
|
|
83
|
+
})
|
|
84
|
+
.filter(Boolean)
|
|
85
|
+
.join("\n");
|
|
70
86
|
return `#compdef passport
|
|
71
87
|
_passport() {
|
|
72
88
|
local -a commands opts
|
|
@@ -98,10 +114,7 @@ compdef _passport passport
|
|
|
98
114
|
`;
|
|
99
115
|
}
|
|
100
116
|
function fish() {
|
|
101
|
-
const lines = [
|
|
102
|
-
"# fish completion for Passport CLI",
|
|
103
|
-
"complete -c passport -f"
|
|
104
|
-
];
|
|
117
|
+
const lines = ["# fish completion for Passport CLI", "complete -c passport -f"];
|
|
105
118
|
for (const command of COMMANDS) {
|
|
106
119
|
lines.push(`complete -c passport -n '__fish_use_subcommand' -a ${command} -d '${DESCRIPTIONS[command]}'`);
|
|
107
120
|
}
|