@solongate/proxy 0.47.4 → 0.47.5
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/index.js +22 -3
- package/hooks/guard.bundled.mjs +7536 -7536
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -285,7 +285,7 @@ function parseArgs(argv) {
|
|
|
285
285
|
}
|
|
286
286
|
if (!apiKey) {
|
|
287
287
|
throw new Error(
|
|
288
|
-
"Not logged in. Run
|
|
288
|
+
"Not logged in. Run this once to get started:\n\n npx -y @solongate/proxy@latest login\n"
|
|
289
289
|
);
|
|
290
290
|
}
|
|
291
291
|
if (!apiKey.startsWith("sg_live_") && !apiKey.startsWith("sg_test_")) {
|
|
@@ -341,7 +341,7 @@ function parseArgs(argv) {
|
|
|
341
341
|
}
|
|
342
342
|
if (upstreamArgs.length === 0) {
|
|
343
343
|
throw new Error(
|
|
344
|
-
"No upstream server command provided.\n\
|
|
344
|
+
"No upstream server command provided.\n\nIf you just want to get started, run:\n npx -y @solongate/proxy@latest login\n"
|
|
345
345
|
);
|
|
346
346
|
}
|
|
347
347
|
const [command, ...commandArgs] = upstreamArgs;
|
|
@@ -11568,8 +11568,10 @@ ${msg.content.text}`;
|
|
|
11568
11568
|
};
|
|
11569
11569
|
|
|
11570
11570
|
// src/index.ts
|
|
11571
|
+
init_cli_utils();
|
|
11571
11572
|
var CLI_SUBCOMMANDS = /* @__PURE__ */ new Set(["init", "login", "logout", "create", "inject", "pull", "push", "list", "ls"]);
|
|
11572
|
-
|
|
11573
|
+
var IS_HUMAN_CLI = process.argv.length <= 2 || CLI_SUBCOMMANDS.has(process.argv[2] ?? "");
|
|
11574
|
+
if (!IS_HUMAN_CLI) {
|
|
11573
11575
|
console.log = (...args) => {
|
|
11574
11576
|
process.stderr.write(`[SolonGate] ${args.map(String).join(" ")}
|
|
11575
11577
|
`);
|
|
@@ -11583,8 +11585,25 @@ if (!CLI_SUBCOMMANDS.has(process.argv[2] ?? "")) {
|
|
|
11583
11585
|
`);
|
|
11584
11586
|
};
|
|
11585
11587
|
}
|
|
11588
|
+
function printWelcome() {
|
|
11589
|
+
console.log("");
|
|
11590
|
+
console.log(` ${c.bold}${c.blue4}SolonGate${c.reset} ${c.dim}\u2014 secure gateway for your AI agents${c.reset}`);
|
|
11591
|
+
console.log("");
|
|
11592
|
+
console.log(" Get started with one command:");
|
|
11593
|
+
console.log("");
|
|
11594
|
+
console.log(` ${c.cyan}npx -y @solongate/proxy@latest login${c.reset}`);
|
|
11595
|
+
console.log("");
|
|
11596
|
+
console.log(` ${c.dim}This pairs your device and protects every Claude Code session${c.reset}`);
|
|
11597
|
+
console.log(` ${c.dim}on this machine with your cloud policy. Manage it at${c.reset}`);
|
|
11598
|
+
console.log(` ${c.cyan}https://dashboard.solongate.com${c.reset}`);
|
|
11599
|
+
console.log("");
|
|
11600
|
+
}
|
|
11586
11601
|
async function main6() {
|
|
11587
11602
|
const subcommand = process.argv[2];
|
|
11603
|
+
if (process.argv.length <= 2) {
|
|
11604
|
+
printWelcome();
|
|
11605
|
+
return;
|
|
11606
|
+
}
|
|
11588
11607
|
if (subcommand === "init") {
|
|
11589
11608
|
process.argv.splice(2, 1);
|
|
11590
11609
|
await Promise.resolve().then(() => (init_init(), init_exports));
|