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

@comunica/core

Package Overview
Dependencies
Maintainers
4
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@comunica/core - npm Package Compare versions

Comparing version 1.19.2 to 1.20.0

18

lib/Actor.d.ts

@@ -1,4 +0,5 @@

import { Map } from 'immutable';
import type { IAction, ActionContext as _ActionContext } from '@comunica/types';
import type { Bus } from './Bus';
import type { Logger } from './Logger';
export type { IAction };
/**

@@ -103,3 +104,3 @@ * An actor can act on messages of certain types and provide output of a certain type.

* Each bus should describe in its action interface which context entries are possible (non-restrictive)
* and expose a `KEY_CONTEXT_${ENTRY_NAME}` constant for easy reuse.
* and corresponding context keys should be exposed in '@comunica/context-entries' for easy reuse.
* If actors support any specific context entries next to those inherited by the bus action interface,

@@ -115,4 +116,6 @@ * then this should be described in its README file.

* For instance, this context can contain a list of datasources over which operators should query.
*
* @deprecated Use the same type from @comunica/types
*/
export declare type ActionContext = Map<string, any>;
export declare type ActionContext = _ActionContext;
/**

@@ -133,11 +136,2 @@ * A convenience constructor for {@link ActionContext} based on a given hash.

/**
* Data interface for the type of action.
*/
export interface IAction {
/**
* The optional input context that is passed through by actors.
*/
context?: ActionContext;
}
/**
* Data interface for the type of an actor test result.

@@ -144,0 +138,0 @@ */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureActionContext = exports.ActionContext = exports.Actor = void 0;
const context_entries_1 = require("@comunica/context-entries");
const immutable_1 = require("immutable");
const Logger_1 = require("./Logger");
/**

@@ -48,3 +48,3 @@ * An actor can act on messages of certain types and provide output of a certain type.

static getContextLogger(context) {
return context && context.get(Logger_1.KEY_CONTEXT_LOG);
return context && context.get(context_entries_1.KeysCore.log);
}

@@ -51,0 +51,0 @@ /**

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

if (actionId) {
const actors = (this.actorsIndex[actionId] || []).concat(this.actorsIndex._undefined_ || []);
const actors = [...this.actorsIndex[actionId] || [], ...this.actorsIndex._undefined_ || []];
return actors.map((actor) => ({ actor, reply: actor.test(action) }));

@@ -62,0 +62,0 @@ }

@@ -0,1 +1,2 @@

import { KeysCore } from '@comunica/context-entries';
/**

@@ -27,3 +28,4 @@ * A logger accepts messages from different levels

* @value {Logger} A logger.
* @deprecated Import this constant from @comunica/context-entries.
*/
export declare const KEY_CONTEXT_LOG = "@comunica/core:log";
export declare const KEY_CONTEXT_LOG = KeysCore.log;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KEY_CONTEXT_LOG = exports.Logger = void 0;
const context_entries_1 = require("@comunica/context-entries");
/**

@@ -34,4 +35,5 @@ * A logger accepts messages from different levels

* @value {Logger} A logger.
* @deprecated Import this constant from @comunica/context-entries.
*/
exports.KEY_CONTEXT_LOG = '@comunica/core:log';
exports.KEY_CONTEXT_LOG = context_entries_1.KeysCore.log;
//# sourceMappingURL=Logger.js.map
{
"name": "@comunica/core",
"version": "1.19.2",
"version": "1.20.0",
"description": "Lightweight, semantic and modular actor framework",

@@ -39,2 +39,4 @@ "lsd:module": true,

"dependencies": {
"@comunica/context-entries": "^1.20.0",
"@comunica/types": "^1.20.0",
"immutable": "^3.8.2"

@@ -64,3 +66,3 @@ },

},
"gitHead": "73525f72e616c1f8ee244ea5c64e10e4a6032cf5"
"gitHead": "e939e0abd92972407bd8dc04d8073720efdfe2f1"
}

@@ -22,7 +22,7 @@ # Comunica Core

* [`Actor`](https://comunica.github.io/comunica/classes/core.actor-1.html): An actor can act on messages of certain types and provide output of a certain type.
* [`Bus`](https://comunica.github.io/comunica/classes/core.bus-1.html): A publish-subscribe bus for sending actions to actors to test whether or not they can run an action.
* [`Mediator`](https://comunica.github.io/comunica/classes/core.mediator-1.html): A mediator can mediate an action over a bus of actors.
* [`ActionObserver`](https://comunica.github.io/comunica/classes/core.actionobserver-1.html): An ActionObserver can passively listen to Actor.run inputs and outputs for all actors on a certain bus.
* [`BusIndexed`](https://comunica.github.io/comunica/classes/core.busindexed-1.html): A bus that indexes identified actors, so that actions with a corresponding identifier can be published more efficiently.
* [`Logger`](https://comunica.github.io/comunica/classes/core.logger-1.html): A logger accepts messages from different levels and emits them in a certain way.
* [`Actor`](https://comunica.github.io/comunica/classes/core.actor.html): An actor can act on messages of certain types and provide output of a certain type.
* [`Bus`](https://comunica.github.io/comunica/classes/core.bus.html): A publish-subscribe bus for sending actions to actors to test whether or not they can run an action.
* [`Mediator`](https://comunica.github.io/comunica/classes/core.mediator.html): A mediator can mediate an action over a bus of actors.
* [`ActionObserver`](https://comunica.github.io/comunica/classes/core.actionobserver.html): An ActionObserver can passively listen to Actor.run inputs and outputs for all actors on a certain bus.
* [`BusIndexed`](https://comunica.github.io/comunica/classes/core.busindexed.html): A bus that indexes identified actors, so that actions with a corresponding identifier can be published more efficiently.
* [`Logger`](https://comunica.github.io/comunica/classes/core.logger.html): A logger accepts messages from different levels and emits them in a certain way.
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