mcp-scraper 0.90.6 → 0.90.8
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/CHANGELOG.md +49 -2
- package/README.md +2 -2
- package/dist/{analytics-repository-WNJESD4A.js → analytics-repository-IHOFBSUV.js} +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-core.js +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.js +1 -1
- package/dist/bin/paa-harvest.js +1 -1
- package/dist/{chunk-MADTJXNI.js → chunk-2F35B4U5.js} +105 -105
- package/dist/{chunk-56UT5M5Y.js → chunk-2SP57VCG.js} +5 -5
- package/dist/{chunk-XARSC34L.js → chunk-53IEEOKA.js} +167 -167
- package/dist/chunk-6DTXIZY2.js +1 -0
- package/dist/{chunk-WDB5CTRY.js → chunk-6FMIMP5Z.js} +1 -1
- package/dist/chunk-7SHEBDEB.js +1 -0
- package/dist/{chunk-NWRRVZKW.js → chunk-DKXZIIA5.js} +1 -1
- package/dist/{chunk-XXK5PLRB.js → chunk-IK5BG7MO.js} +9 -8
- package/dist/{chunk-AQSMJCTF.js → chunk-J374DIKA.js} +1 -1
- package/dist/{chunk-AAJG5OHF.js → chunk-KZV2FLGG.js} +1 -1
- package/dist/{chunk-4OTWTGKC.js → chunk-LI7WHOII.js} +1 -1
- package/dist/{chunk-BVSK6YHX.js → chunk-LSFDB5XE.js} +1 -1
- package/dist/{chunk-5MMN27Q6.js → chunk-OIMPG6M6.js} +1 -1
- package/dist/{chunk-YDOBZMLS.js → chunk-OMYTA34L.js} +1 -1
- package/dist/chunk-ORB4RHCK.js +63 -0
- package/dist/chunk-OVTHAIDS.js +1 -0
- package/dist/{chunk-Q5SUDDSQ.js → chunk-QTDLZTQ7.js} +1 -1
- package/dist/chunk-RK2VCTZI.js +1 -0
- package/dist/{chunk-KKHTMYCD.js → chunk-WJ4XFLS4.js} +160 -115
- package/dist/{chunk-COIA4RW4.js → chunk-X7GZJU5P.js} +1 -1
- package/dist/{chunk-D6BTAT5Y.js → chunk-YGBTTW5D.js} +1 -1
- package/dist/{chunk-AQXYXVOP.js → chunk-ZMNUI5LB.js} +7 -7
- package/dist/db-B5XJTOGN.js +1 -0
- package/dist/{extract-bundle-CP6WBOJI.js → extract-bundle-II3RPATK.js} +10 -10
- package/dist/gmail-service-E5KORS6C.js +1 -0
- package/dist/index.cjs +17 -17
- package/dist/index.js +1 -1
- package/dist/{lead-list-enrichment-repository-AIMOP7YM.js → lead-list-enrichment-repository-AWZZMY2H.js} +1 -1
- package/dist/{location-data-repository-25D3GHXE.js → location-data-repository-6XAVI65Z.js} +1 -1
- package/dist/operation-metering-DB5F7SXN.js +1 -0
- package/dist/server-MI6XN25Z.js +4961 -0
- package/dist/{site-extract-repository-KG6FQU55.js → site-extract-repository-JHSVJJ62.js} +1 -1
- package/dist/stripe-event-worker-7KNF3VH5.js +1 -0
- package/dist/worker-3VTFFYHH.js +1 -0
- package/package.json +1 -1
- package/dist/chunk-NOUHD54C.js +0 -48
- package/dist/chunk-UM4WSLKQ.js +0 -1
- package/dist/db-XN7YPDGC.js +0 -1
- package/dist/gmail-service-5NH2GVQ5.js +0 -1
- package/dist/server-TQJ6Z3ZF.js +0 -4931
- package/dist/stripe-event-worker-ZNNQEVK4.js +0 -1
- package/dist/worker-4LFWAEX2.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as l}from"./chunk-6DTXIZY2.js";import{t as _}from"./chunk-WJ4XFLS4.js";var c=166667e-10,N=.0001333336,I=new Set(["serp","fb_search","fb_ad","instagram"]),p=.00111,L=4,R=4e-4;function o(e,r){let t=process.env[e]?.trim();if(!t)return r;let s=Number(t);return Number.isFinite(s)&&s>=0?s:r}var A=o("NANGO_USD_PER_CONNECTION_MONTH",1),U=o("NANGO_USD_PER_FUNCTION_RUN",1e-4),m=o("NANGO_USD_PER_PROXY_REQUEST",1e-4),g=o("NANGO_USD_PER_COMPUTE_SEC",2e-4),O=o("\u0042\u0052\u0049\u0047\u0048\u0054\u0044\u0041\u0054\u0041_BROWSER_USD_PER_GB",8),D=o("\u0042\u0052\u0049\u0047\u0048\u0054\u0044\u0041\u0054\u0041_SERP_USD_PER_REQUEST",.002836168);function u(e,r){return Math.max(0,e)/1e3*(r?N:c)}function d(e,r){return e==="fal_wizper"?Math.max(0,r)/L*p:e==="deepinfra_qwen"?Math.max(0,r)/1e3*R:e==="openrouter"||e==="mcp_memory_video"||e==="mcp_memory_ai"?Math.max(0,r):e==="nango_connection"?Math.max(0,r)*A:e==="nango_function_run"?Math.max(0,r)*U:e==="nango_proxy_request"?Math.max(0,r)*m:e==="nango_compute"?Math.max(0,r)*g:e==="\u0062\u0072\u0069\u0067\u0068\u0074\u0064\u0061\u0074\u0061_browser_api"?Math.max(0,r)/1e9*O:0}import{randomUUID as i}from"crypto";var E=!1,n=null;async function T(){if(!E)return n||(n=S().finally(()=>{n=null}),n)}async function S(){let e=_(),r=await e.execute(`
|
|
2
2
|
SELECT
|
|
3
3
|
(SELECT COUNT(*) FROM sqlite_master WHERE type = 'table' AND name IN ('\u006b\u0065\u0072\u006e\u0065\u006c_session_log', 'vendor_usage_log', 'cost_probe_runs')) = 3
|
|
4
4
|
AND (SELECT COUNT(*) FROM pragma_table_info('\u006b\u0065\u0072\u006e\u0065\u006c_session_log') WHERE name IN ('proxy_source', 'proxy_type', 'method')) = 3
|
|
@@ -6,7 +6,7 @@ import{t as _}from"./chunk-KKHTMYCD.js";import{AsyncLocalStorage as N}from"async
|
|
|
6
6
|
AND (SELECT COUNT(*) FROM sqlite_master WHERE type = 'index' AND name = 'vendor_usage_log_vendor_source_key') = 1
|
|
7
7
|
AND (SELECT COUNT(*) FROM pragma_table_info('cost_probe_runs') WHERE name IN ('units', 'unit_type', 'mode')) = 3
|
|
8
8
|
AS ready
|
|
9
|
-
`);if(Number(
|
|
9
|
+
`);if(Number(r.rows[0]?.ready??0)===1){E=!0;return}await e.execute(`
|
|
10
10
|
CREATE TABLE IF NOT EXISTS \u006b\u0065\u0072\u006e\u0065\u006c_session_log (
|
|
11
11
|
id TEXT PRIMARY KEY,
|
|
12
12
|
\u006b\u0065\u0072\u006e\u0065\u006c_session_id TEXT,
|
|
@@ -66,8 +66,8 @@ import{t as _}from"./chunk-KKHTMYCD.js";import{AsyncLocalStorage as N}from"async
|
|
|
66
66
|
margin_usd_headful_starter REAL NOT NULL DEFAULT 0,
|
|
67
67
|
notes TEXT
|
|
68
68
|
)
|
|
69
|
-
`),await e.execute("CREATE INDEX IF NOT EXISTS cost_probe_runs_tool ON cost_probe_runs(tool)");try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN units REAL")}catch{}try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN unit_type TEXT")}catch{}try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN mode TEXT")}catch{}E=!0}async function
|
|
69
|
+
`),await e.execute("CREATE INDEX IF NOT EXISTS cost_probe_runs_tool ON cost_probe_runs(tool)");try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN units REAL")}catch{}try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN unit_type TEXT")}catch{}try{await e.execute("ALTER TABLE cost_probe_runs ADD COLUMN mode TEXT")}catch{}E=!0}async function f(e){try{await T();let r=l(),t=Math.max(0,e.closedAtMs-e.openedAtMs);await _().execute({sql:`INSERT INTO \u006b\u0065\u0072\u006e\u0065\u006c_session_log
|
|
70
70
|
(id, \u006b\u0065\u0072\u006e\u0065\u006c_session_id, op, source, probe_run_id, user_id, stealth, headless_sent, proxy_used, proxy_source, proxy_type, fallback, opened_at, closed_at, duration_ms, est_cost_usd_headless, est_cost_usd_headful, error, method)
|
|
71
|
-
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,args:[
|
|
71
|
+
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,args:[i(),e.\u006b\u0065\u0072\u006e\u0065\u006cSessionId??null,r?.op??null,e.source,r?.probeRunId??null,r?.userId??null,a(e.stealth),a(e.headlessSent),a(e.proxyUsed),e.proxySource??null,e.proxyType??null,e.fallback?1:0,new Date(e.openedAtMs).toISOString(),new Date(e.closedAtMs).toISOString(),t,u(t,!1),u(t,!0),e.error??null,r?.subOp??null]})}catch(r){console.warn("[cost-telemetry] record\u004b\u0065\u0072\u006e\u0065\u006cSession failed:",r instanceof Error?r.message:String(r))}}async function v(e){try{await T();let r=l();return(await _().execute({sql:`INSERT OR IGNORE INTO vendor_usage_log
|
|
72
72
|
(id, op, probe_run_id, user_id, vendor, model, units, unit_type, est_cost_usd, error, method, source_key, provider_duration_ms, provider_captcha, provider_status)
|
|
73
|
-
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,args:[
|
|
73
|
+
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,args:[i(),e.op??r?.op??null,e.probeRunId??r?.probeRunId??null,e.userId??r?.userId??null,e.vendor,e.model??null,e.units,e.unitType,d(e.vendor,e.units),e.error??null,e.method??r?.subOp??null,e.sourceKey??null,e.providerDurationMs??null,a(e.providerCaptcha),e.providerStatus??null]})).rowsAffected===1}catch(r){return console.warn("[cost-telemetry] recordVendorUsage failed:",r instanceof Error?r.message:String(r)),!1}}function a(e){return e==null?null:e?1:0}export{c as a,N as b,I as c,u as d,d as e,T as f,f as g,v as h};
|