@probeops/mcp-server 1.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ProbeOps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,289 @@
1
+ # ProbeOps MCP Server
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@probeops/mcp-server.svg)](https://www.npmjs.com/package/@probeops/mcp-server)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-green.svg)](https://nodejs.org)
6
+ [![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io)
7
+
8
+ MCP server for running infrastructure diagnostics from 6 global regions. SSL checks, DNS lookups, ping, whois, port checks, traceroute, latency tests, and more — each executed simultaneously from US East, US West, EU Central, Canada, India, and Australia.
9
+
10
+ Also includes geo-proxy browsing: load any URL through a real browser from a specific region and get page content + screenshots.
11
+
12
+ Works with **Claude Code**, **Codex**, **Cursor**, **Windsurf**, **Cline**, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible client.
13
+
14
+ ## Quick Start
15
+
16
+ ### 1. Get an API Key
17
+
18
+ Sign up at [probeops.com](https://probeops.com) and create an API key from the dashboard. Free tier available.
19
+
20
+ ### 2. Add to Your MCP Client
21
+
22
+ **Claude Code:**
23
+ ```bash
24
+ claude mcp add probeops -- npx -y @probeops/mcp-server
25
+ ```
26
+
27
+ **Codex:**
28
+ ```bash
29
+ codex mcp add probeops -- npx -y @probeops/mcp-server
30
+ ```
31
+ Or add to `~/.codex/config.toml`:
32
+ ```toml
33
+ [mcp_servers.probeops]
34
+ command = "npx"
35
+ args = ["-y", "@probeops/mcp-server"]
36
+
37
+ [mcp_servers.probeops.env]
38
+ PROBEOPS_API_KEY = "your-api-key-here"
39
+ ```
40
+
41
+ **Cursor / Windsurf / Cline** (add to `.mcp.json` or your client's MCP config):
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "probeops": {
46
+ "command": "npx",
47
+ "args": ["-y", "@probeops/mcp-server"],
48
+ "env": {
49
+ "PROBEOPS_API_KEY": "your-api-key-here"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## What You Get
57
+
58
+ 14 infrastructure diagnostic tools, each running from 6 regions simultaneously. Plus geo-proxy browsing and account management.
59
+
60
+ Every diagnostic tool call returns per-region results and a quota footer showing remaining usage.
61
+
62
+ ### Diagnostic Tools (14)
63
+
64
+ | Tool | What it does | Example input |
65
+ |------|-------------|---------------|
66
+ | `ssl_check` | SSL/TLS certificate validity, expiry, issuer, TLS version, SANs, cross-region consistency | `{ "domain": "example.com" }` |
67
+ | `dns_lookup` | DNS record lookup (A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, PTR) with multi-region propagation check | `{ "domain": "example.com", "record_type": "MX" }` |
68
+ | `is_it_down` | Website up/down/partial status from multiple regions | `{ "url": "https://example.com" }` |
69
+ | `latency_test` | HTTP latency (TTFB) from multiple regions, returns min/avg/max | `{ "target": "example.com" }` |
70
+ | `traceroute` | Network path tracing with per-hop latency. TCP, UDP, or ICMP | `{ "target": "example.com", "protocol": "tcp" }` |
71
+ | `port_check` | Port open/closed/filtered check from multiple regions | `{ "target": "example.com", "port": 443 }` |
72
+ | `ping` | ICMP ping with packet loss and round-trip times | `{ "target": "8.8.8.8" }` |
73
+ | `whois` | Domain registration info: registrar, dates, nameservers | `{ "domain": "example.com" }` |
74
+ | `nmap_port_check` | Check multiple ports open/closed using nmap (not a full scan) | `{ "target": "example.com", "ports": "80,443" }` |
75
+ | `tcp_ping` | TCP-level latency to a specific port (works when ICMP is blocked) | `{ "target": "example.com", "port": 443 }` |
76
+ | `keyword_check` | Check if a keyword exists on a web page from multiple regions | `{ "url": "https://example.com", "keyword": "pricing" }` |
77
+ | `websocket_check` | WebSocket endpoint connectivity check | `{ "url": "wss://example.com/ws" }` |
78
+ | `banner_grab` | Service banner/version detection on a port | `{ "target": "example.com", "port": 22 }` |
79
+ | `api_health` | API endpoint health check (HTTP status, response time, availability) | `{ "url": "https://api.example.com/health" }` |
80
+
81
+ ### DNS Shortcuts
82
+
83
+ These call `dns_lookup` with a preset `record_type` so you don't have to remember record type names:
84
+
85
+ | Tool | Equivalent to |
86
+ |------|--------------|
87
+ | `mx_lookup` | `dns_lookup` with `record_type: "MX"` |
88
+ | `txt_lookup` | `dns_lookup` with `record_type: "TXT"` |
89
+ | `ns_lookup` | `dns_lookup` with `record_type: "NS"` |
90
+ | `cname_lookup` | `dns_lookup` with `record_type: "CNAME"` |
91
+ | `caa_lookup` | `dns_lookup` with `record_type: "CAA"` |
92
+ | `reverse_dns_lookup` | `dns_lookup` with `record_type: "PTR"` (takes an IP address) |
93
+
94
+ ### Geo-Proxy Browsing
95
+
96
+ | Tool | What it does | Example input |
97
+ |------|-------------|---------------|
98
+ | `get_geo_proxy` | Get proxy credentials for a region. Use with Playwright or any HTTPS proxy client | `{ "region": "eu-central" }` |
99
+ | `geo_browse` | Browse a URL from a region using a real browser. Returns page content and/or screenshot | `{ "url": "https://example.com", "region": "ap-south" }` |
100
+
101
+ ### Account
102
+
103
+ | Tool | What it does |
104
+ |------|-------------|
105
+ | `account_status` | Current quota usage (minute/hour/day/month), subscription tier, active proxy token |
106
+
107
+ ## Resources
108
+
109
+ | URI | Description |
110
+ |-----|-------------|
111
+ | `probeops://regions` | Probe regions with location, country, and node count |
112
+ | `probeops://proxy-regions` | Geo-proxy regions with FQDNs and proxy URLs |
113
+ | `probeops://usage` | Current API usage, remaining quota, active token status |
114
+
115
+ ## Global Regions
116
+
117
+ All diagnostic tools run from these 6 regions simultaneously:
118
+
119
+ | Region Code | Location | Country |
120
+ |-------------|----------|---------|
121
+ | `us-east` | Ashburn, Virginia | United States |
122
+ | `us-west` | Boardman, Oregon | United States |
123
+ | `eu-central` | Helsinki | Finland |
124
+ | `ca-central` | Montreal | Canada |
125
+ | `ap-south` | Mumbai | India |
126
+ | `ap-southeast` | Sydney | Australia |
127
+
128
+ ## Geo-Proxy Token Management
129
+
130
+ The server manages proxy tokens automatically:
131
+
132
+ | Token State | Action | Quota Cost |
133
+ |-------------|--------|------------|
134
+ | > 5 min remaining | Reuse cached token | 0 |
135
+ | 0-5 min remaining | Auto-extend +1 hour | 1 unit |
136
+ | Expired or no token | Generate new token | 1 unit |
137
+
138
+ - A single token works across all 6 regions. Switching regions does not consume quota.
139
+ - Daily quota = total hours of proxy browsing per day.
140
+ - Quota resets at midnight UTC.
141
+
142
+ ## Output Examples
143
+
144
+ ### SSL Check
145
+ ```
146
+ ssl_check({ domain: "github.com" })
147
+
148
+ SSL Certificate Report for github.com
149
+ Status: VALID
150
+ Subject: github.com
151
+ Issuer: DigiCert (DigiCert Inc)
152
+ Expires in: 245 days
153
+ TLS: TLSv1.3 (TLS_AES_256_GCM_SHA384)
154
+
155
+ Region Results:
156
+ | Region | Location | Status | Time |
157
+ |--------|----------|--------|------|
158
+ | us-east | Ashburn | OK | 45ms |
159
+ | eu-central | Helsinki | OK | 38ms |
160
+ | ap-south | Mumbai | OK | 112ms |
161
+ | us-west | Boardman | OK | 52ms |
162
+ | ca-central | Montreal | OK | 41ms |
163
+ | ap-southeast | Sydney | OK | 98ms |
164
+
165
+ Completed in 125ms
166
+ ---
167
+ Diagnostics: 97 of 100 remaining today (Free)
168
+ ```
169
+
170
+ ### Ping
171
+ ```
172
+ ping({ target: "1.1.1.1" })
173
+
174
+ Ping: 1.1.1.1
175
+
176
+ ap-south (Mumbai):
177
+ PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
178
+ 64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=1.35 ms
179
+ 3 packets transmitted, 3 received, 0% packet loss
180
+ rtt min/avg/max/mdev = 1.353/1.398/1.474/0.054 ms
181
+ Response time: 2147ms
182
+
183
+ eu-central (Helsinki):
184
+ PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
185
+ 64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=21.2 ms
186
+ 3 packets transmitted, 3 received, 0% packet loss
187
+ rtt min/avg/max/mdev = 20.651/20.941/21.217/0.231 ms
188
+ Response time: 2031ms
189
+ ...
190
+
191
+ Completed in 2332ms
192
+ ---
193
+ Diagnostics: 96 of 100 remaining today (Free)
194
+ ```
195
+
196
+ ### Whois
197
+ ```
198
+ whois({ domain: "example.com" })
199
+
200
+ Whois: example.com
201
+
202
+ us-east (Ashburn):
203
+ Domain Name: EXAMPLE.COM
204
+ Registry Domain ID: 2336799_DOMAIN_COM-VRSN
205
+ Registrar: RESERVED-Internet Assigned Numbers Authority
206
+ Creation Date: 1995-08-14T04:00:00Z
207
+ Registry Expiry Date: 2025-08-13T04:00:00Z
208
+ Name Server: A.IANA-SERVERS.NET
209
+ Name Server: B.IANA-SERVERS.NET
210
+ DNSSEC: signedDelegation
211
+ Response time: 734ms
212
+ ...
213
+
214
+ Completed in 852ms
215
+ ---
216
+ Diagnostics: 95 of 100 remaining today (Free)
217
+ ```
218
+
219
+ ## Environment Variables
220
+
221
+ | Variable | Required | Default | Description |
222
+ |----------|----------|---------|-------------|
223
+ | `PROBEOPS_API_KEY` | Yes | - | Your ProbeOps API key ([get one free](https://probeops.com/dashboard/api-keys)) |
224
+ | `PROBEOPS_BASE_URL` | No | `https://probeops.com` | API base URL (for staging or self-hosted instances) |
225
+
226
+ ## Rate Limits
227
+
228
+ | | **Free** | **Standard** | **Professional** |
229
+ |--|----------|-------------|-----------------|
230
+ | Per minute | 15 | 30 | 50 |
231
+ | Per hour | 100 | 500 | 2,000 |
232
+ | Per day | 100 | 1,000 | 5,000 |
233
+ | Per month | 500 | 20,000 | 100,000 |
234
+ | Concurrent | 3 | 5 | 10 |
235
+ | Proxy hours/day | 3 | 5 | 10 |
236
+ | Regions | 4 of 6 | All 6 | All 6 |
237
+
238
+ Free tier requires no credit card. Check usage anytime with `account_status`.
239
+
240
+ See [probeops.com/pricing](https://probeops.com/pricing) for current details.
241
+
242
+ ## Development
243
+
244
+ ```bash
245
+ git clone https://github.com/kumarprobeops/probeops-mcp-server.git
246
+ cd probeops-mcp-server
247
+ npm install
248
+ npm run build
249
+ ```
250
+
251
+ Test locally:
252
+ ```bash
253
+ PROBEOPS_API_KEY=your-key node dist/index.js
254
+ ```
255
+
256
+ ## Requirements
257
+
258
+ - **Node.js** >= 18.0.0
259
+ - **Playwright** (optional) - only needed for `geo_browse` screenshots
260
+ ```bash
261
+ npx playwright install chromium
262
+ ```
263
+ Without Playwright, `geo_browse` falls back to HTTP fetch (raw HTML, no screenshots).
264
+
265
+ ## FAQ
266
+
267
+ **Q: How is this different from running `curl` or `dig` locally?**
268
+ Every check runs from 6 global regions simultaneously. You see DNS propagation, latency, and availability from the perspective of real users worldwide, not your local network.
269
+
270
+ **Q: Do I need to install anything besides Node.js?**
271
+ No. `npx -y @probeops/mcp-server` handles everything. Playwright is optional (only for `geo_browse` screenshots).
272
+
273
+ **Q: Can I use this in CI/CD pipelines?**
274
+ Yes. Set `PROBEOPS_API_KEY` as an environment variable and call the MCP server from any MCP-compatible tool.
275
+
276
+ **Q: Is the API key sent securely?**
277
+ Yes. All communication uses HTTPS. The key is sent via the `X-API-Key` header, never in URLs or logs.
278
+
279
+ ## License
280
+
281
+ MIT - see [LICENSE](LICENSE)
282
+
283
+ ## Links
284
+
285
+ - [ProbeOps Platform](https://probeops.com)
286
+ - [Get API Key](https://probeops.com/dashboard/api-keys)
287
+ - [Pricing](https://probeops.com/pricing)
288
+ - [Report Issues](https://github.com/kumarprobeops/probeops-mcp-server/issues)
289
+ - [npm Package](https://www.npmjs.com/package/@probeops/mcp-server)
@@ -0,0 +1,20 @@
1
+ import { ProbeOpsConfig, SslCheckRequest, DnsLookupRequest, IsItDownRequest, LatencyTestRequest, TracerouteRequest, PortCheckRequest, GeoProxyRequest, GeoProxyResponse, GeoProxyDailyUsage, RegionsResponse, QuotaResponse, V1RunResponse } from './types.js';
2
+ export declare class ProbeOpsClient {
3
+ private apiKey;
4
+ private baseUrl;
5
+ constructor(config: ProbeOpsConfig);
6
+ private request;
7
+ run(tool: string, target: string, params?: Record<string, unknown>): Promise<V1RunResponse>;
8
+ sslCheck(params: SslCheckRequest): Promise<V1RunResponse>;
9
+ dnsLookup(params: DnsLookupRequest): Promise<V1RunResponse>;
10
+ isItDown(params: IsItDownRequest): Promise<V1RunResponse>;
11
+ latencyTest(params: LatencyTestRequest): Promise<V1RunResponse>;
12
+ traceroute(params: TracerouteRequest): Promise<V1RunResponse>;
13
+ portCheck(params: PortCheckRequest): Promise<V1RunResponse>;
14
+ getGeoProxy(params: GeoProxyRequest): Promise<GeoProxyResponse>;
15
+ getRegions(): Promise<RegionsResponse>;
16
+ getQuota(): Promise<QuotaResponse>;
17
+ getProxyDailyUsage(): Promise<GeoProxyDailyUsage>;
18
+ extendProxyToken(tokenId: string): Promise<GeoProxyResponse>;
19
+ }
20
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,eAAe,EAEf,gBAAgB,EAEhB,eAAe,EAEf,kBAAkB,EAElB,iBAAiB,EAEjB,gBAAgB,EAEhB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACd,MAAM,YAAY,CAAC;AAIpB,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,cAAc;YAKpB,OAAO;IA4Df,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAM/F,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;IAIzD,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3D,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;IAIzD,WAAW,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI/D,UAAU,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI7D,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3D,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAU/D,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;IAItC,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;IAIlC,kBAAkB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAIjD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAGnE"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProbeOpsClient = void 0;
4
+ const types_js_1 = require("./types.js");
5
+ const DEFAULT_BASE_URL = 'https://probeops.com';
6
+ class ProbeOpsClient {
7
+ apiKey;
8
+ baseUrl;
9
+ constructor(config) {
10
+ this.apiKey = config.apiKey;
11
+ this.baseUrl = (config.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, '');
12
+ }
13
+ async request(method, path, body) {
14
+ const url = `${this.baseUrl}${path}`;
15
+ const headers = {
16
+ 'X-API-Key': this.apiKey,
17
+ 'Content-Type': 'application/json',
18
+ 'User-Agent': 'probeops-mcp-server/1.0.0',
19
+ };
20
+ const response = await fetch(url, {
21
+ method,
22
+ headers,
23
+ body: body ? JSON.stringify(body) : undefined,
24
+ signal: AbortSignal.timeout(45000),
25
+ });
26
+ if (!response.ok) {
27
+ let detail;
28
+ let retryAfter;
29
+ let rateLimitInfo;
30
+ // Parse rate limit headers
31
+ const retryHeader = response.headers.get('Retry-After');
32
+ if (retryHeader)
33
+ retryAfter = parseInt(retryHeader, 10);
34
+ const limitHeader = response.headers.get('X-RateLimit-Limit');
35
+ const remainHeader = response.headers.get('X-RateLimit-Remaining');
36
+ const resetHeader = response.headers.get('X-RateLimit-Reset');
37
+ if (limitHeader && remainHeader && resetHeader) {
38
+ rateLimitInfo = {
39
+ limit: parseInt(limitHeader, 10),
40
+ remaining: parseInt(remainHeader, 10),
41
+ reset: parseInt(resetHeader, 10),
42
+ };
43
+ }
44
+ try {
45
+ const errorBody = await response.json();
46
+ if (typeof errorBody.detail === 'string') {
47
+ detail = errorBody.detail;
48
+ }
49
+ else if (errorBody.detail && typeof errorBody.detail === 'object') {
50
+ detail = errorBody.detail.message || errorBody.detail.error;
51
+ if (errorBody.detail.retry_after)
52
+ retryAfter = errorBody.detail.retry_after;
53
+ }
54
+ }
55
+ catch {
56
+ // ignore parse errors
57
+ }
58
+ throw new types_js_1.ProbeOpsError(`API request failed: ${response.status} ${response.statusText}`, response.status, detail, retryAfter, rateLimitInfo);
59
+ }
60
+ return response.json();
61
+ }
62
+ // ── API v1 Generic Method ────────────────────────────────
63
+ async run(tool, target, params = {}) {
64
+ return this.request('POST', '/api/v1/run', { tool, target, params });
65
+ }
66
+ // ── Tool Methods (thin wrappers over v1/run) ───────────
67
+ async sslCheck(params) {
68
+ return this.run('ssl_check', params.domain);
69
+ }
70
+ async dnsLookup(params) {
71
+ return this.run('dns_lookup', params.domain, { record_type: params.record_type || 'A' });
72
+ }
73
+ async isItDown(params) {
74
+ return this.run('is_it_down', params.url);
75
+ }
76
+ async latencyTest(params) {
77
+ return this.run('latency_test', params.target);
78
+ }
79
+ async traceroute(params) {
80
+ return this.run('traceroute', params.target, { protocol: params.protocol || 'tcp' });
81
+ }
82
+ async portCheck(params) {
83
+ return this.run('port_check', params.target, { port: params.port });
84
+ }
85
+ async getGeoProxy(params) {
86
+ return this.request('POST', '/api/forward-proxy/tokens/generate', {
87
+ region: params.region,
88
+ expires_in_hours: params.expires_in_hours || 1,
89
+ label: params.label || 'MCP Server',
90
+ });
91
+ }
92
+ // ── Resource Methods ──────────────────────────────────────
93
+ async getRegions() {
94
+ return this.request('GET', '/api/tools/regions');
95
+ }
96
+ async getQuota() {
97
+ return this.request('GET', '/api/diagnostics/quota-status');
98
+ }
99
+ async getProxyDailyUsage() {
100
+ return this.request('GET', '/api/forward-proxy/tokens/daily-usage');
101
+ }
102
+ async extendProxyToken(tokenId) {
103
+ return this.request('POST', `/api/forward-proxy/tokens/${tokenId}/extend`);
104
+ }
105
+ }
106
+ exports.ProbeOpsClient = ProbeOpsClient;
107
+ //# sourceMappingURL=api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":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,EAAE;YAClF,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,IAAI,CAAC;YAC9C,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;SACpC,CAAC,CAAC;IACL,CAAC;IAED,6DAA6D;IAE7D,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,OAAO,CAAkB,KAAK,EAAE,oBAAoB,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,OAAO,CAAgB,KAAK,EAAE,+BAA+B,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAqB,KAAK,EAAE,uCAAuC,CAAC,CAAC;IAC1F,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,OAAe;QACpC,OAAO,IAAI,CAAC,OAAO,CAAmB,MAAM,EAAE,6BAA6B,OAAO,SAAS,CAAC,CAAC;IAC/F,CAAC;CACF;AA5HD,wCA4HC"}
@@ -0,0 +1,18 @@
1
+ import { SslCheckResponse, DnsLookupResponse, IsItDownResponse, LatencyTestResponse, TracerouteResponse, PortCheckResponse, GeoProxyResponse, RegionsResponse, QuotaResponse, ProxyRegionInfo, CachedQuota, V1RunResponse } from './types.js';
2
+ export declare function formatSslCheck(data: SslCheckResponse | V1RunResponse): string;
3
+ export declare function formatDnsLookup(data: DnsLookupResponse | V1RunResponse): string;
4
+ export declare function formatIsItDown(data: IsItDownResponse | V1RunResponse): string;
5
+ export declare function formatLatencyTest(data: LatencyTestResponse | V1RunResponse): string;
6
+ export declare function formatTraceroute(data: TracerouteResponse | V1RunResponse): string;
7
+ export declare function formatPortCheck(data: PortCheckResponse | V1RunResponse): string;
8
+ export declare function formatGenericResult(data: V1RunResponse): string;
9
+ export declare function formatGeoProxy(data: GeoProxyResponse, proxyFqdn?: string): string;
10
+ export declare function formatRegions(data: RegionsResponse): string;
11
+ export declare function formatProxyRegions(regions: ProxyRegionInfo[]): string;
12
+ export declare function formatQuota(data: QuotaResponse): string;
13
+ export declare function formatAccountStatus(quota: CachedQuota, activeToken: {
14
+ token_id: string;
15
+ expires_at: string;
16
+ allowed_regions: string[];
17
+ } | null): string;
18
+ //# sourceMappingURL=formatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../src/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAEhB,eAAe,EACf,aAAa,EAEb,eAAe,EACf,WAAW,EACX,aAAa,EACd,MAAM,YAAY,CAAC;AAuBpB,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,aAAa,GAAG,MAAM,CAqC7E;AAID,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,GAAG,MAAM,CAyB/E;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,aAAa,GAAG,MAAM,CAa7E;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,GAAG,aAAa,GAAG,MAAM,CAwBnF;AAID,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,aAAa,GAAG,MAAM,CAuBjF;AAID,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,GAAG,MAAM,CAa/E;AAID,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAyB/D;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CA0CjF;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAU3D;AAID,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE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