mcp-scraper 0.4.14 → 0.5.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.
Files changed (33) hide show
  1. package/dist/bin/api-server.cjs +14 -13
  2. package/dist/bin/api-server.cjs.map +1 -1
  3. package/dist/bin/api-server.js +2 -2
  4. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  5. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  6. package/dist/bin/mcp-scraper-cli.js +1 -1
  7. package/dist/bin/mcp-scraper-install.cjs +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  9. package/dist/bin/mcp-scraper-install.js +1 -1
  10. package/dist/bin/mcp-stdio-server.cjs +269 -3
  11. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  12. package/dist/bin/mcp-stdio-server.js +3 -2
  13. package/dist/bin/mcp-stdio-server.js.map +1 -1
  14. package/dist/chunk-3RTPEQJC.js +7 -0
  15. package/dist/chunk-3RTPEQJC.js.map +1 -0
  16. package/dist/{chunk-SIPXEFTR.js → chunk-APJO2XV5.js} +6 -6
  17. package/dist/chunk-APJO2XV5.js.map +1 -0
  18. package/dist/{chunk-VQV7MB2S.js → chunk-BL7BBSYF.js} +2 -2
  19. package/dist/{chunk-XZ2GPRCM.js → chunk-J4T5OSCF.js} +7 -4
  20. package/dist/chunk-J4T5OSCF.js.map +1 -0
  21. package/dist/{server-TGORO4AJ.js → server-Z4MEISH5.js} +13 -13
  22. package/dist/server-Z4MEISH5.js.map +1 -0
  23. package/dist/{site-extract-repository-6X2C7RLF.js → site-extract-repository-U476J44K.js} +3 -3
  24. package/dist/{worker-WCSKUAOT.js → worker-KJZ3ZN2N.js} +2 -2
  25. package/package.json +1 -1
  26. package/dist/chunk-OL65BO4S.js +0 -7
  27. package/dist/chunk-OL65BO4S.js.map +0 -1
  28. package/dist/chunk-SIPXEFTR.js.map +0 -1
  29. package/dist/chunk-XZ2GPRCM.js.map +0 -1
  30. package/dist/server-TGORO4AJ.js.map +0 -1
  31. /package/dist/{chunk-VQV7MB2S.js.map → chunk-BL7BBSYF.js.map} +0 -0
  32. /package/dist/{site-extract-repository-6X2C7RLF.js.map → site-extract-repository-U476J44K.js.map} +0 -0
  33. /package/dist/{worker-WCSKUAOT.js.map → worker-KJZ3ZN2N.js.map} +0 -0
@@ -33,7 +33,7 @@ import {
33
33
  registerSerpIntelligenceCaptureTools,
34
34
  sanitizeAttempts,
35
35
  sanitizeHarvestResult
36
- } from "./chunk-XZ2GPRCM.js";
36
+ } from "./chunk-J4T5OSCF.js";
37
37
  import {
38
38
  auditImages,
39
39
  getBlobStore
@@ -67,7 +67,7 @@ import {
67
67
  RawMapsOverviewSchema,
68
68
  RawMapsReviewStatsSchema
69
69
  } from "./chunk-XGIPATLV.js";
70
- import "./chunk-OL65BO4S.js";
70
+ import "./chunk-3RTPEQJC.js";
71
71
  import {
72
72
  completeExtractJob,
73
73
  countSuccessfulPages,
@@ -78,7 +78,7 @@ import {
78
78
  saveExtractPages,
79
79
  setExtractJobTotal,
80
80
  settleExtractJob
81
- } from "./chunk-VQV7MB2S.js";
81
+ } from "./chunk-BL7BBSYF.js";
82
82
  import {
83
83
  BROWSER_OPEN_MIN_BALANCE_MC,
84
84
  CONCURRENCY_PRICE_ID,
@@ -101,7 +101,7 @@ import {
101
101
  browserActiveCostMc,
102
102
  concurrencySlotBillingInfo,
103
103
  insufficientBalanceResponse
104
- } from "./chunk-SIPXEFTR.js";
104
+ } from "./chunk-APJO2XV5.js";
105
105
  import {
106
106
  CaptchaError,
107
107
  RECAPTCHA_INSTRUCTIONS,
@@ -15437,7 +15437,7 @@ serpIntelligenceApp.post("/capture", async (c) => {
15437
15437
  kernelApiKey: browserServiceApiKey(),
15438
15438
  kernelProxyId: browserServiceProxyId(),
15439
15439
  signal: c.req.raw.signal,
15440
- billing: { creditsUsed: cost / 1e3 }
15440
+ billing: { creditsUsed: cost / MC_PER_CREDIT }
15441
15441
  });
15442
15442
  await logRequestEvent({
15443
15443
  userId: user.id,
@@ -20597,7 +20597,7 @@ app.get("/me", async (c) => {
20597
20597
  api_key: user.key_active ? user.api_key : null,
20598
20598
  created_at: user.created_at,
20599
20599
  balance_mc: user.balance_mc,
20600
- balance_credits: user.balance_mc / 1e3,
20600
+ balance_credits: user.balance_mc / MC_PER_CREDIT,
20601
20601
  extra_concurrency_slots: user.extra_concurrency_slots,
20602
20602
  concurrency_limit: concurrencyLimitForUser(user),
20603
20603
  has_concurrency_sub: !!user.concurrency_stripe_sub_id,
@@ -21759,7 +21759,7 @@ app.post("/billing/subscribe/terminal-checkout", auth2, async (c) => {
21759
21759
  tier: tier.tier,
21760
21760
  label: tier.label,
21761
21761
  monthly_usd: tier.monthly_usd,
21762
- credits_per_month: tier.credits_mc / 1e3,
21762
+ credits_per_month: tier.credits_mc / MC_PER_CREDIT,
21763
21763
  concurrency: tier.concurrency,
21764
21764
  intro: tier.intro_coupon ? "$1 first month" : null,
21765
21765
  next_step: "Open checkout_url in a browser to complete payment."
@@ -21789,7 +21789,7 @@ app.get("/billing/balance", auth2, async (c) => {
21789
21789
  const freeCredits = await getFreeCreditBreakdown(user.id);
21790
21790
  return c.json({
21791
21791
  balance_mc: balanceMc,
21792
- balance_credits: balanceMc / 1e3,
21792
+ balance_credits: balanceMc / MC_PER_CREDIT,
21793
21793
  free_credits: freeCredits,
21794
21794
  ledger
21795
21795
  });
@@ -21811,7 +21811,7 @@ app.post("/billing/credits", auth2, async (c) => {
21811
21811
  })) : void 0;
21812
21812
  return c.json({
21813
21813
  balance_mc: balanceMc,
21814
- balance_credits: balanceMc / 1e3,
21814
+ balance_credits: balanceMc / MC_PER_CREDIT,
21815
21815
  item: body.item ?? null,
21816
21816
  matched_cost: matchedCost ? (({ aliases, ...cost }) => cost)(matchedCost) : null,
21817
21817
  costs,
@@ -21829,7 +21829,7 @@ app.get("/cron/tick", async (c) => {
21829
21829
  if (!process.env.CRON_SECRET || secret2 !== `Bearer ${process.env.CRON_SECRET}`) {
21830
21830
  return c.json({ error: "Unauthorized" }, 401);
21831
21831
  }
21832
- const { drainQueue } = await import("./worker-WCSKUAOT.js");
21832
+ const { drainQueue } = await import("./worker-KJZ3ZN2N.js");
21833
21833
  const budget = { maxJobs: 10, deadlineMs: Date.now() + 28e4 };
21834
21834
  const workflowDispatchResult = await dispatchDueWorkflowSchedules(`${new URL(c.req.url).protocol}//${new URL(c.req.url).host}`);
21835
21835
  const [results, sweepResult, reapResult, expiredResult, blobCleanup] = await Promise.all([
@@ -21847,7 +21847,7 @@ app.post("/api/internal/extract-refinalize/:id", async (c) => {
21847
21847
  return c.json({ error: "Unauthorized" }, 401);
21848
21848
  }
21849
21849
  const jobId = c.req.param("id");
21850
- const { getExtractJob: getExtractJob2, completeExtractJob: completeExtractJob2 } = await import("./site-extract-repository-6X2C7RLF.js");
21850
+ const { getExtractJob: getExtractJob2, completeExtractJob: completeExtractJob2 } = await import("./site-extract-repository-U476J44K.js");
21851
21851
  const { assembleExtractArtifacts } = await import("./extract-bundle-COS56ZDO.js");
21852
21852
  const job = await getExtractJob2(jobId);
21853
21853
  if (!job) return c.json({ error: "job not found" }, 404);
@@ -21855,7 +21855,7 @@ app.post("/api/internal/extract-refinalize/:id", async (c) => {
21855
21855
  await completeExtractJob2(jobId, stored);
21856
21856
  let settlement = "already_settled_or_refunded";
21857
21857
  if (job.billedMc == null && job.userId != null) {
21858
- const { settleExtractJob: settleExtractJob2, countSuccessfulPages: countSuccessfulPages2 } = await import("./site-extract-repository-6X2C7RLF.js");
21858
+ const { settleExtractJob: settleExtractJob2, countSuccessfulPages: countSuccessfulPages2 } = await import("./site-extract-repository-U476J44K.js");
21859
21859
  const heldMc = Number(job.options.heldMc ?? 0);
21860
21860
  const successful = await countSuccessfulPages2(jobId);
21861
21861
  const usedMc = Math.min(successful * MC_COSTS.page_scrape, heldMc);
@@ -22019,4 +22019,4 @@ app.get("/blog/:slug/", (c) => {
22019
22019
  export {
22020
22020
  app
22021
22021
  };
22022
- //# sourceMappingURL=server-TGORO4AJ.js.map
22022
+ //# sourceMappingURL=server-Z4MEISH5.js.map