@ayana/bento
Advanced tools
Comparing version 1.0.0-beta.7 to 1.0.0-beta.8
@@ -8,2 +8,3 @@ import { Component } from './components'; | ||
import { VariableManager } from './variables/internal'; | ||
import { ComponentReference, PluginReference } from './references'; | ||
export interface BentoOptions { | ||
@@ -30,2 +31,10 @@ createID?(len?: number): string; | ||
/** | ||
* Alias for Bento.components.getComponent() | ||
* @param reference Component name or reference | ||
* | ||
* @see ComponentManager#getComponent | ||
* @returns See Bento.components.getComponent() | ||
*/ | ||
getComponent<T extends Component>(reference: ComponentReference): Promise<T>; | ||
/** | ||
* Alias for Bento.components.removeComponent() | ||
@@ -47,2 +56,10 @@ * @param name Component name | ||
/** | ||
* Alias for Bento.plugins.getPlugin() | ||
* @param reference Plugin name or reference | ||
* | ||
* @see PluginManager#getPlugin | ||
* @returns See Bento.plugins.getPlugin() | ||
*/ | ||
getPlugin<T extends Plugin>(reference: PluginReference): Promise<T>; | ||
/** | ||
* Alias for Bento.plugins.removePlugin() | ||
@@ -49,0 +66,0 @@ * @param name Plugin name |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -36,2 +36,12 @@ const crypto = require("crypto"); | ||
/** | ||
* Alias for Bento.components.getComponent() | ||
* @param reference Component name or reference | ||
* | ||
* @see ComponentManager#getComponent | ||
* @returns See Bento.components.getComponent() | ||
*/ | ||
async getComponent(reference) { | ||
return this.components.getComponent(reference); | ||
} | ||
/** | ||
* Alias for Bento.components.removeComponent() | ||
@@ -58,2 +68,12 @@ * @param name Component name | ||
/** | ||
* Alias for Bento.plugins.getPlugin() | ||
* @param reference Plugin name or reference | ||
* | ||
* @see PluginManager#getPlugin | ||
* @returns See Bento.plugins.getPlugin() | ||
*/ | ||
async getPlugin(reference) { | ||
return this.plugins.getPlugin(reference); | ||
} | ||
/** | ||
* Alias for Bento.plugins.removePlugin() | ||
@@ -182,3 +202,5 @@ * @param name Plugin name | ||
plugins.forEach(p => state.plugins.push(p.name)); | ||
// TODO: variable names | ||
// add variable names | ||
const variables = this.variables.getVariables(); | ||
state.variables = Object.keys(variables); | ||
// freze object | ||
@@ -185,0 +207,0 @@ Object.freeze(state); |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Component.js.map |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const internal_1 = require("./internal"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const internal_1 = require("./internal"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const DecoratorSymbols_1 = require("./DecoratorSymbols"); |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=DecoratorInjection.js.map |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=DecoratorSubscription.js.map |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=DecoratorVariable.js.map |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=DetectedComponent.js.map |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const internal_1 = require("./internal"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const internal_1 = require("./internal"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -3,0 +3,0 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=BentoState.js.map |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ var ConfigDefinitionType; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ var VariableSourceType; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Plugin.js.map |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const fs = require("fs"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const fs = require("fs"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
function __export(m) { | ||
@@ -3,0 +3,0 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +3,0 @@ const errors_1 = require("@ayana/errors"); |
@@ -1,3 +0,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=VariableDefinition.js.map |
@@ -25,2 +25,10 @@ import { Bento } from '../../Bento'; | ||
/** | ||
* Get Key/Value Object of all variables | ||
* | ||
* @returns Object of Key/Value pairs | ||
*/ | ||
getVariables(): { | ||
[key: string]: any; | ||
}; | ||
/** | ||
* Update a given variables value | ||
@@ -27,0 +35,0 @@ * @param name name of variable |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -42,2 +42,13 @@ const errors_1 = require("@ayana/errors"); | ||
/** | ||
* Get Key/Value Object of all variables | ||
* | ||
* @returns Object of Key/Value pairs | ||
*/ | ||
getVariables() { | ||
return Array.from(this.variables.entries()).reduce((a, [k, v]) => { | ||
a[k] = v; | ||
return a; | ||
}, {}); | ||
} | ||
/** | ||
* Update a given variables value | ||
@@ -44,0 +55,0 @@ * @param name name of variable |
{ | ||
"name": "@ayana/bento", | ||
"version": "1.0.0-beta.7", | ||
"version": "1.0.0-beta.8", | ||
"description": "Modular runtime framework designed to solve complex tasks", | ||
@@ -5,0 +5,0 @@ "repository": "https://gitlab.com/ayana/libs/bento", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
208371
3814
1