@echoxyz/sonar-core 0.14.0 → 0.14.1
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 +6 -0
- package/dist/index.cjs +6 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -448,9 +448,14 @@ function createClient(options) {
|
|
|
448
448
|
if (onTokenChange) {
|
|
449
449
|
authSession.onTokenChange(onTokenChange);
|
|
450
450
|
}
|
|
451
|
+
const onUnauthorized = () => {
|
|
452
|
+
var _a;
|
|
453
|
+
authSession.clear();
|
|
454
|
+
(_a = options == null ? void 0 : options.onUnauthorized) == null ? void 0 : _a.call(options);
|
|
455
|
+
};
|
|
451
456
|
return new SonarClient({
|
|
452
457
|
apiURL,
|
|
453
|
-
opts: { auth: authSession, fetch, onUnauthorized
|
|
458
|
+
opts: { auth: authSession, fetch, onUnauthorized }
|
|
454
459
|
});
|
|
455
460
|
}
|
|
456
461
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -411,9 +411,14 @@ function createClient(options) {
|
|
|
411
411
|
if (onTokenChange) {
|
|
412
412
|
authSession.onTokenChange(onTokenChange);
|
|
413
413
|
}
|
|
414
|
+
const onUnauthorized = () => {
|
|
415
|
+
var _a;
|
|
416
|
+
authSession.clear();
|
|
417
|
+
(_a = options == null ? void 0 : options.onUnauthorized) == null ? void 0 : _a.call(options);
|
|
418
|
+
};
|
|
414
419
|
return new SonarClient({
|
|
415
420
|
apiURL,
|
|
416
|
-
opts: { auth: authSession, fetch, onUnauthorized
|
|
421
|
+
opts: { auth: authSession, fetch, onUnauthorized }
|
|
417
422
|
});
|
|
418
423
|
}
|
|
419
424
|
export {
|