@web3api/core-js
Advanced tools
Comparing version 0.0.1-prealpha.60 to 0.0.1-prealpha.61
@@ -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 @@ }()); |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177725
2960
+ Added@web3api/manifest-schemas@0.0.1-prealpha.61(transitive)
+ Added@web3api/tracing-js@0.0.1-prealpha.61(transitive)
- Removed@web3api/manifest-schemas@0.0.1-prealpha.60(transitive)
- Removed@web3api/tracing-js@0.0.1-prealpha.60(transitive)