@serwist/background-sync 9.0.0-preview.8 → 9.0.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/dist/Queue.d.ts DELETED
@@ -1,170 +0,0 @@
1
- interface OnSyncCallbackOptions {
2
- queue: Queue;
3
- }
4
- interface OnSyncCallback {
5
- (options: OnSyncCallbackOptions): void | Promise<void>;
6
- }
7
- export interface QueueOptions {
8
- /**
9
- * If `true`, instead of attempting to use background sync events, always attempt
10
- * to replay queued request at service worker startup. Most folks will not need
11
- * this, unless you explicitly target a runtime like Electron that exposes the
12
- * interfaces for background sync, but does not have a working implementation.
13
- *
14
- * @default false
15
- */
16
- forceSyncFallback?: boolean;
17
- /**
18
- * The amount of time (in minutes) a request may be retried. After this amount
19
- * of time has passed, the request will be deleted from the queue.
20
- *
21
- * @default 60 * 24 * 7
22
- */
23
- maxRetentionTime?: number;
24
- /**
25
- * A function that gets invoked whenever the 'sync' event fires. The function
26
- * is invoked with an object containing the `queue` property (referencing this
27
- * instance), and you can use the callback to customize the replay behavior of
28
- * the queue. When not set the `replayRequests()` method is called. Note: if the
29
- * replay fails after a sync event, make sure you throw an error, so the browser
30
- * knows to retry the sync event later.
31
- */
32
- onSync?: OnSyncCallback;
33
- }
34
- export interface QueueEntry {
35
- /**
36
- * The request to store in the queue.
37
- */
38
- request: Request;
39
- /**
40
- * The timestamp (Epoch time in milliseconds) when the request was first added
41
- * to the queue. This is used along with `maxRetentionTime` to remove outdated
42
- * requests. In general you don't need to set this value, as it's automatically
43
- * set for you (defaulting to `Date.now()`), but you can update it if you don't
44
- * want particular requests to expire.
45
- */
46
- timestamp?: number;
47
- /**
48
- * Any metadata you want associated with the stored request. When requests are
49
- * replayed you'll have access to this metadata object in case you need to modify
50
- * the request beforehand.
51
- */
52
- metadata?: Record<string, unknown>;
53
- }
54
- /**
55
- * A class to manage storing failed requests in IndexedDB and retrying them
56
- * later. All parts of the storing and replaying process are observable via
57
- * callbacks.
58
- */
59
- declare class Queue {
60
- private readonly _name;
61
- private readonly _onSync;
62
- private readonly _maxRetentionTime;
63
- private readonly _queueStore;
64
- private readonly _forceSyncFallback;
65
- private _syncInProgress;
66
- private _requestsAddedDuringSync;
67
- /**
68
- * Creates an instance of Queue with the given options
69
- *
70
- * @param name The unique name for this queue. This name must be
71
- * unique as it's used to register sync events and store requests
72
- * in IndexedDB specific to this instance. An error will be thrown if
73
- * a duplicate name is detected.
74
- * @param options
75
- */
76
- constructor(name: string, { forceSyncFallback, onSync, maxRetentionTime }?: QueueOptions);
77
- /**
78
- * @returns
79
- */
80
- get name(): string;
81
- /**
82
- * Stores the passed request in IndexedDB (with its timestamp and any
83
- * metadata) at the end of the queue.
84
- *
85
- * @param entry
86
- */
87
- pushRequest(entry: QueueEntry): Promise<void>;
88
- /**
89
- * Stores the passed request in IndexedDB (with its timestamp and any
90
- * metadata) at the beginning of the queue.
91
- *
92
- * @param entry
93
- */
94
- unshiftRequest(entry: QueueEntry): Promise<void>;
95
- /**
96
- * Removes and returns the last request in the queue (along with its
97
- * timestamp and any metadata). The returned object takes the form:
98
- * `{request, timestamp, metadata}`.
99
- *
100
- * @returns
101
- */
102
- popRequest(): Promise<QueueEntry | undefined>;
103
- /**
104
- * Removes and returns the first request in the queue (along with its
105
- * timestamp and any metadata). The returned object takes the form:
106
- * `{request, timestamp, metadata}`.
107
- *
108
- * @returns
109
- */
110
- shiftRequest(): Promise<QueueEntry | undefined>;
111
- /**
112
- * Returns all the entries that have not expired (per `maxRetentionTime`).
113
- * Any expired entries are removed from the queue.
114
- *
115
- * @returns
116
- */
117
- getAll(): Promise<QueueEntry[]>;
118
- /**
119
- * Returns the number of entries present in the queue.
120
- * Note that expired entries (per `maxRetentionTime`) are also included in this count.
121
- *
122
- * @returns
123
- */
124
- size(): Promise<number>;
125
- /**
126
- * Adds the entry to the QueueStore and registers for a sync event.
127
- *
128
- * @param entry
129
- * @param operation
130
- * @private
131
- */
132
- _addRequest({ request, metadata, timestamp }: QueueEntry, operation: "push" | "unshift"): Promise<void>;
133
- /**
134
- * Removes and returns the first or last (depending on `operation`) entry
135
- * from the QueueStore that's not older than the `maxRetentionTime`.
136
- *
137
- * @param operation
138
- * @returns
139
- * @private
140
- */
141
- _removeRequest(operation: "pop" | "shift"): Promise<QueueEntry | undefined>;
142
- /**
143
- * Loops through each request in the queue and attempts to re-fetch it.
144
- * If any request fails to re-fetch, it's put back in the same position in
145
- * the queue (which registers a retry for the next sync event).
146
- */
147
- replayRequests(): Promise<void>;
148
- /**
149
- * Registers a sync event with a tag unique to this instance.
150
- */
151
- registerSync(): Promise<void>;
152
- /**
153
- * In sync-supporting browsers, this adds a listener for the sync event.
154
- * In non-sync-supporting browsers, or if _forceSyncFallback is true, this
155
- * will retry the queue on service worker startup.
156
- *
157
- * @private
158
- */
159
- private _addSyncListener;
160
- /**
161
- * Returns the set of queue names. This is primarily used to reset the list
162
- * of queue names in tests.
163
- *
164
- * @returns
165
- * @private
166
- */
167
- static get _queueNames(): Set<string>;
168
- }
169
- export { Queue };
170
- //# sourceMappingURL=Queue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../src/Queue.ts"],"names":[],"mappings":"AAgBA,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;AAED,UAAU,cAAc;IACtB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AA2BD;;;;GAIG;AACH,cAAM,KAAK;IACT,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAU;IAC7C,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,wBAAwB,CAAS;IAEzC;;;;;;;;OAQG;gBACS,IAAI,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAE,YAAiB;IAgB5F;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;OAKG;IACG,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBnD;;;;;OAKG;IACG,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBtD;;;;;;OAMG;IACG,UAAU,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAInD;;;;;;OAMG;IACG,YAAY,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAIrD;;;;;OAKG;IACG,MAAM,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAmBrC;;;;;OAKG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B;;;;;;OAMG;IACG,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAsB,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1H;;;;;;;OAOG;IACG,cAAc,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IA0BjF;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBrC;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAenC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAmDxB;;;;;;OAMG;IACH,MAAM,KAAK,WAAW,IAAI,GAAG,CAAC,MAAM,CAAC,CAEpC;CACF;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
package/dist/QueueDb.d.ts DELETED
@@ -1,90 +0,0 @@
1
- import type { RequestData } from "./StorableRequest.js";
2
- export interface UnidentifiedQueueStoreEntry {
3
- requestData: RequestData;
4
- timestamp: number;
5
- id?: number;
6
- queueName?: string;
7
- metadata?: Record<string, unknown>;
8
- }
9
- export interface QueueStoreEntry extends UnidentifiedQueueStoreEntry {
10
- id: number;
11
- }
12
- /**
13
- * A class to interact directly an IndexedDB created specifically to save and
14
- * retrieve QueueStoreEntries. This class encapsulates all the schema details
15
- * to store the representation of a Queue.
16
- *
17
- * @private
18
- */
19
- export declare class QueueDb {
20
- private _db;
21
- /**
22
- * Add QueueStoreEntry to underlying db.
23
- *
24
- * @param entry
25
- */
26
- addEntry(entry: UnidentifiedQueueStoreEntry): Promise<void>;
27
- /**
28
- * Returns the first entry id in the ObjectStore.
29
- *
30
- * @returns
31
- */
32
- getFirstEntryId(): Promise<number | undefined>;
33
- /**
34
- * Get all the entries filtered by index
35
- *
36
- * @param queueName
37
- * @returns
38
- */
39
- getAllEntriesByQueueName(queueName: string): Promise<QueueStoreEntry[]>;
40
- /**
41
- * Returns the number of entries filtered by index
42
- *
43
- * @param queueName
44
- * @returns
45
- */
46
- getEntryCountByQueueName(queueName: string): Promise<number>;
47
- /**
48
- * Deletes a single entry by id.
49
- *
50
- * @param id the id of the entry to be deleted
51
- */
52
- deleteEntry(id: number): Promise<void>;
53
- /**
54
- *
55
- * @param queueName
56
- * @returns
57
- */
58
- getFirstEntryByQueueName(queueName: string): Promise<QueueStoreEntry | undefined>;
59
- /**
60
- *
61
- * @param queueName
62
- * @returns
63
- */
64
- getLastEntryByQueueName(queueName: string): Promise<QueueStoreEntry | undefined>;
65
- /**
66
- * Returns either the first or the last entries, depending on direction.
67
- * Filtered by index.
68
- *
69
- * @param direction
70
- * @param query
71
- * @returns
72
- * @private
73
- */
74
- getEndEntryFromIndex(query: IDBKeyRange, direction: IDBCursorDirection): Promise<QueueStoreEntry | undefined>;
75
- /**
76
- * Returns an open connection to the database.
77
- *
78
- * @private
79
- */
80
- private getDb;
81
- /**
82
- * Upgrades QueueDB
83
- *
84
- * @param db
85
- * @param oldVersion
86
- * @private
87
- */
88
- private _upgradeDb;
89
- }
90
- //# sourceMappingURL=QueueDb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueueDb.d.ts","sourceRoot":"","sources":["../src/QueueDb.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAexD,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,eAAgB,SAAQ,2BAA2B;IAClE,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;GAMG;AAEH,qBAAa,OAAO;IAClB,OAAO,CAAC,GAAG,CAA4C;IAEvD;;;;OAIG;IACG,QAAQ,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IASjE;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAMpD;;;;;OAKG;IACG,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAM7E;;;;;OAKG;IACG,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlE;;;;OAIG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C;;;;OAIG;IACG,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAIvF;;;;OAIG;IACG,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAItF;;;;;;;;OAQG;IACG,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAOnH;;;;OAIG;YACW,KAAK;IASnB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;CAanB"}
@@ -1,75 +0,0 @@
1
- import type { QueueStoreEntry, UnidentifiedQueueStoreEntry } from "./QueueDb.js";
2
- /**
3
- * A class to manage storing requests from a Queue in IndexedDB,
4
- * indexed by their queue name for easier access.
5
- *
6
- * Most developers will not need to access this class directly;
7
- * it is exposed for advanced use cases.
8
- */
9
- export declare class QueueStore {
10
- private readonly _queueName;
11
- private readonly _queueDb;
12
- /**
13
- * Associates this instance with a Queue instance, so entries added can be
14
- * identified by their queue name.
15
- *
16
- * @param queueName
17
- */
18
- constructor(queueName: string);
19
- /**
20
- * Append an entry last in the queue.
21
- *
22
- * @param entry
23
- */
24
- pushEntry(entry: UnidentifiedQueueStoreEntry): Promise<void>;
25
- /**
26
- * Prepend an entry first in the queue.
27
- *
28
- * @param entry
29
- */
30
- unshiftEntry(entry: UnidentifiedQueueStoreEntry): Promise<void>;
31
- /**
32
- * Removes and returns the last entry in the queue matching the `queueName`.
33
- *
34
- * @returns
35
- */
36
- popEntry(): Promise<QueueStoreEntry | undefined>;
37
- /**
38
- * Removes and returns the first entry in the queue matching the `queueName`.
39
- *
40
- * @returns
41
- */
42
- shiftEntry(): Promise<QueueStoreEntry | undefined>;
43
- /**
44
- * Returns all entries in the store matching the `queueName`.
45
- *
46
- * @returns
47
- */
48
- getAll(): Promise<QueueStoreEntry[]>;
49
- /**
50
- * Returns the number of entries in the store matching the `queueName`.
51
- *
52
- * @returns
53
- */
54
- size(): Promise<number>;
55
- /**
56
- * Deletes the entry for the given ID.
57
- *
58
- * WARNING: this method does not ensure the deleted entry belongs to this
59
- * queue (i.e. matches the `queueName`). But this limitation is acceptable
60
- * as this class is not publicly exposed. An additional check would make
61
- * this method slower than it needs to be.
62
- *
63
- * @param id
64
- */
65
- deleteEntry(id: number): Promise<void>;
66
- /**
67
- * Removes and returns the first or last entry in the queue (based on the
68
- * `direction` argument) matching the `queueName`.
69
- *
70
- * @returns
71
- * @private
72
- */
73
- _removeEntry(entry?: QueueStoreEntry): Promise<QueueStoreEntry | undefined>;
74
- }
75
- //# sourceMappingURL=QueueStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueueStore.d.ts","sourceRoot":"","sources":["../src/QueueStore.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGjF;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;;;OAKG;gBACS,SAAS,EAAE,MAAM;IAK7B;;;;OAIG;IACG,SAAS,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBlE;;;;OAIG;IACG,YAAY,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BrE;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAItD;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAIxD;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAI1C;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B;;;;;;;;;OASG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C;;;;;;OAMG;IACG,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;CAMlF"}
@@ -1,52 +0,0 @@
1
- import type { MapLikeObject } from "@serwist/core";
2
- export interface RequestData extends MapLikeObject {
3
- url: string;
4
- headers: MapLikeObject;
5
- body?: ArrayBuffer;
6
- }
7
- /**
8
- * A class to make it easier to serialize and de-serialize requests so they
9
- * can be stored in IndexedDB.
10
- *
11
- * Most developers will not need to access this class directly;
12
- * it is exposed for advanced use cases.
13
- */
14
- declare class StorableRequest {
15
- private readonly _requestData;
16
- /**
17
- * Converts a Request object to a plain object that can be structured
18
- * cloned or JSON-stringified.
19
- *
20
- * @param request
21
- * @returns
22
- */
23
- static fromRequest(request: Request): Promise<StorableRequest>;
24
- /**
25
- * Accepts an object of request data that can be used to construct a
26
- * `Request` but can also be stored in IndexedDB.
27
- *
28
- * @param requestData An object of request data that includes the `url` plus any relevant properties of
29
- * [requestInit](https://fetch.spec.whatwg.org/#requestinit).
30
- */
31
- constructor(requestData: RequestData);
32
- /**
33
- * Returns a deep clone of the instances `_requestData` object.
34
- *
35
- * @returns
36
- */
37
- toObject(): RequestData;
38
- /**
39
- * Converts this instance to a Request.
40
- *
41
- * @returns
42
- */
43
- toRequest(): Request;
44
- /**
45
- * Creates and returns a deep clone of the instance.
46
- *
47
- * @returns
48
- */
49
- clone(): StorableRequest;
50
- }
51
- export { StorableRequest };
52
- //# sourceMappingURL=StorableRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorableRequest.d.ts","sourceRoot":"","sources":["../src/StorableRequest.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAiBnD,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;;;;;GAMG;AACH,cAAM,eAAe;IACnB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAE3C;;;;;;OAMG;WACU,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IA6BpE;;;;;;OAMG;gBACS,WAAW,EAAE,WAAW;IAyBpC;;;;OAIG;IACH,QAAQ,IAAI,WAAW;IAUvB;;;;OAIG;IACH,SAAS,IAAI,OAAO;IAIpB;;;;OAIG;IACH,KAAK,IAAI,eAAe;CAGzB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2018 Google LLC
3
-
4
- Use of this source code is governed by an MIT-style
5
- license that can be found in the LICENSE file or at
6
- https://opensource.org/licenses/MIT.
7
- */
8
-
9
- import type { FetchDidFailCallbackParam, SerwistPlugin } from "@serwist/core";
10
-
11
- import type { QueueOptions } from "./Queue.js";
12
- import { Queue } from "./Queue.js";
13
-
14
- /**
15
- * A class implementing the `fetchDidFail` lifecycle callback. This makes it
16
- * easier to add failed requests to a background sync Queue.
17
- */
18
- export class BackgroundSyncPlugin implements SerwistPlugin {
19
- private readonly _queue: Queue;
20
-
21
- /**
22
- * @param name See the `@serwist/background-sync.Queue`
23
- * documentation for parameter details.
24
- * @param options See the `@serwist/background-sync.Queue`
25
- * documentation for parameter details.
26
- */
27
- constructor(name: string, options?: QueueOptions) {
28
- this._queue = new Queue(name, options);
29
- }
30
-
31
- /**
32
- * @param options
33
- * @private
34
- */
35
- async fetchDidFail({ request }: FetchDidFailCallbackParam) {
36
- await this._queue.pushRequest({ request });
37
- }
38
- }