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

primea-abstract-container

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primea-abstract-container - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

13

index.js
module.exports = class AbstractContainer {
// The constructor is given an instance of the kernel
// https://github.com/primea/js-primea-hypervisor/blob/master/docs/kernel.md
constructor (kernel) {
this.kernel = kernel
// The constructor is given an instance of the actor
// https://github.com/primea/js-primea-hypervisor/blob/master/docs/actor.md
constructor (actor) {
this.actor = actor
}

@@ -24,3 +24,2 @@

// This is called for each incoming message the container gets.
//
// Optionally it can return a single value.

@@ -36,7 +35,7 @@ async onMessage (message) {

onIdle () {
// This tells the kernel that it is safe to freeze (aka turn off) this container.
// This tells the actor that it is safe to freeze (aka turn off) this container.
// This removes all references in memory and the next time this instance is
// requested it has to be deserialised from storage and spinned up. This can be
// a time consuming operation.
this.kernel.shutdown()
this.actor.shutdown()
}

@@ -43,0 +42,0 @@

{
"name": "primea-abstract-container",
"version": "0.0.5",
"version": "0.0.6",
"description": "Abstract Primea container",

@@ -25,5 +25,4 @@ "scripts": {

"devDependencies": {
"standard": "10.0.2",
"tape": "^4.5.1"
"standard": "^10.0.3"
}
}

@@ -11,2 +11,4 @@ # SYNOPSIS

# LICENSE
[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2))
[MPL-2.0][LICENSE]
[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)
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