New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@web-lite/api-types

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web-lite/api-types - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

CHANGELOG.md
# Changelog
## [Unreleased](https://github.com/weblite-wapps/api-types/tree/HEAD)
## [v1.2.0](https://github.com/weblite-wapps/api-types/tree/v1.2.0) (2021-07-27)
[Full Changelog](https://github.com/weblite-wapps/api-types/compare/v1.2.0-2...HEAD)
[Full Changelog](https://github.com/weblite-wapps/api-types/compare/v1.2.0-2...v1.2.0)

@@ -7,0 +7,0 @@ **Merged pull requests:**

@@ -7,3 +7,3 @@ {

"author": "Weblite Team",
"version": "1.2.0",
"version": "1.2.1",
"description": "Use W with type checking and mock out of the box.",

@@ -10,0 +10,0 @@ "license": "BSD-3-Clause",

@@ -46,3 +46,3 @@ # api-types

mockWebliteApi({});
mockWebliteApi();
// or

@@ -52,3 +52,49 @@ mockWebliteApi({ user: { firstname: 'custom_name', id: 'custom_id' } });

```ts
export interface IMock {
config: {
debug: boolean;
timing: {
initializeAsync: number;
getProfile: number;
shareDB: number;
user: number;
chat: number;
message: number;
};
storage: 'localStorage' | 'sessionStorage';
};
__profile__: Record<string, any>;
profile: {
school?: {};
};
__users__: Record<string, Omit<IMock['user'], 'getInfo'>>;
user: {
id: string;
firstname: string;
lastname?: string;
username: string;
profileImage?: string;
bio?: string;
getInfo: () => Omit<IMock['user'], 'getInfo'>;
};
__wapps__: {
wisId?: string;
wappId: string;
mode: RunningWappMode;
};
wapps: {
inputs?: Record<string, any>;
admins?: string[];
};
__chat__: Record<string, ChatInfo>;
__db__: {};
}
```
This will only set `window.W` in development.
`process.env.NODE_ENV === 'development' && !window.W`
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc