Socket
Socket
Sign inDemoInstall

@web3api/core-js

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3api/core-js - npm Package Compare versions

Comparing version 0.0.1-prealpha.60 to 0.0.1-prealpha.61

18

build/types/Plugin.d.ts

@@ -26,2 +26,3 @@ import { Uri, Client, InvokableModules, MaybeAsync } from ".";

export declare abstract class Plugin {
private _env;
/**

@@ -34,2 +35,19 @@ * Get an instance of this plugin's modules.

abstract getModules(client: Client): PluginModules;
/**
* Sanitize plugin environment.
* This can optionally implemented by plugin
*
* @param env Module environment to be sanitized
*/
sanitizeEnv?(env: Record<string, unknown>): Promise<Record<string, unknown>>;
/**
* Load module enviroment to be used
*
* @param env module enviroment to be set inside plugin
*/
loadEnv(env: Record<string, unknown>, module: InvokableModules): void;
/**
* Get module environment
*/
getEnv(module: InvokableModules): Record<string, unknown>;
}

@@ -36,0 +54,0 @@ /** The plugin package's manifest */

@@ -9,3 +9,21 @@ "use strict";

function Plugin() {
this._env = {
query: {},
mutation: {},
};
}
/**
* Load module enviroment to be used
*
* @param env module enviroment to be set inside plugin
*/
Plugin.prototype.loadEnv = function (env, module) {
this._env[module] = env;
};
/**
* Get module environment
*/
Plugin.prototype.getEnv = function (module) {
return this._env[module];
};
return Plugin;

@@ -12,0 +30,0 @@ }());

10

package.json
{
"name": "@web3api/core-js",
"description": "Web3API Javascript Core",
"version": "0.0.1-prealpha.60",
"version": "0.0.1-prealpha.61",
"license": "MIT",

@@ -23,4 +23,4 @@ "repository": {

"dependencies": {
"@web3api/manifest-schemas": "0.0.1-prealpha.60",
"@web3api/tracing-js": "0.0.1-prealpha.60",
"@web3api/manifest-schemas": "0.0.1-prealpha.61",
"@web3api/tracing-js": "0.0.1-prealpha.61",
"graphql": "15.5.0",

@@ -35,3 +35,3 @@ "graphql-tag": "2.10.4",

"@types/semver": "7.3.8",
"@web3api/os-js": "0.0.1-prealpha.60",
"@web3api/os-js": "0.0.1-prealpha.61",
"jest": "26.6.3",

@@ -45,3 +45,3 @@ "json-schema-to-typescript": "10.1.3",

},
"gitHead": "9bdabc1eb50cc899826d62af1e196ed66a230b23",
"gitHead": "8d659a9101e6097c659c56385871a980af9dcacc",
"publishConfig": {

@@ -48,0 +48,0 @@ "access": "public"

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