
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@vkontakte/vkui-connect-mock
Advanced tools
This library mocks VK Connect methods from vkui-connect for developing in desktop browser
Add library to your project dependencies
npm install @vkontakte/vkui-connect-mock
or
yarn add @vkontakte/vkui-connect-mock
Import necessary methods from this library instead of using vkui-connect:
import VKConnect from '@vkontakte/vkui-connect-mock';
And then init VK Connect:
VKConnect.subscribe((e) => {
if (e.detail.type === 'VKWebAppGetUserInfoResult') {
// do something
}
});
VKConnect.send('VKWebAppGetUserInfo', {});
More documentation regarding VK Connect is here.
There are getter and setter for mocked data of each method.
For example, you want to change response of VKWebAppGetUserInfo method:
import { response as res } from '@vkontakte/vkui-connect-mock';
res.VKWebAppGetUserInfo.data = {
type: 'VKWebAppGetUserInfoResult',
data: {
photo_100: 'https://pp.userapi.com/c841034/v841034569/3b8c1/pt3sOw_qhfg.jpg',
photo_200: 'https://pp.userapi.com/c841034/v841034569/3b8c1/pt3sOw_qhfg.jpg',
first_name: 'Friedrich',
last_name: 'Engels',
sex: 0,
city: {
id: 1,
title: 'London',
},
country: {
id: 1,
title: 'UK'
},
timezone: 0
},
}
You can find more information about methods responses here.
npm run clean - Remove lib/ directorynpm run lint - Run ESlint with airbnb-confignpm run build - Babel will transpile ES6 => ES5 and minify the code.npm run prepublish - Hook for npm. Do all the checks before publishing your module.FAQs
VK UI Connect Mock for development in browser
We found that @vkontakte/vkui-connect-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.