@crawlee/basic 3.17.1-beta.22 → 3.17.1-beta.23

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.
@@ -719,5 +719,6 @@ interface HandlePropertyNameChangeData<New, Old> {
719
719
  * await crawler.run();
720
720
  * ```
721
721
  */
722
- export declare function createBasicRouter<Context extends BasicCrawlingContext = BasicCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): RouterHandler<Context>;
722
+ export declare function createBasicRouter<Context extends BasicCrawlingContext = BasicCrawlingContext, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<Context['request']>>>(routes?: RouterRoutes<Context, Routes>): RouterHandler<Context, Routes>;
723
+ export declare function createBasicRouter<Context extends BasicCrawlingContext = BasicCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, Record<string, UserData>>): RouterHandler<Context, Record<string, UserData>>;
723
724
  export {};
@@ -1506,30 +1506,6 @@ Object.defineProperty(BasicCrawler, "optionsShape", {
1506
1506
  statisticsOptions: ow_1.default.optional.object,
1507
1507
  }
1508
1508
  });
1509
- /**
1510
- * Creates new {@link Router} instance that works based on request labels.
1511
- * This instance can then serve as a {@link BasicCrawlerOptions.requestHandler|`requestHandler`} of our {@link BasicCrawler}.
1512
- * Defaults to the {@link BasicCrawlingContext}.
1513
- *
1514
- * > Serves as a shortcut for using `Router.create<BasicCrawlingContext>()`.
1515
- *
1516
- * ```ts
1517
- * import { BasicCrawler, createBasicRouter } from 'crawlee';
1518
- *
1519
- * const router = createBasicRouter();
1520
- * router.addHandler('label-a', async (ctx) => {
1521
- * ctx.log.info('...');
1522
- * });
1523
- * router.addDefaultHandler(async (ctx) => {
1524
- * ctx.log.info('...');
1525
- * });
1526
- *
1527
- * const crawler = new BasicCrawler({
1528
- * requestHandler: router,
1529
- * });
1530
- * await crawler.run();
1531
- * ```
1532
- */
1533
1509
  function createBasicRouter(routes) {
1534
1510
  return core_1.Router.create(routes);
1535
1511
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/basic",
3
- "version": "3.17.1-beta.22",
3
+ "version": "3.17.1-beta.23",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -48,9 +48,9 @@
48
48
  "@apify/log": "^2.4.0",
49
49
  "@apify/timeout": "^0.3.0",
50
50
  "@apify/utilities": "^2.7.10",
51
- "@crawlee/core": "3.17.1-beta.22",
52
- "@crawlee/types": "3.17.1-beta.22",
53
- "@crawlee/utils": "3.17.1-beta.22",
51
+ "@crawlee/core": "3.17.1-beta.23",
52
+ "@crawlee/types": "3.17.1-beta.23",
53
+ "@crawlee/utils": "3.17.1-beta.23",
54
54
  "csv-stringify": "^6.2.0",
55
55
  "fs-extra": "^11.0.0",
56
56
  "got-scraping": "^4.2.1",
@@ -66,5 +66,5 @@
66
66
  }
67
67
  }
68
68
  },
69
- "gitHead": "913fa8ac27d9a04e8a8b87df05d1c6c9ab7f3a87"
69
+ "gitHead": "704d91af7d46c2efaf8bff883025e4a7d8ffd6d7"
70
70
  }