@liveblocks/core 2.8.0-beta1 → 2.8.0-beta3

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/index.d.mts CHANGED
@@ -2748,6 +2748,21 @@ declare function assert(condition: boolean, errmsg: string): asserts condition;
2748
2748
  */
2749
2749
  declare function nn<T>(value: T, errmsg?: string): NonNullable<T>;
2750
2750
 
2751
+ /**
2752
+ * Wraps a promise factory. Will create promises until one succeeds. If
2753
+ * a promise rejects, it will retry calling the factory for at most `maxTries`
2754
+ * times. Between each attempt, it will inject a a backoff delay (in millis)
2755
+ * from the given array. If the array contains fewer items then `maxTries`,
2756
+ * then the last backoff number will be used indefinitely.
2757
+ *
2758
+ * If the last attempt is rejected too, the returned promise will fail too.
2759
+ *
2760
+ * @param promiseFn The promise factory to execute
2761
+ * @param maxTries The number of total tries (must be >=1)
2762
+ * @param backoff An array of timings to inject between each promise attempt
2763
+ */
2764
+ declare function autoRetry<T>(promiseFn: () => Promise<T>, maxTries: number, backoff: number[], exitCondition?: (error: any) => boolean): Promise<T>;
2765
+
2751
2766
  declare function chunk<T>(array: T[], size: number): T[][];
2752
2767
 
2753
2768
  declare function createThreadId(): string;
@@ -3118,4 +3133,4 @@ declare type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (En
3118
3133
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
3119
3134
  };
3120
3135
 
3121
- export { type AckOp, type ActivityData, type AsyncResult, type AsyncResultWithDataField, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LostConnectionEvent, type Lson, type LsonObject, type NoInfr, type NodeMap, NotificationsApiError, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type Patchable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type PrivateClientApi, type PrivateRoomApi, type QueryMetadata, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, asPos, assert, assertNever, b64decode, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentId, createInboxNotificationId, createStore, createThreadId, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, wait, withTimeout };
3136
+ export { type AckOp, type ActivityData, type AsyncResult, type AsyncResultWithDataField, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LostConnectionEvent, type Lson, type LsonObject, type NoInfr, type NodeMap, NotificationsApiError, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type Patchable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type PrivateClientApi, type PrivateRoomApi, type QueryMetadata, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, asPos, assert, assertNever, autoRetry, b64decode, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentId, createInboxNotificationId, createStore, createThreadId, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, wait, withTimeout };
package/dist/index.d.ts CHANGED
@@ -2748,6 +2748,21 @@ declare function assert(condition: boolean, errmsg: string): asserts condition;
2748
2748
  */
2749
2749
  declare function nn<T>(value: T, errmsg?: string): NonNullable<T>;
2750
2750
 
2751
+ /**
2752
+ * Wraps a promise factory. Will create promises until one succeeds. If
2753
+ * a promise rejects, it will retry calling the factory for at most `maxTries`
2754
+ * times. Between each attempt, it will inject a a backoff delay (in millis)
2755
+ * from the given array. If the array contains fewer items then `maxTries`,
2756
+ * then the last backoff number will be used indefinitely.
2757
+ *
2758
+ * If the last attempt is rejected too, the returned promise will fail too.
2759
+ *
2760
+ * @param promiseFn The promise factory to execute
2761
+ * @param maxTries The number of total tries (must be >=1)
2762
+ * @param backoff An array of timings to inject between each promise attempt
2763
+ */
2764
+ declare function autoRetry<T>(promiseFn: () => Promise<T>, maxTries: number, backoff: number[], exitCondition?: (error: any) => boolean): Promise<T>;
2765
+
2751
2766
  declare function chunk<T>(array: T[], size: number): T[][];
2752
2767
 
2753
2768
  declare function createThreadId(): string;
@@ -3118,4 +3133,4 @@ declare type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (En
3118
3133
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
3119
3134
  };
3120
3135
 
3121
- export { type AckOp, type ActivityData, type AsyncResult, type AsyncResultWithDataField, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LostConnectionEvent, type Lson, type LsonObject, type NoInfr, type NodeMap, NotificationsApiError, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type Patchable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type PrivateClientApi, type PrivateRoomApi, type QueryMetadata, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, asPos, assert, assertNever, b64decode, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentId, createInboxNotificationId, createStore, createThreadId, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, wait, withTimeout };
3136
+ export { type AckOp, type ActivityData, type AsyncResult, type AsyncResultWithDataField, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LostConnectionEvent, type Lson, type LsonObject, type NoInfr, type NodeMap, NotificationsApiError, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type Patchable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type PrivateClientApi, type PrivateRoomApi, type QueryMetadata, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, asPos, assert, assertNever, autoRetry, b64decode, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentId, createInboxNotificationId, createStore, createThreadId, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, wait, withTimeout };
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "2.8.0-beta1";
9
+ var PKG_VERSION = "2.8.0-beta3";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -4795,6 +4795,28 @@ function findNonSerializableValue(value, path = "") {
4795
4795
  return false;
4796
4796
  }
4797
4797
 
4798
+ // src/lib/autoRetry.ts
4799
+ async function autoRetry(promiseFn, maxTries, backoff, exitCondition) {
4800
+ const fallbackBackoff = backoff.length > 0 ? backoff[backoff.length - 1] : 0;
4801
+ let attempt = 0;
4802
+ while (true) {
4803
+ attempt++;
4804
+ const promise = promiseFn();
4805
+ try {
4806
+ return await promise;
4807
+ } catch (err) {
4808
+ if (exitCondition && exitCondition(err)) {
4809
+ throw err;
4810
+ }
4811
+ if (attempt >= maxTries) {
4812
+ throw new Error(`Failed after ${maxTries} attempts: ${String(err)}`);
4813
+ }
4814
+ }
4815
+ const delay = _nullishCoalesce(backoff[attempt - 1], () => ( fallbackBackoff));
4816
+ await wait(delay);
4817
+ }
4818
+ }
4819
+
4798
4820
  // src/lib/chunk.ts
4799
4821
  function chunk(array, size) {
4800
4822
  const chunks = [];
@@ -5226,6 +5248,19 @@ function installBackgroundTabSpy() {
5226
5248
  var GET_ATTACHMENT_URLS_BATCH_DELAY = 50;
5227
5249
  var ATTACHMENT_PART_SIZE = 5 * 1024 * 1024;
5228
5250
  var ATTACHMENT_PART_BATCH_SIZE = 5;
5251
+ var RETRY_ATTEMPTS = 10;
5252
+ var RETRY_DELAYS = [
5253
+ 2e3,
5254
+ 2e3,
5255
+ 2e3,
5256
+ 2e3,
5257
+ 2e3,
5258
+ 2e3,
5259
+ 2e3,
5260
+ 2e3,
5261
+ 2e3,
5262
+ 2e3
5263
+ ];
5229
5264
  function splitFileIntoParts(file) {
5230
5265
  const parts = [];
5231
5266
  let start = 0;
@@ -6699,29 +6734,54 @@ ${Array.from(traces).join("\n\n")}`
6699
6734
  if (_optionalChain([abortSignal, 'optionalAccess', _142 => _142.aborted])) {
6700
6735
  throw abortError;
6701
6736
  }
6737
+ const handleRetryError = (err) => {
6738
+ if (_optionalChain([abortSignal, 'optionalAccess', _143 => _143.aborted])) {
6739
+ throw abortError;
6740
+ }
6741
+ if (err instanceof CommentsApiError && err.status === 413) {
6742
+ throw err;
6743
+ }
6744
+ return false;
6745
+ };
6702
6746
  if (attachment.size <= ATTACHMENT_PART_SIZE) {
6703
- return fetchCommentsJson(
6704
- `/attachments/${encodeURIComponent(attachment.id)}/upload/${encodeURIComponent(attachment.name)}`,
6705
- {
6706
- method: "PUT",
6707
- body: attachment.file,
6708
- signal: abortSignal
6709
- }
6747
+ return autoRetry(
6748
+ () => fetchCommentsJson(
6749
+ `/attachments/${encodeURIComponent(attachment.id)}/upload/${encodeURIComponent(attachment.name)}`,
6750
+ {
6751
+ method: "PUT",
6752
+ body: attachment.file,
6753
+ signal: abortSignal
6754
+ },
6755
+ {
6756
+ fileSize: attachment.size
6757
+ }
6758
+ ),
6759
+ RETRY_ATTEMPTS,
6760
+ RETRY_DELAYS,
6761
+ handleRetryError
6710
6762
  );
6711
6763
  } else {
6712
6764
  let uploadId;
6713
6765
  const uploadedParts = [];
6714
- try {
6715
- const createMultiPartUpload = await fetchCommentsJson(
6766
+ const createMultiPartUpload = await autoRetry(
6767
+ () => fetchCommentsJson(
6716
6768
  `/attachments/${encodeURIComponent(attachment.id)}/multipart/${encodeURIComponent(attachment.name)}`,
6717
6769
  {
6718
6770
  method: "POST",
6719
6771
  signal: abortSignal
6772
+ },
6773
+ {
6774
+ fileSize: attachment.size
6720
6775
  }
6721
- );
6776
+ ),
6777
+ RETRY_ATTEMPTS,
6778
+ RETRY_DELAYS,
6779
+ handleRetryError
6780
+ );
6781
+ try {
6722
6782
  uploadId = createMultiPartUpload.uploadId;
6723
6783
  const parts = splitFileIntoParts(attachment.file);
6724
- if (_optionalChain([abortSignal, 'optionalAccess', _143 => _143.aborted])) {
6784
+ if (_optionalChain([abortSignal, 'optionalAccess', _144 => _144.aborted])) {
6725
6785
  throw abortError;
6726
6786
  }
6727
6787
  const batches = chunk(parts, ATTACHMENT_PART_BATCH_SIZE);
@@ -6729,19 +6789,24 @@ ${Array.from(traces).join("\n\n")}`
6729
6789
  const uploadedPartsPromises = [];
6730
6790
  for (const { part, partNumber } of parts2) {
6731
6791
  uploadedPartsPromises.push(
6732
- fetchCommentsJson(
6733
- `/attachments/${encodeURIComponent(attachment.id)}/multipart/${encodeURIComponent(uploadId)}/${encodeURIComponent(partNumber)}`,
6734
- {
6735
- method: "PUT",
6736
- body: part,
6737
- signal: abortSignal
6738
- }
6792
+ autoRetry(
6793
+ () => fetchCommentsJson(
6794
+ `/attachments/${encodeURIComponent(attachment.id)}/multipart/${encodeURIComponent(createMultiPartUpload.uploadId)}/${encodeURIComponent(partNumber)}`,
6795
+ {
6796
+ method: "PUT",
6797
+ body: part,
6798
+ signal: abortSignal
6799
+ }
6800
+ ),
6801
+ RETRY_ATTEMPTS,
6802
+ RETRY_DELAYS,
6803
+ handleRetryError
6739
6804
  )
6740
6805
  );
6741
6806
  }
6742
6807
  uploadedParts.push(...await Promise.all(uploadedPartsPromises));
6743
6808
  }
6744
- if (_optionalChain([abortSignal, 'optionalAccess', _144 => _144.aborted])) {
6809
+ if (_optionalChain([abortSignal, 'optionalAccess', _145 => _145.aborted])) {
6745
6810
  throw abortError;
6746
6811
  }
6747
6812
  const sortedUploadedParts = uploadedParts.sort(
@@ -6759,14 +6824,17 @@ ${Array.from(traces).join("\n\n")}`
6759
6824
  }
6760
6825
  );
6761
6826
  } catch (error3) {
6762
- if (uploadId && _optionalChain([error3, 'optionalAccess', _145 => _145.name]) && (error3.name === "AbortError" || error3.name === "TimeoutError")) {
6763
- await fetchCommentsApi(
6764
- `/attachments/${encodeURIComponent(attachment.id)}/multipart/${encodeURIComponent(uploadId)}`,
6765
- void 0,
6766
- {
6767
- method: "DELETE"
6768
- }
6769
- );
6827
+ if (uploadId && _optionalChain([error3, 'optionalAccess', _146 => _146.name]) && (error3.name === "AbortError" || error3.name === "TimeoutError")) {
6828
+ try {
6829
+ await fetchCommentsApi(
6830
+ `/attachments/${encodeURIComponent(attachment.id)}/multipart/${encodeURIComponent(uploadId)}`,
6831
+ void 0,
6832
+ {
6833
+ method: "DELETE"
6834
+ }
6835
+ );
6836
+ } catch (error4) {
6837
+ }
6770
6838
  }
6771
6839
  throw error3;
6772
6840
  }
@@ -6875,7 +6943,7 @@ ${Array.from(traces).join("\n\n")}`
6875
6943
  {
6876
6944
  [kInternal]: {
6877
6945
  get presenceBuffer() {
6878
- return deepClone(_nullishCoalesce(_optionalChain([context, 'access', _146 => _146.buffer, 'access', _147 => _147.presenceUpdates, 'optionalAccess', _148 => _148.data]), () => ( null)));
6946
+ return deepClone(_nullishCoalesce(_optionalChain([context, 'access', _147 => _147.buffer, 'access', _148 => _148.presenceUpdates, 'optionalAccess', _149 => _149.data]), () => ( null)));
6879
6947
  },
6880
6948
  // prettier-ignore
6881
6949
  get undoStack() {
@@ -7059,7 +7127,7 @@ function makeClassicSubscribeFn(events) {
7059
7127
  }
7060
7128
  if (isLiveNode(first)) {
7061
7129
  const node = first;
7062
- if (_optionalChain([options, 'optionalAccess', _149 => _149.isDeep])) {
7130
+ if (_optionalChain([options, 'optionalAccess', _150 => _150.isDeep])) {
7063
7131
  const storageCallback = second;
7064
7132
  return subscribeToLiveStructureDeeply(node, storageCallback);
7065
7133
  } else {
@@ -7186,12 +7254,12 @@ function createClient(options) {
7186
7254
  createSocket: makeCreateSocketDelegateForRoom(
7187
7255
  roomId,
7188
7256
  baseUrl,
7189
- _optionalChain([clientOptions, 'access', _150 => _150.polyfills, 'optionalAccess', _151 => _151.WebSocket])
7257
+ _optionalChain([clientOptions, 'access', _151 => _151.polyfills, 'optionalAccess', _152 => _152.WebSocket])
7190
7258
  ),
7191
7259
  authenticate: makeAuthDelegateForRoom(roomId, authManager)
7192
7260
  })),
7193
7261
  enableDebugLogging: clientOptions.enableDebugLogging,
7194
- unstable_batchedUpdates: _optionalChain([options2, 'optionalAccess', _152 => _152.unstable_batchedUpdates]),
7262
+ unstable_batchedUpdates: _optionalChain([options2, 'optionalAccess', _153 => _153.unstable_batchedUpdates]),
7195
7263
  baseUrl,
7196
7264
  unstable_fallbackToHTTP: !!clientOptions.unstable_fallbackToHTTP,
7197
7265
  unstable_streamData: !!clientOptions.unstable_streamData
@@ -7207,7 +7275,7 @@ function createClient(options) {
7207
7275
  const shouldConnect = _nullishCoalesce(options2.autoConnect, () => ( true));
7208
7276
  if (shouldConnect) {
7209
7277
  if (typeof atob === "undefined") {
7210
- if (_optionalChain([clientOptions, 'access', _153 => _153.polyfills, 'optionalAccess', _154 => _154.atob]) === void 0) {
7278
+ if (_optionalChain([clientOptions, 'access', _154 => _154.polyfills, 'optionalAccess', _155 => _155.atob]) === void 0) {
7211
7279
  throw new Error(
7212
7280
  "You need to polyfill atob to use the client in your environment. Please follow the instructions at https://liveblocks.io/docs/errors/liveblocks-client/atob-polyfill"
7213
7281
  );
@@ -7219,7 +7287,7 @@ function createClient(options) {
7219
7287
  return leaseRoom(newRoomDetails);
7220
7288
  }
7221
7289
  function getRoom(roomId) {
7222
- const room = _optionalChain([roomsById, 'access', _155 => _155.get, 'call', _156 => _156(roomId), 'optionalAccess', _157 => _157.room]);
7290
+ const room = _optionalChain([roomsById, 'access', _156 => _156.get, 'call', _157 => _157(roomId), 'optionalAccess', _158 => _158.room]);
7223
7291
  return room ? room : null;
7224
7292
  }
7225
7293
  function logout() {
@@ -7243,7 +7311,7 @@ function createClient(options) {
7243
7311
  getThreadsSince
7244
7312
  } = createNotificationsApi({
7245
7313
  baseUrl,
7246
- fetcher: _optionalChain([clientOptions, 'access', _158 => _158.polyfills, 'optionalAccess', _159 => _159.fetch]) || /* istanbul ignore next */
7314
+ fetcher: _optionalChain([clientOptions, 'access', _159 => _159.polyfills, 'optionalAccess', _160 => _160.fetch]) || /* istanbul ignore next */
7247
7315
  fetch,
7248
7316
  authManager,
7249
7317
  currentUserIdStore
@@ -7256,7 +7324,7 @@ function createClient(options) {
7256
7324
  const batchedResolveUsers = new Batch(
7257
7325
  async (batchedUserIds) => {
7258
7326
  const userIds = batchedUserIds.flat();
7259
- const users = await _optionalChain([resolveUsers, 'optionalCall', _160 => _160({ userIds })]);
7327
+ const users = await _optionalChain([resolveUsers, 'optionalCall', _161 => _161({ userIds })]);
7260
7328
  warnIfNoResolveUsers();
7261
7329
  return _nullishCoalesce(users, () => ( userIds.map(() => void 0)));
7262
7330
  },
@@ -7271,7 +7339,7 @@ function createClient(options) {
7271
7339
  const batchedResolveRoomsInfo = new Batch(
7272
7340
  async (batchedRoomIds) => {
7273
7341
  const roomIds = batchedRoomIds.flat();
7274
- const roomsInfo = await _optionalChain([resolveRoomsInfo, 'optionalCall', _161 => _161({ roomIds })]);
7342
+ const roomsInfo = await _optionalChain([resolveRoomsInfo, 'optionalCall', _162 => _162({ roomIds })]);
7275
7343
  warnIfNoResolveRoomsInfo();
7276
7344
  return _nullishCoalesce(roomsInfo, () => ( roomIds.map(() => void 0)));
7277
7345
  },
@@ -7387,7 +7455,7 @@ var commentBodyElementsTypes = {
7387
7455
  mention: "inline"
7388
7456
  };
7389
7457
  function traverseCommentBody(body, elementOrVisitor, possiblyVisitor) {
7390
- if (!body || !_optionalChain([body, 'optionalAccess', _162 => _162.content])) {
7458
+ if (!body || !_optionalChain([body, 'optionalAccess', _163 => _163.content])) {
7391
7459
  return;
7392
7460
  }
7393
7461
  const element = typeof elementOrVisitor === "string" ? elementOrVisitor : void 0;
@@ -7397,13 +7465,13 @@ function traverseCommentBody(body, elementOrVisitor, possiblyVisitor) {
7397
7465
  for (const block of body.content) {
7398
7466
  if (type === "all" || type === "block") {
7399
7467
  if (guard(block)) {
7400
- _optionalChain([visitor, 'optionalCall', _163 => _163(block)]);
7468
+ _optionalChain([visitor, 'optionalCall', _164 => _164(block)]);
7401
7469
  }
7402
7470
  }
7403
7471
  if (type === "all" || type === "inline") {
7404
7472
  for (const inline of block.children) {
7405
7473
  if (guard(inline)) {
7406
- _optionalChain([visitor, 'optionalCall', _164 => _164(inline)]);
7474
+ _optionalChain([visitor, 'optionalCall', _165 => _165(inline)]);
7407
7475
  }
7408
7476
  }
7409
7477
  }
@@ -7428,7 +7496,7 @@ async function resolveUsersInCommentBody(body, resolveUsers) {
7428
7496
  userIds
7429
7497
  });
7430
7498
  for (const [index, userId] of userIds.entries()) {
7431
- const user = _optionalChain([users, 'optionalAccess', _165 => _165[index]]);
7499
+ const user = _optionalChain([users, 'optionalAccess', _166 => _166[index]]);
7432
7500
  if (user) {
7433
7501
  resolvedUsers.set(userId, user);
7434
7502
  }
@@ -7551,7 +7619,7 @@ var stringifyCommentBodyPlainElements = {
7551
7619
  text: ({ element }) => element.text,
7552
7620
  link: ({ element }) => _nullishCoalesce(element.text, () => ( element.url)),
7553
7621
  mention: ({ element, user }) => {
7554
- return `@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _166 => _166.name]), () => ( element.id))}`;
7622
+ return `@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _167 => _167.name]), () => ( element.id))}`;
7555
7623
  }
7556
7624
  };
7557
7625
  var stringifyCommentBodyHtmlElements = {
@@ -7581,7 +7649,7 @@ var stringifyCommentBodyHtmlElements = {
7581
7649
  return html`<a href="${href}" target="_blank" rel="noopener noreferrer">${_nullishCoalesce(element.text, () => ( element.url))}</a>`;
7582
7650
  },
7583
7651
  mention: ({ element, user }) => {
7584
- return html`<span data-mention>@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _167 => _167.name]), () => ( element.id))}</span>`;
7652
+ return html`<span data-mention>@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _168 => _168.name]), () => ( element.id))}</span>`;
7585
7653
  }
7586
7654
  };
7587
7655
  var stringifyCommentBodyMarkdownElements = {
@@ -7611,19 +7679,19 @@ var stringifyCommentBodyMarkdownElements = {
7611
7679
  return markdown`[${_nullishCoalesce(element.text, () => ( element.url))}](${href})`;
7612
7680
  },
7613
7681
  mention: ({ element, user }) => {
7614
- return markdown`@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _168 => _168.name]), () => ( element.id))}`;
7682
+ return markdown`@${_nullishCoalesce(_optionalChain([user, 'optionalAccess', _169 => _169.name]), () => ( element.id))}`;
7615
7683
  }
7616
7684
  };
7617
7685
  async function stringifyCommentBody(body, options) {
7618
- const format = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _169 => _169.format]), () => ( "plain"));
7619
- const separator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _170 => _170.separator]), () => ( (format === "markdown" ? "\n\n" : "\n")));
7686
+ const format = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _170 => _170.format]), () => ( "plain"));
7687
+ const separator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _171 => _171.separator]), () => ( (format === "markdown" ? "\n\n" : "\n")));
7620
7688
  const elements = {
7621
7689
  ...format === "html" ? stringifyCommentBodyHtmlElements : format === "markdown" ? stringifyCommentBodyMarkdownElements : stringifyCommentBodyPlainElements,
7622
- ..._optionalChain([options, 'optionalAccess', _171 => _171.elements])
7690
+ ..._optionalChain([options, 'optionalAccess', _172 => _172.elements])
7623
7691
  };
7624
7692
  const resolvedUsers = await resolveUsersInCommentBody(
7625
7693
  body,
7626
- _optionalChain([options, 'optionalAccess', _172 => _172.resolveUsers])
7694
+ _optionalChain([options, 'optionalAccess', _173 => _173.resolveUsers])
7627
7695
  );
7628
7696
  const blocks = body.content.flatMap((block, blockIndex) => {
7629
7697
  switch (block.type) {
@@ -7898,12 +7966,12 @@ function legacy_patchImmutableNode(state, path, update) {
7898
7966
  }
7899
7967
  const newState = Object.assign({}, state);
7900
7968
  for (const key in update.updates) {
7901
- if (_optionalChain([update, 'access', _173 => _173.updates, 'access', _174 => _174[key], 'optionalAccess', _175 => _175.type]) === "update") {
7969
+ if (_optionalChain([update, 'access', _174 => _174.updates, 'access', _175 => _175[key], 'optionalAccess', _176 => _176.type]) === "update") {
7902
7970
  const val = update.node.get(key);
7903
7971
  if (val !== void 0) {
7904
7972
  newState[key] = lsonToJson(val);
7905
7973
  }
7906
- } else if (_optionalChain([update, 'access', _176 => _176.updates, 'access', _177 => _177[key], 'optionalAccess', _178 => _178.type]) === "delete") {
7974
+ } else if (_optionalChain([update, 'access', _177 => _177.updates, 'access', _178 => _178[key], 'optionalAccess', _179 => _179.type]) === "delete") {
7907
7975
  delete newState[key];
7908
7976
  }
7909
7977
  }
@@ -7964,12 +8032,12 @@ function legacy_patchImmutableNode(state, path, update) {
7964
8032
  }
7965
8033
  const newState = Object.assign({}, state);
7966
8034
  for (const key in update.updates) {
7967
- if (_optionalChain([update, 'access', _179 => _179.updates, 'access', _180 => _180[key], 'optionalAccess', _181 => _181.type]) === "update") {
8035
+ if (_optionalChain([update, 'access', _180 => _180.updates, 'access', _181 => _181[key], 'optionalAccess', _182 => _182.type]) === "update") {
7968
8036
  const value = update.node.get(key);
7969
8037
  if (value !== void 0) {
7970
8038
  newState[key] = lsonToJson(value);
7971
8039
  }
7972
- } else if (_optionalChain([update, 'access', _182 => _182.updates, 'access', _183 => _183[key], 'optionalAccess', _184 => _184.type]) === "delete") {
8040
+ } else if (_optionalChain([update, 'access', _183 => _183.updates, 'access', _184 => _184[key], 'optionalAccess', _185 => _185.type]) === "delete") {
7973
8041
  delete newState[key];
7974
8042
  }
7975
8043
  }
@@ -8227,5 +8295,6 @@ detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
8227
8295
 
8228
8296
 
8229
8297
 
8230
- exports.ClientMsgCode = ClientMsgCode; exports.CommentsApiError = CommentsApiError; exports.CrdtType = CrdtType; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.NotificationsApiError = NotificationsApiError; exports.OpCode = OpCode; exports.ServerMsgCode = ServerMsgCode; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.ackOp = ackOp; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.b64decode = b64decode; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToThreadData = convertToThreadData; exports.createClient = createClient; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createStore = createStore; exports.createThreadId = createThreadId; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.errorIf = errorIf; exports.freeze = freeze; exports.getMentionedIdsFromCommentBody = getMentionedIdsFromCommentBody; exports.isChildCrdt = isChildCrdt; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isPlainObject = isPlainObject; exports.isRootCrdt = isRootCrdt; exports.kInternal = kInternal; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.raise = raise; exports.shallow = shallow; exports.stringify = stringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.wait = wait; exports.withTimeout = withTimeout;
8298
+
8299
+ exports.ClientMsgCode = ClientMsgCode; exports.CommentsApiError = CommentsApiError; exports.CrdtType = CrdtType; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.NotificationsApiError = NotificationsApiError; exports.OpCode = OpCode; exports.ServerMsgCode = ServerMsgCode; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.ackOp = ackOp; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.autoRetry = autoRetry; exports.b64decode = b64decode; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToThreadData = convertToThreadData; exports.createClient = createClient; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createStore = createStore; exports.createThreadId = createThreadId; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.errorIf = errorIf; exports.freeze = freeze; exports.getMentionedIdsFromCommentBody = getMentionedIdsFromCommentBody; exports.isChildCrdt = isChildCrdt; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isPlainObject = isPlainObject; exports.isRootCrdt = isRootCrdt; exports.kInternal = kInternal; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.raise = raise; exports.shallow = shallow; exports.stringify = stringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.wait = wait; exports.withTimeout = withTimeout;
8231
8300
  //# sourceMappingURL=index.js.map