@solongate/proxy 0.82.38 → 0.82.40
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/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +7 -7
- package/dist/index.js +394 -731
- package/package.json +1 -1
- package/dist/pull-push.d.ts +0 -17
- package/dist/pull-push.js +0 -358
package/dist/commands/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function runCommand(command: string, argv: string[]): Promise<number>;
|
|
6
6
|
/** The subcommand names this router owns (used by src/index.ts to route). */
|
|
7
|
-
export declare const COMMAND_NAMES: readonly ["policy", "ratelimit", "dlp", "stats", "audit", "
|
|
7
|
+
export declare const COMMAND_NAMES: readonly ["policy", "ratelimit", "dlp", "stats", "audit", "sessions", "session", "doctor", "watch", "alerts", "webhooks"];
|
package/dist/commands/index.js
CHANGED
|
@@ -963,7 +963,7 @@ async function runAgents(argv) {
|
|
|
963
963
|
const res = await api.agents.live({ limit: flagNum(flags, "limit"), includeDeactivated: flagBool(flags, "all") });
|
|
964
964
|
if (json) return printJson(res), 0;
|
|
965
965
|
err("");
|
|
966
|
-
err(`
|
|
966
|
+
err(` Sessions ${green(String(res.counts.active))} active ${yellow(String(res.counts.idle))} idle ${dim(String(res.counts.deactivated) + " off")}`);
|
|
967
967
|
if (!res.agents.length) return err(dim(" No agent sessions.")), 0;
|
|
968
968
|
table(
|
|
969
969
|
["STATUS", "AGENT", "CALLS", "DENY", "DLP", "TRUST", "CHARACTER"],
|
|
@@ -983,7 +983,7 @@ async function runAgent(argv) {
|
|
|
983
983
|
const { positionals, flags } = parse(argv);
|
|
984
984
|
const json = flagBool(flags, "json");
|
|
985
985
|
const id = positionals[0];
|
|
986
|
-
if (!id) return err(" Usage: solongate
|
|
986
|
+
if (!id) return err(" Usage: solongate session <id> [--json]"), 1;
|
|
987
987
|
const a = await api.agents.get(id);
|
|
988
988
|
if (json) return printJson(a), 0;
|
|
989
989
|
err("");
|
|
@@ -1193,7 +1193,7 @@ async function run8(argv) {
|
|
|
1193
1193
|
table(
|
|
1194
1194
|
["ID", "ON", "SIGNAL", "THRESH", "WINDOW", "CHANNELS"],
|
|
1195
1195
|
rules.map((r) => [
|
|
1196
|
-
dim(
|
|
1196
|
+
dim(r.id),
|
|
1197
1197
|
r.enabled ? green("\u25CF") : dim("\u25CB"),
|
|
1198
1198
|
cyan(r.signal),
|
|
1199
1199
|
`${r.threshold}`,
|
|
@@ -1250,7 +1250,7 @@ async function run9(argv) {
|
|
|
1250
1250
|
if (!webhooks.length) return err(dim(" No webhooks.")), 0;
|
|
1251
1251
|
table(
|
|
1252
1252
|
["ID", "ON", "EVENTS", "URL"],
|
|
1253
|
-
webhooks.map((w) => [dim(
|
|
1253
|
+
webhooks.map((w) => [dim(w.id), w.enabled ? green("\u25CF") : dim("\u25CB"), cyan(w.events), dim(truncate(w.url, 46))])
|
|
1254
1254
|
);
|
|
1255
1255
|
return 0;
|
|
1256
1256
|
}
|
|
@@ -1286,9 +1286,9 @@ async function dispatch(command, argv) {
|
|
|
1286
1286
|
return run4(argv);
|
|
1287
1287
|
case "audit":
|
|
1288
1288
|
return run5(argv);
|
|
1289
|
-
case "
|
|
1289
|
+
case "sessions":
|
|
1290
1290
|
return runAgents(argv);
|
|
1291
|
-
case "
|
|
1291
|
+
case "session":
|
|
1292
1292
|
return runAgent(argv);
|
|
1293
1293
|
case "doctor":
|
|
1294
1294
|
return run6(argv);
|
|
@@ -1320,7 +1320,7 @@ async function runCommand(command, argv) {
|
|
|
1320
1320
|
return 1;
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
var COMMAND_NAMES = ["policy", "ratelimit", "dlp", "stats", "audit", "
|
|
1323
|
+
var COMMAND_NAMES = ["policy", "ratelimit", "dlp", "stats", "audit", "sessions", "session", "doctor", "watch", "alerts", "webhooks"];
|
|
1324
1324
|
export {
|
|
1325
1325
|
COMMAND_NAMES,
|
|
1326
1326
|
runCommand
|