standout 0.5.27 → 0.5.28
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/cli.js +6 -0
- package/dist/proxy.d.ts +1 -0
- package/dist/proxy.js +27 -0
- package/dist/wrapped-client.js +15 -3
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -5,6 +5,7 @@ import { createInterface } from "readline";
|
|
|
5
5
|
import { markWrappedShared, STANDOUT_API_URL } from "./api.js";
|
|
6
6
|
import { gatherFullEnrichment, gatherProfileBasics, gatherUsageStats, } from "./gather.js";
|
|
7
7
|
import { startMcpServer } from "./mcp.js";
|
|
8
|
+
import { configureProxyFromEnv } from "./proxy.js";
|
|
8
9
|
import { SYSTEM_PROMPT } from "./prompt.js";
|
|
9
10
|
import { TOOLS, executeTool } from "./tools.js";
|
|
10
11
|
import { renderWrappedAll } from "./wrapped/render.js";
|
|
@@ -326,6 +327,11 @@ async function runAgent(jobId) {
|
|
|
326
327
|
}
|
|
327
328
|
async function main() {
|
|
328
329
|
const args = process.argv.slice(2);
|
|
330
|
+
// Route fetch through a configured proxy before any network call — Node's fetch
|
|
331
|
+
// ignores HTTP(S)_PROXY otherwise, which breaks users behind a corporate proxy.
|
|
332
|
+
const proxy = configureProxyFromEnv();
|
|
333
|
+
if (proxy)
|
|
334
|
+
process.stderr.write(` (using proxy ${proxy})\n`);
|
|
329
335
|
if (args.includes("--gather")) {
|
|
330
336
|
await confirmPrivacy();
|
|
331
337
|
const data = await gatherFullEnrichment();
|
package/dist/proxy.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function configureProxyFromEnv(): string | null;
|
package/dist/proxy.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProxyAgent, setGlobalDispatcher } from "undici";
|
|
2
|
+
// Node's built-in fetch (undici) ignores HTTP(S)_PROXY env vars by default. On a
|
|
3
|
+
// corporate network that forces traffic through a proxy, undici then connects
|
|
4
|
+
// directly, the proxy/firewall transparently intercepts the TLS handshake, and the
|
|
5
|
+
// client sees a mangled stream (ERR_SSL_PACKET_LENGTH_TOO_LONG / "packet length too
|
|
6
|
+
// long"). Routing fetch through the configured proxy fixes that.
|
|
7
|
+
//
|
|
8
|
+
// Honors the standard env vars (upper + lower case). NO_PROXY is intentionally not
|
|
9
|
+
// handled — we only ever talk to one host (the Standout API), so a global proxy is
|
|
10
|
+
// correct when one is set.
|
|
11
|
+
export function configureProxyFromEnv() {
|
|
12
|
+
const proxy = process.env.HTTPS_PROXY ||
|
|
13
|
+
process.env.https_proxy ||
|
|
14
|
+
process.env.HTTP_PROXY ||
|
|
15
|
+
process.env.http_proxy ||
|
|
16
|
+
process.env.ALL_PROXY ||
|
|
17
|
+
process.env.all_proxy;
|
|
18
|
+
if (!proxy)
|
|
19
|
+
return null;
|
|
20
|
+
try {
|
|
21
|
+
setGlobalDispatcher(new ProxyAgent(proxy));
|
|
22
|
+
return proxy;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/dist/wrapped-client.js
CHANGED
|
@@ -124,9 +124,21 @@ export async function createWrapped(args) {
|
|
|
124
124
|
await sleep(RETRY_BASE_DELAY_MS * attempt);
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
const detail = describeError(err);
|
|
128
|
+
// A TLS-layer failure means something is intercepting HTTPS (VPN, proxy, or
|
|
129
|
+
// antivirus), not a transient drop — give targeted guidance.
|
|
130
|
+
const tlsIntercept = /ERR_SSL|ERR_TLS|packet length too long|SSL routines|wrong version number|DECRYPTION|sslv3|unknown ca|self.signed|unable to (verify|get local)/i.test(detail);
|
|
131
|
+
if (tlsIntercept) {
|
|
132
|
+
process.stderr.write(` Couldn't reach Standout: a VPN, proxy, or antivirus is intercepting the HTTPS connection.\n` +
|
|
133
|
+
` Try one of: disconnect the VPN/proxy, switch networks, or set HTTPS_PROXY to your\n` +
|
|
134
|
+
` corporate proxy (and NODE_EXTRA_CA_CERTS if it uses a custom certificate), then re-run: npx standout\n` +
|
|
135
|
+
` (details: ${detail}; body ${bodyKb}KB)\n`);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
process.stderr.write(` Couldn't reach Standout to build your wrapped. Your network (or a VPN/proxy) dropped the connection.\n` +
|
|
139
|
+
` Check your connection and re-run: npx standout\n` +
|
|
140
|
+
` (details: ${detail}; body ${bodyKb}KB)\n`);
|
|
141
|
+
}
|
|
130
142
|
return null;
|
|
131
143
|
}
|
|
132
144
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "standout",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.28",
|
|
4
4
|
"description": "Build your developer profile with AI. One command, zero friction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"gradient-string": "^3.0.0",
|
|
33
33
|
"open": "^11.0.0",
|
|
34
34
|
"playwright-core": "^1.59.1",
|
|
35
|
+
"undici": "^6.26.0",
|
|
35
36
|
"zod": "^3.24.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|