@open-discord-bots/framework 0.0.7 → 0.1.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/api/modules/console.d.ts +3 -1
- package/dist/api/modules/console.js +9 -4
- package/dist/cli/editConfig.d.ts +2 -2
- package/dist/cli/editConfig.js +146 -112
- package/dist/cli/{cli.d.ts → index.d.ts} +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -37
- package/dist/startup/compilation.d.ts +1 -1
- package/dist/startup/dump.d.ts +1 -1
- package/dist/startup/dump.js +2 -2
- package/dist/startup/errorHandling.d.ts +1 -1
- package/dist/startup/errorHandling.js +35 -2
- package/dist/startup/pluginLauncher.d.ts +1 -1
- package/dist/startup/pluginLauncher.js +61 -28
- package/dist/{api/utils.d.ts → utilities/index.d.ts} +1 -1
- package/dist/{api/utils.js → utilities/index.js} +1 -1
- package/package.json +6 -1
- package/src/api/modules/console.ts +8 -4
- package/src/cli/editConfig.ts +3 -2
- package/src/cli/{cli.ts → index.ts} +2 -1
- package/src/index.ts +0 -4
- package/src/startup/compilation.ts +1 -1
- package/src/startup/dump.ts +2 -1
- package/src/startup/errorHandling.ts +2 -1
- package/src/startup/pluginLauncher.ts +2 -1
- package/src/{api/utils.ts → utilities/index.ts} +1 -1
- /package/dist/api/{api.d.ts → index.d.ts} +0 -0
- /package/dist/api/{api.js → index.js} +0 -0
- /package/dist/cli/{cli.js → index.js} +0 -0
- /package/src/api/{api.ts → index.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * as api from "./api/api";
|
|
2
|
-
export * as utilities from "./api/utils";
|
|
3
|
-
export * as cli from "./cli/cli";
|
|
4
1
|
export { loadDumpCommand } from "./startup/dump";
|
|
5
2
|
export { loadAllPlugins } from "./startup/pluginLauncher";
|
|
6
3
|
export { frameworkStartup } from "./startup/compilation";
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.frameworkStartup = exports.loadAllPlugins = exports.loadDumpCommand =
|
|
37
|
-
exports.api = __importStar(require("./api/api"));
|
|
38
|
-
exports.utilities = __importStar(require("./api/utils"));
|
|
39
|
-
exports.cli = __importStar(require("./cli/cli"));
|
|
3
|
+
exports.frameworkStartup = exports.loadAllPlugins = exports.loadDumpCommand = void 0;
|
|
40
4
|
var dump_1 = require("./startup/dump");
|
|
41
5
|
Object.defineProperty(exports, "loadDumpCommand", { enumerable: true, get: function () { return dump_1.loadDumpCommand; } });
|
|
42
6
|
var pluginLauncher_1 = require("./startup/pluginLauncher");
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ODProjectType } from "../api
|
|
1
|
+
import type { ODProjectType } from "../api";
|
|
2
2
|
export declare function checkFrameworkAllowed(project?: ODProjectType): void;
|
|
3
3
|
export declare function frameworkStartup(startupFlags: string[], project: ODProjectType, startCallback: () => void): void;
|
package/dist/startup/dump.d.ts
CHANGED
package/dist/startup/dump.js
CHANGED
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.loadDumpCommand = void 0;
|
|
37
|
-
const
|
|
37
|
+
const api = __importStar(require("../api/index"));
|
|
38
38
|
const discord = __importStar(require("discord.js"));
|
|
39
39
|
const fs = __importStar(require("fs"));
|
|
40
40
|
/** ### What is this?
|
|
@@ -52,7 +52,7 @@ const fs = __importStar(require("fs"));
|
|
|
52
52
|
const loadDumpCommand = (opendiscord) => {
|
|
53
53
|
if (!opendiscord.sharedFuses.getFuse("allowDumpCommand"))
|
|
54
54
|
return;
|
|
55
|
-
opendiscord.client.textCommands.add(new
|
|
55
|
+
opendiscord.client.textCommands.add(new api.ODTextCommand("opendiscord:dump", {
|
|
56
56
|
allowBots: false,
|
|
57
57
|
guildPermission: true,
|
|
58
58
|
dmPermission: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from "../api/index";
|
|
2
2
|
export declare function loadErrorHandling(opendiscord: api.ODMain, project: api.ODProjectType): void;
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.loadErrorHandling = loadErrorHandling;
|
|
4
|
-
const
|
|
37
|
+
const api = __importStar(require("../api/index"));
|
|
5
38
|
function loadErrorHandling(opendiscord, project) {
|
|
6
39
|
process.on("uncaughtException", async (error, origin) => {
|
|
7
40
|
try {
|
|
@@ -26,7 +59,7 @@ function loadErrorHandling(opendiscord, project) {
|
|
|
26
59
|
}
|
|
27
60
|
else {
|
|
28
61
|
//unknown error
|
|
29
|
-
const errmsg = new
|
|
62
|
+
const errmsg = new api.ODError(error, origin);
|
|
30
63
|
opendiscord.log(errmsg);
|
|
31
64
|
if (opendiscord.sharedFuses.getFuse("crashOnError"))
|
|
32
65
|
process.exit(1);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from "../api/index";
|
|
2
2
|
export declare const loadAllPlugins: (opendiscord: api.ODMain) => Promise<void>;
|
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.loadAllPlugins = void 0;
|
|
7
|
-
const
|
|
40
|
+
const api = __importStar(require("../api/index"));
|
|
8
41
|
const fs_1 = __importDefault(require("fs"));
|
|
9
42
|
const loadAllPlugins = async (opendiscord) => {
|
|
10
43
|
//start launching plugins
|
|
@@ -36,64 +69,64 @@ const loadAllPlugins = async (opendiscord) => {
|
|
|
36
69
|
try {
|
|
37
70
|
const rawplugindata = JSON.parse(fs_1.default.readFileSync("./plugins/" + p + "/plugin.json").toString());
|
|
38
71
|
if (typeof rawplugindata != "object")
|
|
39
|
-
throw new
|
|
72
|
+
throw new api.ODPluginError("Failed to load plugin.json");
|
|
40
73
|
if (typeof rawplugindata.id != "string")
|
|
41
|
-
throw new
|
|
74
|
+
throw new api.ODPluginError("Failed to load plugin.json/id");
|
|
42
75
|
if (typeof rawplugindata.name != "string")
|
|
43
|
-
throw new
|
|
76
|
+
throw new api.ODPluginError("Failed to load plugin.json/name");
|
|
44
77
|
if (typeof rawplugindata.version != "string")
|
|
45
|
-
throw new
|
|
78
|
+
throw new api.ODPluginError("Failed to load plugin.json/version");
|
|
46
79
|
if (typeof rawplugindata.startFile != "string")
|
|
47
|
-
throw new
|
|
80
|
+
throw new api.ODPluginError("Failed to load plugin.json/startFile");
|
|
48
81
|
//only check "supportedVersions" if it exists (should be array)
|
|
49
82
|
if (rawplugindata.supportedVersions) {
|
|
50
83
|
if (!Array.isArray(rawplugindata.supportedVersions))
|
|
51
|
-
throw new
|
|
84
|
+
throw new api.ODPluginError("Failed to load plugin.json/supportedVersions (must be array)");
|
|
52
85
|
for (const version of rawplugindata.supportedVersions) {
|
|
53
86
|
if (typeof version !== "string") {
|
|
54
|
-
throw new
|
|
87
|
+
throw new api.ODPluginError("Failed to load plugin.json/supportedVersions (all items must be strings)");
|
|
55
88
|
}
|
|
56
89
|
//only OT (Open Ticket) & OM (Open Moderation) are supported at the moment
|
|
57
90
|
if (!pluginVersionRegex.test(version)) {
|
|
58
|
-
throw new
|
|
91
|
+
throw new api.ODPluginError(`Failed to load plugin.json/supportedVersions (invalid format: "${version}", expected format like "OTv4.0.x" or "OMv1.0.0")`);
|
|
59
92
|
}
|
|
60
93
|
}
|
|
61
94
|
}
|
|
62
95
|
if (typeof rawplugindata.enabled != "boolean")
|
|
63
|
-
throw new
|
|
96
|
+
throw new api.ODPluginError("Failed to load plugin.json/enabled");
|
|
64
97
|
if (typeof rawplugindata.priority != "number")
|
|
65
|
-
throw new
|
|
98
|
+
throw new api.ODPluginError("Failed to load plugin.json/priority");
|
|
66
99
|
if (!Array.isArray(rawplugindata.events))
|
|
67
|
-
throw new
|
|
100
|
+
throw new api.ODPluginError("Failed to load plugin.json/events");
|
|
68
101
|
if (!Array.isArray(rawplugindata.npmDependencies))
|
|
69
|
-
throw new
|
|
102
|
+
throw new api.ODPluginError("Failed to load plugin.json/npmDependencies");
|
|
70
103
|
if (!Array.isArray(rawplugindata.requiredPlugins))
|
|
71
|
-
throw new
|
|
104
|
+
throw new api.ODPluginError("Failed to load plugin.json/requiredPlugins");
|
|
72
105
|
if (!Array.isArray(rawplugindata.incompatiblePlugins))
|
|
73
|
-
throw new
|
|
106
|
+
throw new api.ODPluginError("Failed to load plugin.json/incompatiblePlugins");
|
|
74
107
|
if (typeof rawplugindata.details != "object")
|
|
75
|
-
throw new
|
|
108
|
+
throw new api.ODPluginError("Failed to load plugin.json/details");
|
|
76
109
|
if (typeof rawplugindata.details.author != "string")
|
|
77
|
-
throw new
|
|
110
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/author");
|
|
78
111
|
//only check "contributors" if it exists (should be array)
|
|
79
112
|
if (rawplugindata.details.contributors && !Array.isArray(rawplugindata.details.contributors))
|
|
80
|
-
throw new
|
|
113
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/contributors (must be array)");
|
|
81
114
|
if (typeof rawplugindata.details.shortDescription != "string")
|
|
82
|
-
throw new
|
|
115
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/shortDescription");
|
|
83
116
|
if (typeof rawplugindata.details.longDescription != "string")
|
|
84
|
-
throw new
|
|
117
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/longDescription");
|
|
85
118
|
if (typeof rawplugindata.details.imageUrl != "string")
|
|
86
|
-
throw new
|
|
119
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/imageUrl");
|
|
87
120
|
if (typeof rawplugindata.details.projectUrl != "string")
|
|
88
|
-
throw new
|
|
121
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/projectUrl");
|
|
89
122
|
if (!Array.isArray(rawplugindata.details.tags))
|
|
90
|
-
throw new
|
|
123
|
+
throw new api.ODPluginError("Failed to load plugin.json/details/tags");
|
|
91
124
|
if (rawplugindata.id != p)
|
|
92
|
-
throw new
|
|
125
|
+
throw new api.ODPluginError("Failed to load plugin, directory name is required to match the id");
|
|
93
126
|
if (opendiscord.plugins.exists(rawplugindata.id))
|
|
94
|
-
throw new
|
|
127
|
+
throw new api.ODPluginError("Failed to load plugin, this id already exists in another plugin");
|
|
95
128
|
//plugin.json is valid => load plugin
|
|
96
|
-
const plugin = new
|
|
129
|
+
const plugin = new api.ODPlugin(p, rawplugindata);
|
|
97
130
|
opendiscord.plugins.add(plugin);
|
|
98
131
|
}
|
|
99
132
|
catch (e) {
|
|
@@ -134,7 +167,7 @@ const loadAllPlugins = async (opendiscord) => {
|
|
|
134
167
|
if (plugin.data.supportedVersions && plugin.data.supportedVersions.length > 0) {
|
|
135
168
|
const currentVersion = opendiscord.versions.get("opendiscord:version");
|
|
136
169
|
if (!currentVersion)
|
|
137
|
-
throw new
|
|
170
|
+
throw new api.ODSystemError("Unable to get project version: opendiscord.versions.get('opendiscord:version')!");
|
|
138
171
|
let isCompatible = false;
|
|
139
172
|
for (const versionStr of plugin.data.supportedVersions) {
|
|
140
173
|
const match = versionStr.match(pluginVersionRegex);
|
|
@@ -231,7 +264,7 @@ const loadAllPlugins = async (opendiscord) => {
|
|
|
231
264
|
//preload all events required for every plugin
|
|
232
265
|
for (const plugin of sortedPlugins) {
|
|
233
266
|
if (plugin.enabled)
|
|
234
|
-
plugin.data.events.forEach((event) => opendiscord.events.add(new
|
|
267
|
+
plugin.data.events.forEach((event) => opendiscord.events.add(new api.ODEvent(event)));
|
|
235
268
|
}
|
|
236
269
|
//execute all working plugins
|
|
237
270
|
for (const plugin of sortedPlugins) {
|
|
@@ -51,7 +51,7 @@ exports.ordinalNumber = ordinalNumber;
|
|
|
51
51
|
exports.trimEmojis = trimEmojis;
|
|
52
52
|
const fs = __importStar(require("fs"));
|
|
53
53
|
const ansis_1 = __importDefault(require("ansis"));
|
|
54
|
-
const api = __importStar(require("
|
|
54
|
+
const api = __importStar(require("../api/index"));
|
|
55
55
|
/**## sharedFuses `utility variable`
|
|
56
56
|
* All shared fuses from Open Discord. Please use `opendiscord.sharedFuses` instead!
|
|
57
57
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-discord-bots/framework",
|
|
3
3
|
"author": "DJj123dj",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -25,5 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": "./dist/index.js",
|
|
31
|
+
"./api": "./dist/api/index.js",
|
|
32
|
+
"./utilities": "./dist/utilities/index.js"
|
|
28
33
|
}
|
|
29
34
|
}
|
|
@@ -592,16 +592,16 @@ export class ODLiveStatusManager extends ODManager<ODLiveStatusSource> {
|
|
|
592
592
|
/**The class responsible for rendering the livestatus messages. */
|
|
593
593
|
renderer: ODLiveStatusRenderer
|
|
594
594
|
/**A reference to the ODMain or "opendiscord" global variable */
|
|
595
|
-
#main: ODMain
|
|
595
|
+
#main: ODMain|null = null
|
|
596
596
|
|
|
597
|
-
constructor(debug:ODDebugger,
|
|
597
|
+
constructor(debug:ODDebugger,console:ODConsoleManager){
|
|
598
598
|
super(debug,"livestatus source")
|
|
599
|
-
this.renderer = new ODLiveStatusRenderer(
|
|
600
|
-
this.#main = main
|
|
599
|
+
this.renderer = new ODLiveStatusRenderer(console)
|
|
601
600
|
}
|
|
602
601
|
|
|
603
602
|
/**Get the messages from all sources combined! */
|
|
604
603
|
async getAllMessages(): Promise<ODLiveStatusSourceData[]> {
|
|
604
|
+
if (!this.#main) throw new ODSystemError("ODLiveStatusManager:getAllMessages() --> Unable to get messages, 'opendiscord/ODMain' has not been connected!")
|
|
605
605
|
const messages: ODLiveStatusSourceData[] = []
|
|
606
606
|
for (const source of this.getAll()){
|
|
607
607
|
try {
|
|
@@ -610,6 +610,10 @@ export class ODLiveStatusManager extends ODManager<ODLiveStatusSource> {
|
|
|
610
610
|
}
|
|
611
611
|
return messages
|
|
612
612
|
}
|
|
613
|
+
/**Set the opendiscord `ODMain` class to use for fetching message filters. */
|
|
614
|
+
useMain(main:ODMain){
|
|
615
|
+
this.#main = main
|
|
616
|
+
}
|
|
613
617
|
}
|
|
614
618
|
|
|
615
619
|
/**## ODLiveStatusRenderer `class`
|
package/src/cli/editConfig.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from "../api/index"
|
|
2
|
+
import * as utilities from "../utilities/index"
|
|
2
3
|
import {Terminal, terminal} from "terminal-kit"
|
|
3
4
|
import ansis from "ansis"
|
|
4
|
-
import {ODCliHeaderOpts, renderHeader} from "
|
|
5
|
+
import {ODCliHeaderOpts, renderHeader} from "."
|
|
5
6
|
|
|
6
7
|
export class ODCliEditConfigInstance {
|
|
7
8
|
private readonly opts: ODCliHeaderOpts
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export * as api from "./api/api"
|
|
3
|
-
export * as utilities from "./api/utils"
|
|
4
|
-
export * as cli from "./cli/cli"
|
|
5
1
|
export { loadDumpCommand } from "./startup/dump"
|
|
6
2
|
export { loadAllPlugins } from "./startup/pluginLauncher"
|
|
7
3
|
export { frameworkStartup } from "./startup/compilation"
|
|
@@ -3,7 +3,7 @@ import ts from "typescript"
|
|
|
3
3
|
import { createHash, Hash } from "crypto"
|
|
4
4
|
import nodepath from "path"
|
|
5
5
|
import ansis from "ansis"
|
|
6
|
-
import type { ODProjectType } from "../api
|
|
6
|
+
import type { ODProjectType } from "../api"
|
|
7
7
|
|
|
8
8
|
/** ## What is this?
|
|
9
9
|
* This is a function which compares `./src/` with a hash stored in `./dist/hash.txt`.
|
package/src/startup/dump.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from "../api/index"
|
|
2
|
+
import * as utilities from "../utilities/index"
|
|
2
3
|
|
|
3
4
|
export function loadErrorHandling(opendiscord:api.ODMain,project:api.ODProjectType){
|
|
4
5
|
process.on("uncaughtException",async (error,origin) => {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|