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

@ikas/app-helpers

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ikas/app-helpers - npm Package Compare versions

Comparing version 1.0.1-alpha.10 to 1.0.1-alpha.11

32

dist/helpers/app-bridge.js

@@ -67,14 +67,22 @@ "use strict";

static getNewToken() {
return new Promise((resolve) => {
const callback = (msg) => {
var _a, _b, _c;
if (((_a = msg.data) === null || _a === void 0 ? void 0 : _a.type) === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
const token = (_c = (_b = msg.data) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.token;
resolve(token);
}
resolve(undefined);
AppBridgeHelper.stopListener(callback);
};
AppBridgeHelper.startListener(callback);
AppBridgeHelper.requestToken();
return new Promise((resolve, reject) => {
const timer = setTimeout(() => reject('Timed out'), 30000);
try {
const callback = (msg) => {
var _a, _b, _c;
if (((_a = msg.data) === null || _a === void 0 ? void 0 : _a.type) === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
const token = (_c = (_b = msg.data) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.token;
resolve(token);
}
resolve(undefined);
AppBridgeHelper.stopListener(callback);
clearTimeout(timer);
};
AppBridgeHelper.startListener(callback);
AppBridgeHelper.requestToken();
}
catch (e) {
clearTimeout(timer);
reject(e);
}
});

@@ -81,0 +89,0 @@ }

{
"name": "@ikas/app-helpers",
"version": "1.0.1-alpha.10",
"version": "1.0.1-alpha.11",
"description": "ikas store app helpers",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -80,16 +80,23 @@ export class AppBridgeHelper {

static getNewToken(): Promise<string | undefined> {
return new Promise((resolve) => {
const callback = (msg: MessageEvent) => {
if (msg.data?.type === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
const token = msg.data?.data?.token;
resolve(token);
}
resolve(undefined);
return new Promise((resolve, reject) => {
const timer = setTimeout(() => reject('Timed out'), 30000);
try {
const callback = (msg: MessageEvent) => {
if (msg.data?.type === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
const token = msg.data?.data?.token;
resolve(token);
}
resolve(undefined);
AppBridgeHelper.stopListener(callback);
};
AppBridgeHelper.stopListener(callback);
clearTimeout(timer);
};
AppBridgeHelper.startListener(callback);
AppBridgeHelper.startListener(callback);
AppBridgeHelper.requestToken();
AppBridgeHelper.requestToken();
} catch (e) {
clearTimeout(timer);
reject(e);
}
});

@@ -96,0 +103,0 @@ }

Sorry, the diff of this file is not supported yet

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