@zenflux/core 0.0.0-abc.8 → 0.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/zenflux-core.js +307 -304
- package/dist/es/src/globals.d.ts +0 -12
- package/dist/es/src/index.d.ts +1 -2
- package/dist/es/src/initializer.d.ts +6 -7
- package/dist/es/src/interfaces/managers.d.ts +13 -0
- package/dist/es/src/manager-bases/commands.d.ts +2 -1
- package/dist/es/src/manager-bases/controllers.d.ts +2 -1
- package/dist/es/src/managers/index.d.ts +6 -4
- package/dist/es/zenflux-core.js +303 -300
- package/dist/es/zenflux-core.mjs +3 -3
- package/dist/umd/zenflux-core.js +3 -3
- package/package.json +1 -1
- package/src/command-bases/command-data.ts +4 -2
- package/src/core/controller.ts +5 -3
- package/src/initializer.ts +3 -6
- package/src/interfaces/managers.ts +16 -0
- package/src/manager-bases/commands.ts +3 -1
- package/src/manager-bases/controllers.ts +2 -1
- package/src/managers/index.ts +25 -24
- package/src/globals.ts +0 -22
package/dist/es/src/globals.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import Commands from "./manager-bases/commands";
|
|
2
|
-
import Controllers from "./manager-bases/controllers";
|
|
3
|
-
import Data from "./manager-bases/data";
|
|
4
|
-
import Internal from "./manager-bases/internal";
|
|
5
1
|
declare global {
|
|
6
2
|
var ZenCore: any;
|
|
7
3
|
}
|
|
8
|
-
declare global {
|
|
9
|
-
var __ZEN_MANAGERS__: {
|
|
10
|
-
commands: Commands;
|
|
11
|
-
controllers: Controllers;
|
|
12
|
-
data: Data;
|
|
13
|
-
internal: Internal;
|
|
14
|
-
};
|
|
15
|
-
}
|
package/dist/es/src/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './globals';
|
|
2
2
|
import { IAPIConfig } from "./interfaces/config";
|
|
3
|
+
import * as exported from './exports';
|
|
4
|
+
declare global {
|
|
5
|
+
var ZenCore: any;
|
|
6
|
+
}
|
|
3
7
|
export declare let config: IAPIConfig;
|
|
4
8
|
export declare const CoreAPI: {
|
|
5
|
-
managers: {
|
|
6
|
-
commands: exported.managerBases.Commands;
|
|
7
|
-
controllers: exported.managerBases.Controllers;
|
|
8
|
-
data: exported.managerBases.Data;
|
|
9
|
-
internal: exported.managerBases.Internal;
|
|
10
|
-
} | undefined;
|
|
11
9
|
commandBases: typeof exported.commandBases;
|
|
12
10
|
core: typeof exported.core;
|
|
13
11
|
errors: typeof exported.errors;
|
|
12
|
+
managers: typeof exported.managers;
|
|
14
13
|
managerBases: typeof exported.managerBases;
|
|
15
14
|
modules: typeof exported.modules;
|
|
16
15
|
utils: typeof exported.utils;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Commands from "../manager-bases/commands";
|
|
2
|
+
import Controllers from "../manager-bases/controllers";
|
|
3
|
+
import Data from "../manager-bases/data";
|
|
4
|
+
import Internal from "../manager-bases/internal";
|
|
5
|
+
import { IAPIConfig } from "./config";
|
|
6
|
+
export interface IManagers {
|
|
7
|
+
initialize: (config: IAPIConfig) => void;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
commands: Commands;
|
|
10
|
+
controllers: Controllers;
|
|
11
|
+
data: Data;
|
|
12
|
+
internal: Internal;
|
|
13
|
+
}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Logger } from "../modules/";
|
|
6
6
|
import { CommandBase } from "../command-bases";
|
|
7
|
-
import
|
|
7
|
+
import ObjectBase from "../core/object-base";
|
|
8
|
+
import Controller from "../core/controller";
|
|
8
9
|
import { ICommandArgsInterface, CommandCallbackType, IOnHookAffectInterface, IOnHookInterface } from "../interfaces/commands";
|
|
9
10
|
export declare class Commands extends ObjectBase {
|
|
10
11
|
static readonly trace: string[];
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @author: Leonid Vinikov <leonidvinikov@gmail.com>
|
|
3
3
|
* @description: Responsible for manging controllers, each controller is global singleton instance.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import ObjectBase from "../core/object-base";
|
|
6
|
+
import Controller from "../core/controller";
|
|
6
7
|
export declare class Controllers extends ObjectBase {
|
|
7
8
|
controllers: {
|
|
8
9
|
[key: string]: Controller;
|
|
@@ -6,9 +6,11 @@ import Controllers from "../manager-bases/controllers";
|
|
|
6
6
|
import Data from "../manager-bases/data";
|
|
7
7
|
import Internal from "../manager-bases/internal";
|
|
8
8
|
import { IAPIConfig } from "../interfaces/config";
|
|
9
|
+
import '../globals';
|
|
10
|
+
export declare const afterInitializeCallbacks: (() => void)[];
|
|
9
11
|
export declare function initialize(config: IAPIConfig): void;
|
|
10
12
|
export declare function destroy(): void;
|
|
11
|
-
export declare
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
13
|
+
export declare var commands: Commands;
|
|
14
|
+
export declare var controllers: Controllers;
|
|
15
|
+
export declare var data: Data;
|
|
16
|
+
export declare var internal: Internal;
|