@omerlo/omerlo-webkit 0.0.46 → 0.0.47

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.
@@ -24,6 +24,7 @@ const handleApiProxy = async ({ event, ...tail }) => {
24
24
  .then(async (resp) => {
25
25
  const headers = new Headers();
26
26
  if (resp.status === 401 && event.locals.accessToken) {
27
+ console.log('handleApiProxy:41');
27
28
  clearAuthorizationUsingHeader(headers);
28
29
  event.locals.accessToken = undefined;
29
30
  resp = await handleApiProxy({ event, ...tail });
@@ -90,6 +91,7 @@ export const handleUserToken = async ({ event, resolve }) => {
90
91
  }
91
92
  catch (err) {
92
93
  if (err instanceof ApiError && err.status == 401) {
94
+ console.log('handleUserToken l:124');
93
95
  event.setHeaders({ 'x-logout': 'true' });
94
96
  clearAuthorizationCookies(event.cookies);
95
97
  }
@@ -34,6 +34,7 @@ export async function dirtyRequest(f, path, opts) {
34
34
  }
35
35
  const resp = await f(path.toString(), opts);
36
36
  if (BROWSER && resp.headers.get('x-logout') == 'true') {
37
+ console.log('dirtyrequest:69');
37
38
  const webkitComponent = document.getElementById('omerlo-webkit');
38
39
  if (webkitComponent) {
39
40
  webkitComponent.dispatchEvent(new Event('logout'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omerlo/omerlo-webkit",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",