Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postmessage-communicator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postmessage-communicator - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

5

CHANGELOG.md

@@ -13,2 +13,7 @@ # Changelog

## [v3.0.0] - 2022-11-08
- Update event names to match existing wording
- Create tracking event on VendorClient
## [v2.0.0] - 2022-11-08

@@ -15,0 +20,0 @@

2

dist/classes/ClientCommunicator.d.ts
import { Communicator } from './Communicator';
export declare enum ClientEvent {
LoginWithToken = "LoginWithToken",
RefreshWithToken = "RefreshToken"
RefreshWithToken = "RefreshWithToken"
}

@@ -6,0 +6,0 @@ interface InitPayload {

@@ -8,3 +8,3 @@ "use strict";

ClientEvent["LoginWithToken"] = "LoginWithToken";
ClientEvent["RefreshWithToken"] = "RefreshToken";
ClientEvent["RefreshWithToken"] = "RefreshWithToken";
})(ClientEvent = exports.ClientEvent || (exports.ClientEvent = {}));

@@ -11,0 +11,0 @@ class ClientCommunicator extends Communicator_1.Communicator {

@@ -7,5 +7,6 @@ import { Communicator } from './Communicator';

DirtyStateChanged = "DirtyStateChanged",
IframeLoaded = "IframeLoaded",
iFrameLoaded = "iFrameLoaded",
ProjectDeleted = "ProjectDeleted",
ProjectSaved = "ProjectSaved",
ProjectDeleted = "ProjectDeleted",
TrackingEvent = "TrackingEvent",
TokenRefreshRequested = "TokenRefreshRequested",

@@ -31,2 +32,6 @@ UnauthorizedToken = "UnauthorizedToken"

}
interface TrackingEvent {
actionName: string;
actionData: Record<string, unknown>;
}
export declare class VendorCommunicator extends Communicator {

@@ -41,2 +46,3 @@ constructor(origin: string);

projectDeleted(): void;
trackEvent(payload: TrackingEvent): void;
tokenRefreshRequested(): void;

@@ -43,0 +49,0 @@ unauthorizedToken(error: string): void;

@@ -11,5 +11,6 @@ "use strict";

VendorEvent["DirtyStateChanged"] = "DirtyStateChanged";
VendorEvent["IframeLoaded"] = "IframeLoaded";
VendorEvent["iFrameLoaded"] = "iFrameLoaded";
VendorEvent["ProjectDeleted"] = "ProjectDeleted";
VendorEvent["ProjectSaved"] = "ProjectSaved";
VendorEvent["ProjectDeleted"] = "ProjectDeleted";
VendorEvent["TrackingEvent"] = "TrackingEvent";
VendorEvent["TokenRefreshRequested"] = "TokenRefreshRequested";

@@ -37,3 +38,3 @@ VendorEvent["UnauthorizedToken"] = "UnauthorizedToken";

iframeLoaded() {
this.post({ type: VendorEvent.IframeLoaded });
this.post({ type: VendorEvent.iFrameLoaded });
}

@@ -46,2 +47,5 @@ projectSaved() {

}
trackEvent(payload) {
this.post({ type: VendorEvent.TrackingEvent, payload });
}
tokenRefreshRequested() {

@@ -48,0 +52,0 @@ this.post({ type: VendorEvent.TokenRefreshRequested });

{
"name": "postmessage-communicator",
"version": "2.0.0",
"version": "3.0.0",
"description": "[![Release](https://img.shields.io/github/v/release/wayfair-incubator/oss-template?display_name=tag)](CHANGELOG.md) [![Lint](https://github.com/wayfair-incubator/oss-template/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/wayfair-incubator/oss-template/actions/workflows/lint.yml) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md) [![Maintainer](https://img.shields.io/badge/Maintainer-Wayfair-7F187F)](https://wayfair.github.io)",

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

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