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

@universal-packages/dynamic-api

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@universal-packages/dynamic-api - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

4

DynamicApi.js

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

this.dynamics = {};
this.options = { debug: process.env['NODE_ENV'] === 'test', dynamicsLocation: './src', modules: [], ...options };
this.options = { debug: process.env['NODE_ENV'] === 'test', dynamicsLocation: './src', modules: {}, ...options };
if (this.options.debug && process.env['NODE_ENV'] !== 'test' && process.env['NODE_ENV'] !== 'development') {

@@ -37,3 +37,3 @@ const message = `dynamic api (${this.options.apiName || this.constructor.name || 'unnamed'}) debug mode is enabled`;

if (DynamicClass.__module) {
const dynamicModuleEntry = this.options.modules.find((module) => module.name === DynamicClass.__module);
const dynamicModuleEntry = this.options.modules[DynamicClass.__module];
// Skip if module is not enabled

@@ -40,0 +40,0 @@ if (!dynamicModuleEntry)

{
"name": "@universal-packages/dynamic-api",
"version": "1.10.0",
"version": "1.11.0",
"description": "Dynamic decoupling-adapting system",

@@ -5,0 +5,0 @@ "author": "David De Anda <david@universal-packages.com> (https://github.com/universal-packages)",

@@ -61,3 +61,3 @@ # Dynamic API

-- **`modules`** `Array`
-- **`modules`** `Map`
When decorating dynamics you can mark them as part of a module, you need to enable modules explicitly in the dynamic api.

@@ -77,3 +77,3 @@

```js
const dynamicApi = new DynamicApi({ modules: [{ name: 'sub-calculations', enabled: true }] })
const dynamicApi = new DynamicApi({ modules: { 'sub-calculations': { enabled: true } } })
const result = await dynamicApi.performDynamic('extra')

@@ -80,0 +80,0 @@

@@ -9,7 +9,6 @@ import DynamicApi from './DynamicApi';

dynamicsLocation: string;
modules?: DynamicModule[];
modules?: Record<string, DynamicModule>;
namespace?: string;
}
export interface DynamicModule {
name: string;
enabled: boolean;

@@ -16,0 +15,0 @@ options?: Record<string, any>;

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