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

@platformatic/itc

Package Overview
Dependencies
Maintainers
7
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/itc - npm Package Compare versions

Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4

29

lib/itc.js

@@ -41,4 +41,5 @@ 'use strict'

const request = this.#generateRequest(name, message)
this.port.postMessage(request)
this._send(request)
const responsePromise = once(this.#requestEmitter, request.reqId).then(([response]) => response)

@@ -53,3 +54,3 @@

async notify (name, message) {
this.port.postMessage(this.#generateNotification(name, message))
this._send(this.#generateNotification(name, message))
}

@@ -67,3 +68,3 @@

this.port.on('message', message => {
this._setupListener(message => {
const messageType = message.type

@@ -86,3 +87,3 @@ if (messageType === PLT_ITC_REQUEST_TYPE) {

this.#closePromise = once(this.port, 'close').then(() => {
this.#closePromise = this._createClosePromise().then(() => {
this.#listening = false

@@ -100,2 +101,18 @@ const error = new errors.MessagePortClosed()

this._close()
}
_setupListener (listener) {
this.port.on('message', listener)
}
_send (request) {
this.port.postMessage(request)
}
_createClosePromise () {
return once(this.port, 'close')
}
_close () {
this.port.close()

@@ -138,3 +155,3 @@ }

this.port.postMessage(response)
this._send(response)

@@ -164,3 +181,3 @@ if (this.#closeAfterCurrentRequest) {

response = this.#generateUnhandledErrorResponse(error)
this.port.postMessage(response)
this._send(response)
return

@@ -167,0 +184,0 @@ }

{
"name": "@platformatic/itc",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "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