Rocky_Mountain_Vending/.pnpm-store/v10/files/d9/9b0fc559b01b0bb2d4a00109efbd0c9f53833290d360e01c63d8f209a440ab0488ce04e030abf7f1180ef7010ab31cfb53a50542ab7a0abf9b0eef308de692
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

35 lines
No EOL
862 B
Text

import { execSync } from 'child_process';
import dns from 'dns/promises';
function getProxy() {
if (process.env.https_proxy) {
return process.env.https_proxy;
}
try {
const httpsProxy = execSync('npm config get https-proxy', {
encoding: 'utf8'
}).trim();
return httpsProxy !== 'null' ? httpsProxy : undefined;
} catch (e) {
return;
}
}
export async function getOnline() {
try {
await dns.lookup('registry.yarnpkg.com');
return true;
} catch {
const proxy = getProxy();
if (!proxy) {
return false;
}
try {
const { hostname } = new URL(proxy);
await dns.lookup(hostname);
return true;
} catch {
return false;
}
}
}
//# sourceMappingURL=get-online.js.map