nope/modules/mod-Broker/assembly/browser-manual-assembly.ts
2020-09-10 18:21:19 +02:00

72 lines
1.7 KiB
TypeScript

/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @create date 2018-07-02 03:51:00
* @modify date 2020-09-09 15:55:59
* @desc [description]
*/
import { IDescriptor } from "../../mod-Assembly-Builder/type/interfaces";
import { BrokerBase } from "../src/Broker-System";
import {
IteratorCancel, MultiFunctionChain,
SingleFunctionChain
} from "../src/Function-Chain";
import { ChainRepository as _ChainRepository } from "../src/Repository";
import { IBroker, IChainRepository, IFunctionChain } from "../type/interfaces";
import * as BROKER from "../type/types";
export const TYPES = BROKER.TYPES;
export type Broker = IBroker;
export type ChainRepository = IChainRepository;
export type FunctionChain = IFunctionChain;
export const EXPORT: Array<IDescriptor> = [
{
selector: TYPES.Broker,
factorySelector: TYPES.BrokerFactory,
type: BrokerBase,
options: {
scope: "inSingletonScope"
}
},
{
selector: TYPES.CancelableIteratorForChain,
factorySelector: TYPES.CancelableIteratorForChainFactory,
type: IteratorCancel
},
{
selector: TYPES.FunctionChain,
factorySelector: TYPES.FunctionChainFactory,
type: MultiFunctionChain,
options: {
addition: {
name: "whenTargetTagged",
args: ["type", "multi"]
}
}
},
{
selector: TYPES.FunctionChain,
factorySelector: TYPES.FunctionChainFactory,
type: SingleFunctionChain,
options: {
addition: {
name: "whenTargetTagged",
args: ["type", "single"]
}
}
},
{
selector: TYPES.ChainRepository,
factorySelector: TYPES.ChainRepositoryFactory,
type: _ChainRepository
}
];
export const REQUIRE = ["LOGGER", "IDGEN"];
export const NAME = "BROKER";