Martin Karkowski
4791914998
- Modified: - cli.runNopeBackend: added the flag "noBaseServices" to prevent providing the base-services - communication.getLayer.nodejs/browser: adding default value for logger - dispatcher.getDispatcher: changed option "constructorClass" to "dispatcherConstructorClass" - helpers.limit.spec: Adapted Timings - loader.getPackageLoader.nodejs/browser: Changed the options.
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
/**
|
|
* @author Martin Karkowski
|
|
* @email m.karkowski@zema.de
|
|
* @desc [description]
|
|
*/
|
|
|
|
import { INopePackageLoaderConstructor } from "../index.browser";
|
|
import {
|
|
IDispatcherConstructor,
|
|
INopeDispatcherOptions,
|
|
} from "../types/nope/nopeDispatcher.interface";
|
|
import { getPackageLoader as getBrowserPackageLoader } from "./getPackageLoader.browser";
|
|
import { NopePackageLoaderFileAccess } from "./nopePackageLoader.nodejs";
|
|
|
|
/**
|
|
* Function to extract the Package-Loader. This one here includes file access.
|
|
* @param {INopeDispatcherOptions} dispatcherOptions The provided options for the Dispatcher
|
|
* @param options Settings for the creation of the Dispatcher etc.
|
|
* @returns {INopePackageLoader} The Package loader.
|
|
*/
|
|
export function getPackageLoader(
|
|
dispatcherOptions: INopeDispatcherOptions,
|
|
options: {
|
|
packageLoaderConstructorClass?: INopePackageLoaderConstructor;
|
|
dispatcherConstructorClass?: IDispatcherConstructor;
|
|
singleton?: boolean;
|
|
useBaseServices?: boolean;
|
|
} = {}
|
|
) {
|
|
options.packageLoaderConstructorClass = NopePackageLoaderFileAccess;
|
|
|
|
return getBrowserPackageLoader(dispatcherOptions, options);
|
|
}
|