@mybricks/sdk-for-app
Advanced tools
Comparing version 0.0.35 to 0.0.36
{ | ||
"name": "@mybricks/sdk-for-app", | ||
"version": "0.0.35", | ||
"version": "0.0.36", | ||
"description": "SDK for application UI", | ||
@@ -5,0 +5,0 @@ "main": "index.min.js", |
@@ -10,2 +10,4 @@ import axios from 'axios'; | ||
export * as fileSystem from './apis/fileSystem'; | ||
export const user = { | ||
@@ -85,1 +87,2 @@ getUserInfo: () => { | ||
} | ||
@@ -0,1 +1,3 @@ | ||
import { safeParse } from './parse' | ||
export const getCookies = () => { | ||
@@ -7,2 +9,14 @@ return document.cookie.split('; ').reduce((s, e) => { | ||
}, {}); | ||
}; | ||
}; | ||
const cookies = getCookies(); | ||
const userBasicInfo = safeParse(cookies['mybricks-login-user']) | ||
interface UserInfo { | ||
email: string | ||
id: string | ||
} | ||
export const getUserInfo = ():UserInfo => { | ||
return userBasicInfo || {} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
54639
31
1677
0