Skip to content

Commit 59a868e

Browse files
Release v1.0.0-ALPHA.14 (#16)
- [BREAKING]: Several interfaces were renamed in favor of their namespace usage - For example: `IDiscordOptions` -> `Discord.IOptions` - [BREAKING]: The `HTTP` namespace is no longer exported globally - Its internal dependencies make standalone usage impractical - If you need an HTTP client library, consider using [Axios](https://www.npmjs.com/package/axios) or Node.js built-in features - [BREAKING][discord]: The previously deprecated methods were permanently removed - `CommandManager#getGlobalCommands` - `CommandManager#getGlobalCommand` - `CommandManager#hasGlobalCommand` - [BREAKING]: `CommandManager` is now a singleton - [BREAKING]: `CommandManager` now stores commands in a native `Map` instead of a `Collection` - This is part of a generalization effort, since `Collection` is provided by `discord.js` - [FEAT]: Began the process of abstraction for common functionality - All clients now extend `IClientBase` - `CommandManager` is no longer exclusive to Discord and will be implemented for other clients soon - [FEAT]: Introduced the new `Common` namespace - Contains interfaces and utilities shared across different clients - [FIX]: Various performance improvements were made - [CHORE]: Bump dependencies
2 parents 60cb898 + 0f34719 commit 59a868e

39 files changed

+1578
-949
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## v1.0.0-ALPHA.14
4+
5+
- [BREAKING]: Several interfaces were renamed in favor of their namespace usage
6+
- For example: `IDiscordOptions` -> `Discord.IOptions`
7+
8+
- [BREAKING]: The `HTTP` namespace is no longer exported globally
9+
- Its internal dependencies make standalone usage impractical
10+
- If you need an HTTP client library, consider using [Axios](https://www.npmjs.com/package/axios) or Node.js built-in features
11+
12+
- [BREAKING][discord]: The previously deprecated methods were permanently removed
13+
- `CommandManager#getGlobalCommands`
14+
- `CommandManager#getGlobalCommand`
15+
- `CommandManager#hasGlobalCommand`
16+
17+
- [BREAKING]: `CommandManager` is now a singleton
18+
19+
- [BREAKING]: `CommandManager` now stores commands in a native `Map` instead of a `Collection`
20+
- This is part of the abstraction effort, since `Collection` is provided by `discord.js`
21+
22+
- [FEAT]: Began the process of abstraction for common functionality
23+
- All clients now extend `IClientBase`
24+
- `CommandManager` is no longer exclusive to Discord and will be implemented for other clients soon
25+
26+
- [FEAT]: Introduced the new `Common` namespace
27+
- Contains interfaces and utilities shared across different clients
28+
29+
- [FIX]: Various performance improvements were made
30+
31+
- [CHORE]: Bump dependencies
32+
333
## v1.0.0-ALPHA.13
434

535
- [REVERT]: Reverted ALPHA.12 changes;

package-lock.json

Lines changed: 1325 additions & 789 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arunabase",
3-
"version": "1.0.0-ALPHA.13",
3+
"version": "1.0.0-ALPHA.14",
44
"description": "An API made to help developers what works with discord and twitch.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
@@ -36,18 +36,17 @@
3636
"dependencies": {
3737
"@promisepending/logger.js": "^1.1.1",
3838
"@twitchapis/twitch.js": "^2.0.0-beta.7",
39-
"arunacore-api": "^1.0.0-BETA.0",
40-
"discord.js": "^14.20.0",
39+
"arunacore-api": "^1.0.0-BETA.3",
40+
"discord.js": "^14.21.0",
4141
"path-to-regexp": "^8.2.0"
4242
},
4343
"devDependencies": {
44-
"@typescript-eslint/eslint-plugin": "^8.34.1",
45-
"@typescript-eslint/parser": "^8.34.1",
46-
"eslint": "^9.29.0",
47-
"eslint-plugin-import": "^2.31.0",
44+
"@typescript-eslint/eslint-plugin": "^8.40.0",
45+
"eslint": "^9.33.0",
46+
"eslint-plugin-import": "^2.32.0",
4847
"eslint-plugin-node": "^11.1.0",
4948
"eslint-plugin-promise": "^7.2.1",
50-
"globals": "^16.2.0",
51-
"typescript": "^5.8.3"
49+
"globals": "^16.3.0",
50+
"typescript": "^5.9.2"
5251
}
5352
}

src/main/arunacore/Client.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
import { IArunaClientConfiguration } from '../interfaces';
1+
import { IConfiguration } from './interfaces';
22
import { ArunaClient } from 'arunacore-api';
3+
import { IClientBase } from '../common';
34

4-
export class ArunaCoreClient extends ArunaClient {
5-
private configuration: IArunaClientConfiguration;
5+
export class ArunaCoreClient extends ArunaClient implements IClientBase {
6+
private configuration: IConfiguration;
67

7-
constructor(options: IArunaClientConfiguration) {
8+
constructor(options: IConfiguration) {
89
if (!options.prefix) options.prefix = 'arunabase';
910

1011
super({ host: options.host, port: options.port, logger: options.logger, id: options.prefix });
1112
this.configuration = options;
1213
}
1314

14-
public getConfiguration(): IArunaClientConfiguration {
15+
public async login(secureKey?: string): Promise<unknown> {
16+
return super.connect(secureKey);
17+
}
18+
19+
public getConfiguration(): IConfiguration {
1520
return this.configuration;
1621
}
1722

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Logger } from '@promisepending/logger.js';
2+
3+
export interface IConfiguration {
4+
host: string;
5+
port: number;
6+
prefix?: string;
7+
logger?: Logger;
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './IConfiguration';

src/main/common/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './interfaces';
2+
export * from './structures';
3+
export * from './managers';
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface IClientBase {
2+
getConfiguration(): unknown;
3+
getRawClient(): unknown;
4+
login(...args: unknown[]): unknown | Promise<unknown>;
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface ICommandOptionsBase {
2+
description?: string;
3+
aliases?: string[];
4+
}

0 commit comments

Comments
 (0)