diff --git a/lib/communication/index.browser.ts b/lib/communication/index.browser.ts index a037f94..ee1a443 100644 --- a/lib/communication/index.browser.ts +++ b/lib/communication/index.browser.ts @@ -2,7 +2,7 @@ * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2021-08-04 15:30:10 - * @modify date 2021-08-04 15:44:45 + * @modify date 2021-08-27 20:10:12 * @desc [description] */ export { @@ -15,6 +15,7 @@ export { ICommunicationInterface, ICommunicationMirror, IEmitter, + IExecutingTaskMsg, IExternalEventMsg, IInstanceCreationMsg, IInstanceDescriptionMsg, @@ -22,15 +23,20 @@ export { IRequestOfService, IRequestTaskMsg, IResponseTaskMsg, + IRpcUnregisterMsg, ITaskCancelationMsg, ValidEventTypesOfMirror } from "../types/nope/nopeCommunication.interface"; export { + ENopeDispatcherStatus, IDispatcherInfo, - INopeDispatcher, INopeDispatcherOptions + INopeDispatcher, + INopeDispatcherOptions, + ValidSelectorFunction } from "../types/nope/nopeDispatcher.interface"; export { Bridge } from "./bridge"; export { getLayer, validLayers } from "./getLayer"; -export * as Layers from "./layers/index.browser"; -export * as Mirrors from "./mirrors/index.browser"; +export { Layers, Mirrors }; +import * as Layers from "./layers/index.browser"; +import * as Mirrors from "./mirrors/index.browser"; diff --git a/lib/communication/index.nodejs.ts b/lib/communication/index.nodejs.ts index 2a157d1..dab4652 100644 --- a/lib/communication/index.nodejs.ts +++ b/lib/communication/index.nodejs.ts @@ -2,10 +2,9 @@ * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2021-08-04 15:30:10 - * @modify date 2021-08-04 15:45:57 + * @modify date 2021-08-04 15:44:45 * @desc [description] */ - export { IAvailableInstanceGeneratorsMsg, IAvailableInstancesMsg, @@ -16,19 +15,28 @@ export { ICommunicationInterface, ICommunicationMirror, IEmitter, + IExecutingTaskMsg, IExternalEventMsg, IInstanceCreationMsg, IInstanceDescriptionMsg, IInstanceRemovalMsg, - INopeDispatcherOptions, IRequestOfService, IRequestTaskMsg, IResponseTaskMsg, + IRpcUnregisterMsg, ITaskCancelationMsg, ValidEventTypesOfMirror } from "../types/nope/nopeCommunication.interface"; +export { + ENopeDispatcherStatus, + IDispatcherInfo, + INopeDispatcher, + INopeDispatcherOptions, + ValidSelectorFunction +} from "../types/nope/nopeDispatcher.interface"; export { Bridge } from "./bridge"; export { getLayer, validLayers } from "./getLayer"; -export * as Layers from "./layers/index.nodejs"; -export * as Mirrors from "./mirrors/index.nodejs"; +export { Layers, Mirrors }; +import * as Layers from "./layers/index.nodejs"; +import * as Mirrors from "./mirrors/index.nodejs"; diff --git a/lib/communication/layers/index.browser.ts b/lib/communication/layers/index.browser.ts index 814594d..fad864a 100644 --- a/lib/communication/layers/index.browser.ts +++ b/lib/communication/layers/index.browser.ts @@ -8,8 +8,7 @@ export { AmqpInterface, AmqpLayer, - QueuePublishOptions as AmqpQueuePublishOptions, - QueueSubscribeOptions as AmqpQueueSubscribeOptions, - SubscriptionOptions as AmqpSubscriptionOptions + QueuePublishOptions as IAmqpQueuePublishOptions, + QueueSubscribeOptions as IAmqpQueueSubscribeOptions, + SubscriptionOptions as IAmqpSubscriptionOptions } from "./amqpLayer"; - diff --git a/lib/communication/layers/index.nodejs.ts b/lib/communication/layers/index.nodejs.ts index 417b1be..982a8a1 100644 --- a/lib/communication/layers/index.nodejs.ts +++ b/lib/communication/layers/index.nodejs.ts @@ -2,15 +2,9 @@ * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2021-08-04 15:31:05 - * @modify date 2021-08-04 15:31:05 + * @modify date 2021-08-27 20:11:27 * @desc [description] */ -export { - AmqpInterface, - AmqpLayer, - QueuePublishOptions as AmqpQueuePublishOptions, - QueueSubscribeOptions as AmqpQueueSubscribeOptions, - SubscriptionOptions as AmqpSubscriptionOptions -} from "./amqpLayer"; -export { MQTTLayer } from "./mqttLayer"; +export * from "./index.browser"; +export { MQTTLayer } from "./mqttLayer"; diff --git a/lib/communication/mirrors/index.browser.ts b/lib/communication/mirrors/index.browser.ts index 523f063..61f4cd6 100644 --- a/lib/communication/mirrors/index.browser.ts +++ b/lib/communication/mirrors/index.browser.ts @@ -2,9 +2,9 @@ * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2021-08-04 15:33:37 - * @modify date 2021-08-04 15:33:37 + * @modify date 2021-08-27 20:10:42 * @desc [description] */ +export { EventMirror } from "./eventMirror"; export { IoSocketMirrorClient } from "./ioSocketMirrorClient"; - diff --git a/lib/communication/mirrors/index.nodejs.ts b/lib/communication/mirrors/index.nodejs.ts index 523f063..b8f9412 100644 --- a/lib/communication/mirrors/index.nodejs.ts +++ b/lib/communication/mirrors/index.nodejs.ts @@ -2,9 +2,9 @@ * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2021-08-04 15:33:37 - * @modify date 2021-08-04 15:33:37 + * @modify date 2021-08-27 20:10:48 * @desc [description] */ +export { EventMirror } from "./eventMirror"; export { IoSocketMirrorClient } from "./ioSocketMirrorClient"; - diff --git a/lib/decorators/index.ts b/lib/decorators/index.ts new file mode 100644 index 0000000..8de382b --- /dev/null +++ b/lib/decorators/index.ts @@ -0,0 +1,10 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 19:47:47 + * @modify date 2021-08-27 19:47:47 + * @desc [description] + */ + +export { exportFunctionToDispatcher, IExportFunctionToDispatcherParameters } from "./dispatcherDecorators"; +export { exportMethod, exportProperty } from "./moduleDecorators"; diff --git a/lib/dispatcher/index.ts b/lib/dispatcher/index.ts new file mode 100644 index 0000000..5f15fe7 --- /dev/null +++ b/lib/dispatcher/index.ts @@ -0,0 +1,16 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 19:49:25 + * @modify date 2021-08-27 19:49:25 + * @desc [description] + */ + +export { + exportFunctionToDispatcher, + exportMethod, + exportProperty, + IExportFunctionToDispatcherParameters +} from "../decorators/index"; +export { getDispatcher } from "./getDispatcher"; +export { getLinkedDispatcher } from "./getLinkedDispatcher"; diff --git a/lib/helpers/async.ts b/lib/helpers/async.ts new file mode 100644 index 0000000..b13459b --- /dev/null +++ b/lib/helpers/async.ts @@ -0,0 +1,20 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 21:16:23 + * @modify date 2021-08-27 21:16:23 + * @desc [description] + */ + +import { promisify } from "util"; + +export const sleep = promisify(setTimeout); + +/** + * Tests if a Function is async or not. + * @param func + * @returns + */ +export function isAsyncFunction(func: (...args) => any): boolean { + return func.constructor.name === "AsyncFunction"; +} diff --git a/lib/helpers/index.browser.ts b/lib/helpers/index.browser.ts new file mode 100644 index 0000000..211deb2 --- /dev/null +++ b/lib/helpers/index.browser.ts @@ -0,0 +1,34 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 19:50:23 + * @modify date 2021-08-27 19:50:23 + * @desc [description] + */ +import * as arrays from "./arrayMethods"; +import * as async from "./async"; +import * as files from "./fileMethods"; +import * as ids from "./idMethods"; +import * as json from "./jsonMethods"; +import * as schema from "./jsonSchemaMethods"; +import * as lazy from "./lazyMethods"; +import * as objects from "./objectMethods"; +import * as runtime from "./runtimeMethods"; +import * as sets from "./setMethods"; +import * as singletons from "./singletonMethod"; +import * as strings from "./singletonMethod"; + +export { + async, + arrays, + ids, + json, + lazy, + objects, + sets, + schema, + singletons, + strings, + runtime, + files +}; diff --git a/lib/helpers/index.nodejs.ts b/lib/helpers/index.nodejs.ts new file mode 100644 index 0000000..2582b95 --- /dev/null +++ b/lib/helpers/index.nodejs.ts @@ -0,0 +1,11 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 19:50:23 + * @modify date 2021-08-27 19:50:23 + * @desc [description] + */ + +export * from "./index.browser"; +export { files }; +import * as files from "./fileMethods"; diff --git a/lib/loader/index.browser.ts b/lib/loader/index.browser.ts new file mode 100644 index 0000000..d28b00c --- /dev/null +++ b/lib/loader/index.browser.ts @@ -0,0 +1,11 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:19:51 + * @modify date 2021-08-27 20:19:51 + * @desc [description] + */ + +export { generateNopeBasicPackage } from "./generateNopeBasicPackage"; +export { getPackageLoader } from "./getPackageLoader"; +export { NopePackageLoader } from "./nopePackageLoader"; diff --git a/lib/loader/index.nodejs.ts b/lib/loader/index.nodejs.ts new file mode 100644 index 0000000..e6831f3 --- /dev/null +++ b/lib/loader/index.nodejs.ts @@ -0,0 +1,18 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:19:51 + * @modify date 2021-08-27 20:19:51 + * @desc [description] + */ + +export * from "./index.browser"; +export { + IConfigFile, + IPackageConfig, + listFunctions, + listPackages, + loadFunctions, + loadPackages, + writeDefaultConfig +} from "./loadPackages"; diff --git a/lib/logger/index.browser.ts b/lib/logger/index.browser.ts new file mode 100644 index 0000000..9accc73 --- /dev/null +++ b/lib/logger/index.browser.ts @@ -0,0 +1,11 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 19:57:08 + * @modify date 2021-08-27 19:57:08 + * @desc [description] + */ + +export { getCentralNopeLogger, getNopeLogger } from "./getLogger"; +export { LoggerLevels } from "./nopeLogger"; +export { setGlobalLoggerLevel } from "./setGlobalLoggerLevel"; diff --git a/lib/logger/index.nodejs.ts b/lib/logger/index.nodejs.ts new file mode 100644 index 0000000..585381b --- /dev/null +++ b/lib/logger/index.nodejs.ts @@ -0,0 +1,10 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:19:05 + * @modify date 2021-08-27 20:19:05 + * @desc [description] + */ + +export { generateLogfilePath, useLogFile } from "./fileLogging"; +export * from "./index.browser"; diff --git a/lib/module/index.ts b/lib/module/index.ts new file mode 100644 index 0000000..53432c0 --- /dev/null +++ b/lib/module/index.ts @@ -0,0 +1,13 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:28:44 + * @modify date 2021-08-27 20:28:44 + * @desc [description] + */ + +export * from "../types/nope/nopeModule.interface"; +export { NopeBaseModule } from "./BaseModule"; +export { InjectableNopeBaseModule } from "./BaseModule.injectable"; +export { NopeGenericModule } from "./GenericModule"; +export { InjectableNopeGenericModule } from "./GenericModule.injectable"; diff --git a/lib/observables/index.ts b/lib/observables/index.ts new file mode 100644 index 0000000..11bff57 --- /dev/null +++ b/lib/observables/index.ts @@ -0,0 +1,11 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:29:38 + * @modify date 2021-08-27 20:29:38 + * @desc [description] + */ + +export * from "../types/nope/nopeObservable.interface"; +export { NopeObservable } from "./nopeObservable"; +export { InjectableNopeObservable } from "./nopeObservable.injectable"; diff --git a/lib/promise/index.ts b/lib/promise/index.ts new file mode 100644 index 0000000..d6611ab --- /dev/null +++ b/lib/promise/index.ts @@ -0,0 +1,9 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:31:04 + * @modify date 2021-08-27 20:31:04 + * @desc [description] + */ +export * from "../types/nope/nopePromise.interface"; +export { NopePromise } from "./nopePromise"; diff --git a/lib/types/index.ts b/lib/types/index.ts new file mode 100644 index 0000000..5b876b0 --- /dev/null +++ b/lib/types/index.ts @@ -0,0 +1,11 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:24:15 + * @modify date 2021-08-27 20:24:15 + * @desc [description] + */ + +import * as nope from "./nope/index"; +export * from "./IJSONSchema"; +export { nope }; diff --git a/lib/types/nope/index.ts b/lib/types/nope/index.ts new file mode 100644 index 0000000..46ee252 --- /dev/null +++ b/lib/types/nope/index.ts @@ -0,0 +1,17 @@ +/** + * @author Martin Karkowski + * @email m.karkowski@zema.de + * @create date 2021-08-27 20:24:15 + * @modify date 2021-08-27 20:24:15 + * @desc [description] + */ + +export * from "./nopeCommunication.interface"; +export * from "./nopeDescriptor.interface"; +export * from "./nopeDispatcher.interface"; +export * from "./nopeModule.interface"; +export * from "./nopeObservable.interface"; +export * from "./nopePackage.interface"; +export * from "./nopePackageLoader.interface"; +export * from "./nopePromise.interface"; +export * from "./remoteInstance.interface"; diff --git a/tsconfigBackend.json b/tsconfigBackend.json index c068462..3d93805 100644 --- a/tsconfigBackend.json +++ b/tsconfigBackend.json @@ -18,11 +18,10 @@ "rootDir": "./", "stripInternal": true, "downlevelIteration": true, - "noImplicitAny": false + "noImplicitAny": false, + "declaration": true }, "include": [ - "next-env.d.ts", - "**/*.ts", "lib", "open-api", "src",