@browserless.io/browserless 2.13.1-beta.1 → 2.15.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/CHANGELOG.md +12 -3
- package/bin/browserless.js +0 -0
- package/build/browserless.d.ts +0 -2
- package/build/browsers/browsers.cdp.d.ts +0 -5
- package/build/browsers/browsers.playwright.d.ts +33 -37
- package/build/browsers/index.d.ts +1 -2
- package/build/config.d.ts +0 -2
- package/build/file-system.d.ts +0 -2
- package/build/hooks.d.ts +0 -1
- package/build/http.d.ts +0 -1
- package/build/limiter.d.ts +5 -0
- package/build/limiter.js +3 -0
- package/build/limiter.spec.js +1 -1
- package/build/metrics.d.ts +0 -1
- package/build/monitoring.d.ts +0 -1
- package/build/router.d.ts +0 -3
- package/build/routes/chrome/http/content.post.body.json +16 -9
- package/build/routes/chrome/http/pdf.post.body.json +16 -9
- package/build/routes/chrome/http/scrape.post.body.json +16 -9
- package/build/routes/chrome/http/screenshot.post.body.json +16 -9
- package/build/routes/chromium/http/content.post.body.json +16 -9
- package/build/routes/chromium/http/pdf.post.body.json +16 -9
- package/build/routes/chromium/http/scrape.post.body.json +16 -9
- package/build/routes/chromium/http/screenshot.post.body.json +16 -9
- package/build/routes/firefox/ws/playwright.d.ts +0 -2
- package/build/routes/management/http/active.get.d.ts +0 -1
- package/build/routes/management/http/config.get.d.ts +0 -1
- package/build/routes/management/http/metrics-total.get.d.ts +0 -1
- package/build/routes/management/http/metrics.get.d.ts +0 -1
- package/build/routes/management/http/pressure.get.d.ts +0 -1
- package/build/routes/management/http/sessions.get.d.ts +0 -1
- package/build/routes/management/http/static.get.d.ts +0 -1
- package/build/routes/webkit/ws/playwright.d.ts +0 -2
- package/build/server.d.ts +0 -4
- package/build/shared/browser.ws.d.ts +0 -2
- package/build/shared/chromium.playwright.ws.d.ts +0 -2
- package/build/shared/chromium.ws.d.ts +0 -2
- package/build/shared/content.http.d.ts +0 -1
- package/build/shared/download.http.d.ts +0 -1
- package/build/shared/function.http.d.ts +0 -1
- package/build/shared/page.ws.d.ts +0 -2
- package/build/shared/pdf.http.d.ts +0 -1
- package/build/shared/performance.http.d.ts +0 -1
- package/build/shared/scrape.http.d.ts +0 -1
- package/build/shared/screenshot.http.d.ts +0 -1
- package/build/token.d.ts +0 -1
- package/build/types.d.ts +0 -3
- package/build/utils.d.ts +0 -3
- package/build/webhooks.d.ts +0 -1
- package/fonts/Calibri Bold Italic.ttf +0 -0
- package/fonts/Calibri Bold.TTF +0 -0
- package/fonts/Calibri Italic.ttf +0 -0
- package/fonts/Calibri Light Italic.ttf +0 -0
- package/fonts/Calibri Light.ttf +0 -0
- package/fonts/Calibri Regular.ttf +0 -0
- package/package.json +17 -17
- package/scripts/start.sh +0 -0
- package/scripts/test.sh +0 -0
- package/src/limiter.spec.ts +1 -1
- package/src/limiter.ts +8 -0
- package/static/docs/swagger.json +4798 -48
- package/static/docs/swagger.min.json +4797 -47
- package/static/function/client.js +1364 -792
- package/static/function/index.html +1364 -792
- package/static/assets +0 -1
|
@@ -117,7 +117,14 @@
|
|
|
117
117
|
"type": "string"
|
|
118
118
|
},
|
|
119
119
|
"viewport": {
|
|
120
|
-
"
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"$ref": "#/definitions/Viewport"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "null"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
121
128
|
},
|
|
122
129
|
"waitForEvent": {
|
|
123
130
|
"type": "object",
|
|
@@ -448,14 +455,14 @@
|
|
|
448
455
|
"length": {
|
|
449
456
|
"type": "number"
|
|
450
457
|
},
|
|
451
|
-
"__@toStringTag@
|
|
458
|
+
"__@toStringTag@254051": {
|
|
452
459
|
"type": "string",
|
|
453
460
|
"const": "Uint8Array"
|
|
454
461
|
}
|
|
455
462
|
},
|
|
456
463
|
"required": [
|
|
457
464
|
"BYTES_PER_ELEMENT",
|
|
458
|
-
"__@toStringTag@
|
|
465
|
+
"__@toStringTag@254051",
|
|
459
466
|
"buffer",
|
|
460
467
|
"byteLength",
|
|
461
468
|
"byteOffset",
|
|
@@ -490,13 +497,13 @@
|
|
|
490
497
|
"byteLength": {
|
|
491
498
|
"type": "number"
|
|
492
499
|
},
|
|
493
|
-
"__@toStringTag@
|
|
500
|
+
"__@toStringTag@254051": {
|
|
494
501
|
"type": "string"
|
|
495
502
|
}
|
|
496
503
|
},
|
|
497
504
|
"additionalProperties": false,
|
|
498
505
|
"required": [
|
|
499
|
-
"__@toStringTag@
|
|
506
|
+
"__@toStringTag@254051",
|
|
500
507
|
"byteLength"
|
|
501
508
|
]
|
|
502
509
|
},
|
|
@@ -506,18 +513,18 @@
|
|
|
506
513
|
"byteLength": {
|
|
507
514
|
"type": "number"
|
|
508
515
|
},
|
|
509
|
-
"__@species@
|
|
516
|
+
"__@species@254152": {
|
|
510
517
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
511
518
|
},
|
|
512
|
-
"__@toStringTag@
|
|
519
|
+
"__@toStringTag@254051": {
|
|
513
520
|
"type": "string",
|
|
514
521
|
"const": "SharedArrayBuffer"
|
|
515
522
|
}
|
|
516
523
|
},
|
|
517
524
|
"additionalProperties": false,
|
|
518
525
|
"required": [
|
|
519
|
-
"__@species@
|
|
520
|
-
"__@toStringTag@
|
|
526
|
+
"__@species@254152",
|
|
527
|
+
"__@toStringTag@254051",
|
|
521
528
|
"byteLength"
|
|
522
529
|
]
|
|
523
530
|
},
|
|
@@ -117,7 +117,14 @@
|
|
|
117
117
|
"type": "string"
|
|
118
118
|
},
|
|
119
119
|
"viewport": {
|
|
120
|
-
"
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"$ref": "#/definitions/Viewport"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "null"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
121
128
|
},
|
|
122
129
|
"waitForEvent": {
|
|
123
130
|
"type": "object",
|
|
@@ -491,14 +498,14 @@
|
|
|
491
498
|
"length": {
|
|
492
499
|
"type": "number"
|
|
493
500
|
},
|
|
494
|
-
"__@toStringTag@
|
|
501
|
+
"__@toStringTag@231880": {
|
|
495
502
|
"type": "string",
|
|
496
503
|
"const": "Uint8Array"
|
|
497
504
|
}
|
|
498
505
|
},
|
|
499
506
|
"required": [
|
|
500
507
|
"BYTES_PER_ELEMENT",
|
|
501
|
-
"__@toStringTag@
|
|
508
|
+
"__@toStringTag@231880",
|
|
502
509
|
"buffer",
|
|
503
510
|
"byteLength",
|
|
504
511
|
"byteOffset",
|
|
@@ -533,13 +540,13 @@
|
|
|
533
540
|
"byteLength": {
|
|
534
541
|
"type": "number"
|
|
535
542
|
},
|
|
536
|
-
"__@toStringTag@
|
|
543
|
+
"__@toStringTag@231880": {
|
|
537
544
|
"type": "string"
|
|
538
545
|
}
|
|
539
546
|
},
|
|
540
547
|
"additionalProperties": false,
|
|
541
548
|
"required": [
|
|
542
|
-
"__@toStringTag@
|
|
549
|
+
"__@toStringTag@231880",
|
|
543
550
|
"byteLength"
|
|
544
551
|
]
|
|
545
552
|
},
|
|
@@ -549,18 +556,18 @@
|
|
|
549
556
|
"byteLength": {
|
|
550
557
|
"type": "number"
|
|
551
558
|
},
|
|
552
|
-
"__@species@
|
|
559
|
+
"__@species@231981": {
|
|
553
560
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
554
561
|
},
|
|
555
|
-
"__@toStringTag@
|
|
562
|
+
"__@toStringTag@231880": {
|
|
556
563
|
"type": "string",
|
|
557
564
|
"const": "SharedArrayBuffer"
|
|
558
565
|
}
|
|
559
566
|
},
|
|
560
567
|
"additionalProperties": false,
|
|
561
568
|
"required": [
|
|
562
|
-
"__@species@
|
|
563
|
-
"__@toStringTag@
|
|
569
|
+
"__@species@231981",
|
|
570
|
+
"__@toStringTag@231880",
|
|
564
571
|
"byteLength"
|
|
565
572
|
]
|
|
566
573
|
},
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserServerOptions, BrowserWebsocketRoute, FirefoxPlaywright, Logger, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, HTTPManagementRoutes, HTTPRoute, IBrowserlessMetricTotals, Methods, Request, contentTypes } from '@browserless.io/browserless';
|
|
3
2
|
import { ServerResponse } from 'http';
|
|
4
3
|
export type ResponseSchema = IBrowserlessMetricTotals;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserlessSessionJSON, HTTPManagementRoutes, HTTPRoute, Methods, Request, SystemQueryParameters, contentTypes } from '@browserless.io/browserless';
|
|
3
2
|
import { ServerResponse } from 'http';
|
|
4
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserServerOptions, BrowserWebsocketRoute, Logger, Request, SystemQueryParameters, WebKitPlaywright, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
package/build/server.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
1
|
import * as http from 'http';
|
|
6
2
|
import * as stream from 'stream';
|
|
7
3
|
import { Logger as BlessLogger, Config, Hooks, Metrics, Request, Response, Router, Token } from '@browserless.io/browserless';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserWebsocketRoute, CDPLaunchOptions, ChromiumCDP, Logger, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserServerOptions, BrowserWebsocketRoute, ChromiumPlaywright, Logger, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserWebsocketRoute, CDPLaunchOptions, ChromiumCDP, Logger, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, WaitForEventOptions, WaitForFunctionOptions, WaitForSelectorOptions, bestAttempt, contentTypes, rejectRequestPattern, rejectResourceTypes, requestInterceptors, setJavaScriptEnabled } from '@browserless.io/browserless';
|
|
3
2
|
import { Page } from 'puppeteer-core';
|
|
4
3
|
import { ServerResponse } from 'http';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, contentTypes } from '@browserless.io/browserless';
|
|
3
2
|
import { ServerResponse } from 'http';
|
|
4
3
|
interface JSONSchema {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, contentTypes } from '@browserless.io/browserless';
|
|
3
2
|
import { ServerResponse } from 'http';
|
|
4
3
|
interface JSONSchema {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { APITags, BrowserWebsocketRoute, CDPLaunchOptions, ChromiumCDP, Logger, Request, SystemQueryParameters, WebsocketRoutes } from '@browserless.io/browserless';
|
|
4
2
|
import { Duplex } from 'stream';
|
|
5
3
|
export interface QuerySchema extends SystemQueryParameters {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, WaitForEventOptions, WaitForFunctionOptions, WaitForSelectorOptions, bestAttempt, contentTypes, rejectRequestPattern, rejectResourceTypes, requestInterceptors } from '@browserless.io/browserless';
|
|
3
2
|
import { Page } from 'puppeteer-core';
|
|
4
3
|
import { ServerResponse } from 'http';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, contentTypes } from '@browserless.io/browserless';
|
|
3
2
|
import { ServerResponse } from 'http';
|
|
4
3
|
export interface BodySchema {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, InBoundRequest, Logger, Methods, OutBoundRequest, Request, ScrapeDebugOptions, ScrapeElementSelector, SystemQueryParameters, WaitForEventOptions, WaitForFunctionOptions, WaitForSelectorOptions, bestAttempt, contentTypes, rejectRequestPattern, rejectResourceTypes, requestInterceptors } from '@browserless.io/browserless';
|
|
3
2
|
import { Cookie, Page } from 'puppeteer-core';
|
|
4
3
|
import { ServerResponse } from 'http';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { APITags, BrowserHTTPRoute, BrowserInstance, CDPLaunchOptions, ChromiumCDP, HTTPRoutes, Logger, Methods, Request, SystemQueryParameters, WaitForEventOptions, WaitForFunctionOptions, WaitForSelectorOptions, bestAttempt, contentTypes, rejectRequestPattern, rejectResourceTypes, requestInterceptors } from '@browserless.io/browserless';
|
|
3
2
|
import { Page } from 'puppeteer-core';
|
|
4
3
|
import { ServerResponse } from 'http';
|
package/build/token.d.ts
CHANGED
package/build/types.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
1
|
import * as http from 'http';
|
|
5
2
|
import * as stream from 'stream';
|
|
6
3
|
import { APITags, Browserless, ChromiumCDP, ChromiumPlaywright, Config, FirefoxPlaywright, HTTPManagementRoutes, HTTPRoutes, Logger, Methods, Metrics, Request, WebKitPlaywright, WebsocketRoutes, contentTypes } from '@browserless.io/browserless';
|
package/build/utils.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
1
|
import { ChromiumCDP, ChromiumPlaywright, Config, FirefoxPlaywright, Request, WaitForEventOptions, WaitForFunctionOptions, WebKitPlaywright, codes, contentTypes } from '@browserless.io/browserless';
|
|
5
2
|
import { CDPSession } from 'playwright-core';
|
|
6
3
|
import { Duplex } from 'stream';
|
package/build/webhooks.d.ts
CHANGED
|
File without changes
|
package/fonts/Calibri Bold.TTF
CHANGED
|
File without changes
|
package/fonts/Calibri Italic.ttf
CHANGED
|
File without changes
|
|
File without changes
|
package/fonts/Calibri Light.ttf
CHANGED
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserless.io/browserless",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"license": "SSPL",
|
|
5
5
|
"description": "The browserless platform",
|
|
6
6
|
"author": "browserless.io",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"get-port": "^7.1.0",
|
|
56
56
|
"gradient-string": "^2.0.0",
|
|
57
57
|
"http-proxy": "^1.18.1",
|
|
58
|
-
"lighthouse": "^12.
|
|
58
|
+
"lighthouse": "^12.1.0",
|
|
59
59
|
"micromatch": "^4.0.7",
|
|
60
|
-
"playwright-1.40": "npm:playwright-core@1.40.1",
|
|
61
60
|
"playwright-1.41": "npm:playwright-core@1.41.2",
|
|
62
61
|
"playwright-1.42": "npm:playwright-core@1.42.1",
|
|
63
62
|
"playwright-1.43": "npm:playwright-core@1.43.1",
|
|
64
|
-
"playwright-
|
|
65
|
-
"
|
|
63
|
+
"playwright-1.44": "npm:playwright-core@1.44.1",
|
|
64
|
+
"playwright-core": "^1.45.1",
|
|
65
|
+
"puppeteer-core": "^22.12.1",
|
|
66
66
|
"puppeteer-extra": "^3.3.6",
|
|
67
67
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
68
68
|
"queue": "^7.0.0",
|
|
@@ -74,38 +74,38 @@
|
|
|
74
74
|
"@types/debug": "^4.1.12",
|
|
75
75
|
"@types/gradient-string": "^1.1.6",
|
|
76
76
|
"@types/http-proxy": "^1.17.14",
|
|
77
|
-
"@types/micromatch": "^4.0.
|
|
78
|
-
"@types/mocha": "^10.0.
|
|
79
|
-
"@types/node": "^20.14.
|
|
77
|
+
"@types/micromatch": "^4.0.9",
|
|
78
|
+
"@types/mocha": "^10.0.7",
|
|
79
|
+
"@types/node": "^20.14.9",
|
|
80
80
|
"@types/sinon": "^17.0.3",
|
|
81
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
82
|
-
"@typescript-eslint/parser": "^7.
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
82
|
+
"@typescript-eslint/parser": "^7.15.0",
|
|
83
83
|
"assert": "^2.0.0",
|
|
84
84
|
"chai": "^5.1.1",
|
|
85
85
|
"cross-env": "^7.0.3",
|
|
86
86
|
"env-cmd": "^10.1.0",
|
|
87
|
-
"esbuild": "^0.
|
|
87
|
+
"esbuild": "^0.23.0",
|
|
88
88
|
"esbuild-plugin-polyfill-node": "^0.3.0",
|
|
89
89
|
"eslint": "^8.57.0",
|
|
90
90
|
"eslint-plugin-typescript-sort-keys": "^3.2.0",
|
|
91
91
|
"extract-zip": "^2.0.1",
|
|
92
92
|
"gunzip-maybe": "^1.4.2",
|
|
93
|
-
"marked": "^13.0.
|
|
94
|
-
"mocha": "^10.
|
|
93
|
+
"marked": "^13.0.1",
|
|
94
|
+
"mocha": "^10.6.0",
|
|
95
95
|
"move-file": "^3.1.0",
|
|
96
96
|
"prettier": "^3.3.2",
|
|
97
97
|
"sinon": "^18.0.0",
|
|
98
98
|
"ts-node": "^10.9.2",
|
|
99
|
-
"typescript": "^5.
|
|
99
|
+
"typescript": "^5.5.3",
|
|
100
100
|
"typescript-json-schema": "^0.64.0"
|
|
101
101
|
},
|
|
102
102
|
"playwrightVersions": {
|
|
103
103
|
"default": "playwright-core",
|
|
104
|
-
"1.
|
|
104
|
+
"1.45": "playwright-core",
|
|
105
|
+
"1.44": "playwright-1.44",
|
|
105
106
|
"1.43": "playwright-1.43",
|
|
106
107
|
"1.42": "playwright-1.42",
|
|
107
|
-
"1.41": "playwright-1.41"
|
|
108
|
-
"1.40": "playwright-1.40"
|
|
108
|
+
"1.41": "playwright-1.41"
|
|
109
109
|
},
|
|
110
110
|
"eslintConfig": {
|
|
111
111
|
"root": true,
|
package/scripts/start.sh
CHANGED
|
File without changes
|
package/scripts/test.sh
CHANGED
|
File without changes
|
package/src/limiter.spec.ts
CHANGED
|
@@ -135,7 +135,7 @@ describe(`Limiter`, () => {
|
|
|
135
135
|
const job = limiter.limit(spy, asyncNoop, asyncNoop, noop);
|
|
136
136
|
await job().catch(noop);
|
|
137
137
|
|
|
138
|
-
limiter.addEventListener('
|
|
138
|
+
limiter.addEventListener('error', (res) => {
|
|
139
139
|
// 'end' callback fires before the failed callback hooks do, so nextTick to wait
|
|
140
140
|
process.nextTick(() => {
|
|
141
141
|
expect(res.detail.error).to.eql(error);
|
package/src/limiter.ts
CHANGED
|
@@ -73,6 +73,14 @@ export class Limiter extends q {
|
|
|
73
73
|
this.addEventListener('end', this.handleEnd.bind(this));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
protected _errorHandler({
|
|
77
|
+
detail: { error },
|
|
78
|
+
}: {
|
|
79
|
+
detail: { error: unknown };
|
|
80
|
+
}) {
|
|
81
|
+
this.logger.error(error);
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
protected handleEnd() {
|
|
77
85
|
this.logQueue('All jobs complete.');
|
|
78
86
|
}
|