From 58b3d85da87fbe831a14980d6d7cc141914d00e1 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Wed, 12 Apr 2023 13:08:45 -0500 Subject: [PATCH] refactor: move things to core, imports not fixed yet --- src/{handler => core}/contracts/errorHandling.ts | 0 src/{handler => core}/contracts/index.ts | 0 src/{handler => core}/contracts/logging.ts | 0 src/{handler => core}/contracts/moduleManager.ts | 0 src/{handler => core}/dependencies/index.ts | 0 src/{handler => core}/dependencies/lifetimeFunctions.ts | 0 src/{handler => core}/dependencies/provider.ts | 0 src/core/index.ts | 3 +++ src/{handler => core}/module-loading/readFile.ts | 0 src/{handler => core}/plugins/args.ts | 0 src/{handler => core}/plugins/createPlugin.ts | 0 src/{handler => core}/plugins/index.ts | 0 src/{handler => core}/sernEmitter.ts | 2 +- src/{handler => core}/structures/enums.ts | 0 src/{handler => core}/structures/errors.ts | 0 src/core/structures/index.ts | 6 ++++++ src/{handler => core}/structures/moduleStore.ts | 0 src/{handler => core}/structures/wrapper.ts | 0 src/{handler => core}/utilities/functions.ts | 0 src/{handler => core}/utilities/treeSearch.ts | 0 20 files changed, 10 insertions(+), 1 deletion(-) rename src/{handler => core}/contracts/errorHandling.ts (100%) rename src/{handler => core}/contracts/index.ts (100%) rename src/{handler => core}/contracts/logging.ts (100%) rename src/{handler => core}/contracts/moduleManager.ts (100%) rename src/{handler => core}/dependencies/index.ts (100%) rename src/{handler => core}/dependencies/lifetimeFunctions.ts (100%) rename src/{handler => core}/dependencies/provider.ts (100%) create mode 100644 src/core/index.ts rename src/{handler => core}/module-loading/readFile.ts (100%) rename src/{handler => core}/plugins/args.ts (100%) rename src/{handler => core}/plugins/createPlugin.ts (100%) rename src/{handler => core}/plugins/index.ts (100%) rename src/{handler => core}/sernEmitter.ts (98%) rename src/{handler => core}/structures/enums.ts (100%) rename src/{handler => core}/structures/errors.ts (100%) create mode 100644 src/core/structures/index.ts rename src/{handler => core}/structures/moduleStore.ts (100%) rename src/{handler => core}/structures/wrapper.ts (100%) rename src/{handler => core}/utilities/functions.ts (100%) rename src/{handler => core}/utilities/treeSearch.ts (100%) diff --git a/src/handler/contracts/errorHandling.ts b/src/core/contracts/errorHandling.ts similarity index 100% rename from src/handler/contracts/errorHandling.ts rename to src/core/contracts/errorHandling.ts diff --git a/src/handler/contracts/index.ts b/src/core/contracts/index.ts similarity index 100% rename from src/handler/contracts/index.ts rename to src/core/contracts/index.ts diff --git a/src/handler/contracts/logging.ts b/src/core/contracts/logging.ts similarity index 100% rename from src/handler/contracts/logging.ts rename to src/core/contracts/logging.ts diff --git a/src/handler/contracts/moduleManager.ts b/src/core/contracts/moduleManager.ts similarity index 100% rename from src/handler/contracts/moduleManager.ts rename to src/core/contracts/moduleManager.ts diff --git a/src/handler/dependencies/index.ts b/src/core/dependencies/index.ts similarity index 100% rename from src/handler/dependencies/index.ts rename to src/core/dependencies/index.ts diff --git a/src/handler/dependencies/lifetimeFunctions.ts b/src/core/dependencies/lifetimeFunctions.ts similarity index 100% rename from src/handler/dependencies/lifetimeFunctions.ts rename to src/core/dependencies/lifetimeFunctions.ts diff --git a/src/handler/dependencies/provider.ts b/src/core/dependencies/provider.ts similarity index 100% rename from src/handler/dependencies/provider.ts rename to src/core/dependencies/provider.ts diff --git a/src/core/index.ts b/src/core/index.ts new file mode 100644 index 0000000..1827b49 --- /dev/null +++ b/src/core/index.ts @@ -0,0 +1,3 @@ +import SernEmitter from './sernEmitter' + +export { SernEmitter }; diff --git a/src/handler/module-loading/readFile.ts b/src/core/module-loading/readFile.ts similarity index 100% rename from src/handler/module-loading/readFile.ts rename to src/core/module-loading/readFile.ts diff --git a/src/handler/plugins/args.ts b/src/core/plugins/args.ts similarity index 100% rename from src/handler/plugins/args.ts rename to src/core/plugins/args.ts diff --git a/src/handler/plugins/createPlugin.ts b/src/core/plugins/createPlugin.ts similarity index 100% rename from src/handler/plugins/createPlugin.ts rename to src/core/plugins/createPlugin.ts diff --git a/src/handler/plugins/index.ts b/src/core/plugins/index.ts similarity index 100% rename from src/handler/plugins/index.ts rename to src/core/plugins/index.ts diff --git a/src/handler/sernEmitter.ts b/src/core/sernEmitter.ts similarity index 98% rename from src/handler/sernEmitter.ts rename to src/core/sernEmitter.ts index 82d6077..7ab0035 100644 --- a/src/handler/sernEmitter.ts +++ b/src/core/sernEmitter.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events'; import type { Payload, SernEventsMapping } from '../types/handler'; -import { PayloadType } from './structures'; +import { PayloadType } from '../handler/structures'; import type { Module } from '../types/module'; /** diff --git a/src/handler/structures/enums.ts b/src/core/structures/enums.ts similarity index 100% rename from src/handler/structures/enums.ts rename to src/core/structures/enums.ts diff --git a/src/handler/structures/errors.ts b/src/core/structures/errors.ts similarity index 100% rename from src/handler/structures/errors.ts rename to src/core/structures/errors.ts diff --git a/src/core/structures/index.ts b/src/core/structures/index.ts new file mode 100644 index 0000000..917094c --- /dev/null +++ b/src/core/structures/index.ts @@ -0,0 +1,6 @@ +import Context from './context'; +import type Wrapper from './wrapper'; +import { ModuleStore } from './moduleStore'; +export * from './errors'; +export * from './enums'; +export { Context, Wrapper, ModuleStore }; diff --git a/src/handler/structures/moduleStore.ts b/src/core/structures/moduleStore.ts similarity index 100% rename from src/handler/structures/moduleStore.ts rename to src/core/structures/moduleStore.ts diff --git a/src/handler/structures/wrapper.ts b/src/core/structures/wrapper.ts similarity index 100% rename from src/handler/structures/wrapper.ts rename to src/core/structures/wrapper.ts diff --git a/src/handler/utilities/functions.ts b/src/core/utilities/functions.ts similarity index 100% rename from src/handler/utilities/functions.ts rename to src/core/utilities/functions.ts diff --git a/src/handler/utilities/treeSearch.ts b/src/core/utilities/treeSearch.ts similarity index 100% rename from src/handler/utilities/treeSearch.ts rename to src/core/utilities/treeSearch.ts