mcp-scraper 0.3.7 → 0.3.9

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 (34) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/api-server.cjs +9 -4
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +1 -1
  5. package/dist/bin/browser-agent-stdio-server.cjs +9 -12
  6. package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
  7. package/dist/bin/browser-agent-stdio-server.js +2 -2
  8. package/dist/bin/mcp-scraper-cli.cjs +3 -3
  9. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-cli.js +3 -3
  11. package/dist/bin/mcp-scraper-cli.js.map +1 -1
  12. package/dist/bin/mcp-scraper-combined-stdio-server.cjs +10 -13
  13. package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
  14. package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
  15. package/dist/bin/mcp-scraper-install.cjs +1 -1
  16. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  17. package/dist/bin/mcp-scraper-install.js +1 -1
  18. package/dist/bin/mcp-stdio-server.cjs +2 -2
  19. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  20. package/dist/bin/mcp-stdio-server.js +2 -2
  21. package/dist/chunk-7VNTN4Q7.js +7 -0
  22. package/dist/chunk-7VNTN4Q7.js.map +1 -0
  23. package/dist/{chunk-IWNLHCKA.js → chunk-BRUVQRJK.js} +10 -13
  24. package/dist/chunk-BRUVQRJK.js.map +1 -0
  25. package/dist/{chunk-2O7RAK6E.js → chunk-KDKQ5Y7V.js} +3 -3
  26. package/dist/{chunk-2O7RAK6E.js.map → chunk-KDKQ5Y7V.js.map} +1 -1
  27. package/dist/{server-HRVD52CX.js → server-ZSHE4R5Z.js} +10 -5
  28. package/dist/{server-HRVD52CX.js.map → server-ZSHE4R5Z.js.map} +1 -1
  29. package/docs/mcp-tool-craft-lint.generated.md +1 -1
  30. package/docs/mcp-tool-manifest.generated.json +10 -10
  31. package/package.json +1 -1
  32. package/dist/chunk-2NEVRPK3.js +0 -7
  33. package/dist/chunk-2NEVRPK3.js.map +0 -1
  34. package/dist/chunk-IWNLHCKA.js.map +0 -1
@@ -99,7 +99,7 @@ import {
99
99
  harvestTimeoutBudget,
100
100
  liveWebToolAnnotations,
101
101
  outputBaseDir
102
- } from "./chunk-2O7RAK6E.js";
102
+ } from "./chunk-KDKQ5Y7V.js";
103
103
  import {
104
104
  CaptchaError,
105
105
  RECAPTCHA_INSTRUCTIONS,
@@ -132,7 +132,7 @@ import {
132
132
  RawMapsOverviewSchema,
133
133
  RawMapsReviewStatsSchema
134
134
  } from "./chunk-LFATOGDF.js";
135
- import "./chunk-2NEVRPK3.js";
135
+ import "./chunk-7VNTN4Q7.js";
136
136
 
137
137
  // src/api/outbound-sanitize.ts
138
138
  var KEY_RENAMES = {
@@ -14311,12 +14311,14 @@ async function createSession(opts = {}) {
14311
14311
  const resolvedProfileName = opts.profileName ?? browserServiceProfileName();
14312
14312
  const resolvedSaveProfileChanges = opts.saveProfileChanges ?? browserServiceProfileSaveChanges();
14313
14313
  const disableDefaultProxy = opts.disableDefaultProxy ?? !resolvedProxyId;
14314
+ const startUrl = opts.startUrl?.trim();
14314
14315
  if (resolvedProfileName && resolvedSaveProfileChanges === true) {
14315
14316
  await ensureProfile(k, resolvedProfileName);
14316
14317
  }
14317
- const browser = await k.browsers.create({
14318
+ const createPayload = {
14318
14319
  stealth: opts.stealth ?? true,
14319
14320
  timeout_seconds: opts.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS,
14321
+ ...startUrl ? { start_url: startUrl } : {},
14320
14322
  ...resolvedProxyId ? { proxy_id: resolvedProxyId } : {},
14321
14323
  ...resolvedProfileName ? {
14322
14324
  profile: {
@@ -14324,7 +14326,8 @@ async function createSession(opts = {}) {
14324
14326
  ...typeof resolvedSaveProfileChanges === "boolean" ? { save_changes: resolvedSaveProfileChanges } : {}
14325
14327
  }
14326
14328
  } : {}
14327
- });
14329
+ };
14330
+ const browser = await k.browsers.create(createPayload);
14328
14331
  const runtimeSessionId = browser.session_id;
14329
14332
  if (disableDefaultProxy) {
14330
14333
  try {
@@ -14702,6 +14705,7 @@ function buildBrowserAgentRoutes() {
14702
14705
  }
14703
14706
  const body = await c.req.json().catch(() => ({}));
14704
14707
  const timeoutSeconds = typeof body.timeout_seconds === "number" ? body.timeout_seconds : void 0;
14708
+ const startUrl = typeof body.url === "string" ? body.url : void 0;
14705
14709
  const gate = await acquireConcurrencyGate(user, "browser_agent_session", {
14706
14710
  ttlSeconds: browserSessionLockTtlSeconds(timeoutSeconds),
14707
14711
  metadata: { label: typeof body.label === "string" ? body.label : null }
@@ -14714,6 +14718,7 @@ function buildBrowserAgentRoutes() {
14714
14718
  proxyId: typeof body.proxy_id === "string" ? body.proxy_id : void 0,
14715
14719
  profileName: typeof body.profile === "string" ? body.profile : void 0,
14716
14720
  saveProfileChanges: typeof body.save_profile_changes === "boolean" ? body.save_profile_changes : void 0,
14721
+ startUrl,
14717
14722
  disableDefaultProxy: typeof body.disable_default_proxy === "boolean" ? body.disable_default_proxy : void 0,
14718
14723
  viewport: body.viewport && typeof body.viewport === "object" ? body.viewport : void 0
14719
14724
  });
@@ -16447,4 +16452,4 @@ app.get("/blog/:slug/", (c) => {
16447
16452
  export {
16448
16453
  app
16449
16454
  };
16450
- //# sourceMappingURL=server-HRVD52CX.js.map
16455
+ //# sourceMappingURL=server-ZSHE4R5Z.js.map