-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
81 lines (67 loc) · 1.76 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/// <reference types="node" />
/// <reference types="@types/node" />
/// <reference types="@types/es6-shim" />
/// <reference types="@slimio/addon" />
/// <reference types="@slimio/config" />
/// <reference types="@slimio/logger" />
import * as Addon from "@slimio/addon";
declare class Core {
constructor(dirname: string, options?: Core.ConstructorOptions);
// Properties
root: string;
addons: Map<string, Addon>;
config: Config<Core.AddonsCFG>;
silent: boolean;
readonly isStarted: boolean;
private hasBeenStarted: boolean;
private logger: Logger;
static DEFAULT_CONFIGURATION: Core.CFG;
static DEFAULT_SCHEMA: object;
// Methods
private setupAddonListener(addon: Addon): Promise<Addon>;
private setupAddonConfiguration(addonName: string, newConfig: Core.AddonsCFG): void;
searchForLockedAddons(addonName: string): IterableIterator<string>;
start(): Promise<this>;
stop(): Promise<this>;
}
/**
* Core namespace
*/
declare namespace Core {
interface IPCChannels {
event: (data: string) => void;
}
interface CallbackGetInfo {
uid: string;
name: string;
started: boolean;
callbacks: string[];
flags: string[];
}
interface ConstructorOptions {
autoReload?: number;
silent?: boolean;
toml?: boolean;
}
/**
* Addons configuration
*/
interface AddonsCFG {
[key: string]: {
active: boolean;
standalone?: boolean;
isolate?: boolean;
}
}
/**
* Agent CFG Interface!
*/
interface CFG {
hostname: string;
platform: string;
release: string;
addons: AddonsCFG;
}
}
export as namespace Core;
export = Core;