Socket
Book a DemoInstallSign in
Socket

@protectonce/core

Package Overview
Dependencies
Maintainers
0
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@protectonce/core

ProtectOnce Agent Common Core

0.1.182
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

ProtectOnce Agent Core

The Agent Core has two interfaces, one for NodeJS runtime and another one for other runtime (to be called using C-Interface)

Fetching Thirdparty dependencies

Run following command inside root directory to fetch all the git submodules

git submodule update --init --recursive

Interface for NodeJS

To use core, node agent can use interface under lib/runtime/interface.js by using following code:

const core = requires(@protectonce/core);

const runtimeInfo = {
    'runtime': 'nodejs',
    'runtimeVersion': process.version
}
core.login(runtimeInfo)
    .then((rules)) {

    }).catch((e) => {
        console.log(`Login failed with error: ${e}`);
    });

Interface for other runtime

Other runtime should use global.protectOnceInvokeInterface to call core APIs

Testing

Run following command to run unit tests npm test

FAQs

Package last updated on 30 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.