@liveblocks/core 3.9.2 → 3.10.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/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
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 = "3.
|
|
9
|
+
var PKG_VERSION = "3.10.0";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -5062,6 +5062,19 @@ function createReceivingToolInvocation(invocationId, name, partialArgsText = "")
|
|
|
5062
5062
|
}
|
|
5063
5063
|
|
|
5064
5064
|
// src/auth-manager.ts
|
|
5065
|
+
var NON_RETRY_STATUS_CODES = [
|
|
5066
|
+
400,
|
|
5067
|
+
401,
|
|
5068
|
+
403,
|
|
5069
|
+
404,
|
|
5070
|
+
405,
|
|
5071
|
+
410,
|
|
5072
|
+
412,
|
|
5073
|
+
414,
|
|
5074
|
+
422,
|
|
5075
|
+
431,
|
|
5076
|
+
451
|
|
5077
|
+
];
|
|
5065
5078
|
function createAuthManager(authOptions, onAuthenticate) {
|
|
5066
5079
|
const authentication = prepareAuthentication(authOptions);
|
|
5067
5080
|
const seenTokens = /* @__PURE__ */ new Set();
|
|
@@ -5251,7 +5264,7 @@ async function fetchAuthEndpoint(fetch, endpoint, body) {
|
|
|
5251
5264
|
});
|
|
5252
5265
|
if (!res.ok) {
|
|
5253
5266
|
const reason = `${(await res.text()).trim() || "reason not provided in auth response"} (${res.status} returned by POST ${endpoint})`;
|
|
5254
|
-
if (
|
|
5267
|
+
if (NON_RETRY_STATUS_CODES.includes(res.status)) {
|
|
5255
5268
|
throw new StopRetrying(`Unauthorized: ${reason}`);
|
|
5256
5269
|
} else {
|
|
5257
5270
|
throw new Error(`Failed to authenticate: ${reason}`);
|