Socket
Socket
Sign inDemoInstall

@mntm/painless-bridge

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.0.2

lib/types/common.d.ts

6

lib/bridge.d.ts

@@ -8,3 +8,3 @@ import type { VKBridgeMethod, VKBridgeSend, VKBridgeSubscribeHandler } from './types/data.js';

*/
declare const supports: <M extends string>(method: VKBridgeMethod<M>) => any;
declare const supports: <M extends string>(method: VKBridgeMethod<M>) => boolean;
/**

@@ -69,3 +69,3 @@ * Adds an event listener. It will be called any time a data is received.

unsubscribe: (listener: VKBridgeSubscribeHandler) => void;
supports: <M extends string>(method: VKBridgeMethod<M>) => any;
supports: <M extends string>(method: VKBridgeMethod<M>) => boolean;
isWebView: () => boolean;

@@ -84,3 +84,3 @@ isIframe: () => boolean;

unsubscribe: (listener: VKBridgeSubscribeHandler) => void;
supports: <M extends string>(method: VKBridgeMethod<M>) => any;
supports: <M extends string>(method: VKBridgeMethod<M>) => boolean;
isWebView: () => boolean;

@@ -87,0 +87,0 @@ isIframe: () => boolean;

@@ -1,2 +0,2 @@

import type { ErrorData, VKBridgeSend } from '../types/data.js';
import type { ErrorData, ErrorDataFullSpec, VKBridgeSend } from '../types/data.js';
export declare const UNKNOWN_ERROR: ErrorData;

@@ -7,9 +7,15 @@ export declare const NETWORK_ERROR: ErrorData;

/** Gets error reason with fallback. */
export declare const getErrorReason: (unsafe?: any) => any;
export declare const getErrorReason: (unsafe?: Record<string, unknown> | undefined) => string | ({
code?: number | undefined;
error_code?: number | undefined;
error_msg?: string | undefined;
error_text?: string | undefined;
request_params?: string[] | Record<string, unknown>[] | undefined;
} & Partial<ErrorDataFullSpec>);
/** Gets the deepest error type. */
export declare const getErrorType: (unsafe?: any) => string;
export declare const getErrorType: (unsafe?: Record<string, unknown> | undefined) => string;
/** Gets the deepest error code. */
export declare const getErrorCode: (unsafe?: any) => number;
export declare const getErrorCode: (unsafe?: Record<string, unknown> | undefined) => number;
/** Casts edge case errors to proper ones. */
export declare const castError: (unsafe?: any) => ErrorData;
export declare const castError: (unsafe?: Record<string, unknown> | undefined) => ErrorData;
export declare const pluginError: (send: VKBridgeSend) => VKBridgeSend;
import type { ErrorData, VKBridgeEvent } from './types/data.js';
import type { AnyHandler } from './types/common.js';
export declare const nextId: () => string;
export declare const awaiters: any;
export declare const awaiters: Map<string, AnyHandler>;
/** Checks if event is ErrorData */

@@ -5,0 +6,0 @@ export declare const isBridgeError: (payload?: unknown | null) => payload is ErrorData;

{
"name": "@mntm/painless-bridge",
"version": "3.0.1",
"version": "3.0.2",
"source": "./src/index.ts",

@@ -41,3 +41,3 @@ "main": "./lib/index.web.js",

"scripts": {
"build": "shx rm -rf lib && nanobundle build"
"build": "shx rm -rf lib && nanobundle build & tsc"
},

@@ -44,0 +44,0 @@ "devDependencies": {

# @mntm/painless-bridge [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/maxi-team/painless-bridge/blob/master/LICENSE) [![npm bundle size](https://img.shields.io/bundlephobia/min/@mntm/painless-bridge)](https://bundlephobia.com/result?p=@mntm/painless-bridge)
**Docs:** RU | EN
**Docs:** [RU](https://dev.vk.com/bridge/getting-started) | [EN](https://github.com/VKCOM/vk-bridge/blob/master/README.md)

@@ -9,3 +9,3 @@ A package for integrating VK Mini Apps with official VK clients for iOS, Android and Web.

- Fixes the storage API
- Fixes storage API
- Fixes token API

@@ -12,0 +12,0 @@ - Fixes platform-specific errors

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc