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

@artus/pipeline

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artus/pipeline - npm Package Compare versions

Comparing version 0.1.2 to 0.1.4

3

package.json
{
"name": "@artus/pipeline",
"version": "0.1.2",
"version": "0.1.4",
"main": "dist/index.js",

@@ -19,2 +19,3 @@ "scripts": {

"dependencies": {
"@artus/injection": "^0.1.1",
"tslib": "^2.3.1"

@@ -21,0 +22,0 @@ },

@@ -0,6 +1,8 @@

import { Container, ExecutionContainer } from '@artus/injection';
import {
BaseContext, BaseInput, BaseOutput,
ContextStorage, ParamsDictionary, Next
} from "./types";
ContextStorage, ParamsDictionary, Next, ContextInitOptions
} from './types';
const DEFAULT_EXECUTION_CONTAINER_NAME = 'artus#execution';
const ContextStorageSymbol = Symbol('ARTUS::ContextStorage');

@@ -33,14 +35,20 @@

public output: BaseOutput = new Output();
private stogrageMap = new Map<string, ContextStorage<any>>();
private storageMap = new Map<string, ContextStorage<any>>();
protected container: ExecutionContainer;
constructor(input?: Input, output?: Output) {
constructor(input?: Input, output?: Output, opts?: ContextInitOptions) {
this.input = input ?? this.input;
this.output = output ?? this.output;
this.container = new ExecutionContainer(
this,
opts?.parentContainer ?? new Container(DEFAULT_EXECUTION_CONTAINER_NAME)
);
}
namespace(namespace: string): ContextStorage<any> {
let storage = this.stogrageMap.get(namespace);
let storage = this.storageMap.get(namespace);
if (!storage) {
storage = new Storage();
this.stogrageMap.set(namespace, storage);
this.storageMap.set(namespace, storage);
}

@@ -47,0 +55,0 @@

@@ -0,1 +1,3 @@

import { Container } from '@artus/injection';
export interface ParamsDictionary {

@@ -19,2 +21,6 @@ [key: string]: any;

export interface ContextInitOptions {
parentContainer?: Container;
}
export type ContextStorage<T> = {

@@ -21,0 +27,0 @@ set: (value: T, key?: string | symbol) => void,

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