@buape/carbon 0.6.0 → 0.7.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/package.json +6 -6
- package/dist/src/abstracts/BaseCommand.d.ts +6 -3
- package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
- package/dist/src/abstracts/BaseCommand.js +17 -4
- package/dist/src/abstracts/BaseCommand.js.map +1 -1
- package/dist/src/abstracts/Plugin.d.ts +32 -1
- package/dist/src/abstracts/Plugin.d.ts.map +1 -1
- package/dist/src/abstracts/Plugin.js +3 -1
- package/dist/src/abstracts/Plugin.js.map +1 -1
- package/dist/src/adapters/bun/index.d.ts +8 -12
- package/dist/src/adapters/bun/index.d.ts.map +1 -1
- package/dist/src/adapters/bun/index.js +9 -13
- package/dist/src/adapters/bun/index.js.map +1 -1
- package/dist/src/adapters/fetch/index.d.ts +10 -0
- package/dist/src/adapters/fetch/index.d.ts.map +1 -0
- package/dist/src/adapters/fetch/index.js +45 -0
- package/dist/src/adapters/fetch/index.js.map +1 -0
- package/dist/src/adapters/node/index.d.ts +8 -12
- package/dist/src/adapters/node/index.d.ts.map +1 -1
- package/dist/src/adapters/node/index.js +10 -13
- package/dist/src/adapters/node/index.js.map +1 -1
- package/dist/src/classes/Client.d.ts +43 -13
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +63 -17
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/classes/Listener.d.ts +8 -0
- package/dist/src/classes/Listener.d.ts.map +1 -0
- package/dist/src/classes/Listener.js +3 -0
- package/dist/src/classes/Listener.js.map +1 -0
- package/dist/src/createHandle.js +1 -1
- package/dist/src/createHandle.js.map +1 -1
- package/dist/src/index.d.ts +57 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/internals/EventHandler.d.ts +9 -0
- package/dist/src/internals/EventHandler.d.ts.map +1 -0
- package/dist/src/internals/EventHandler.js +16 -0
- package/dist/src/internals/EventHandler.js.map +1 -0
- package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +31 -23
- package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -1
- package/dist/src/plugins/linked-roles/LinkedRoles.js +41 -27
- package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -1
- package/dist/src/types/messagePayload.d.ts +37 -0
- package/dist/src/types/messagePayload.d.ts.map +1 -0
- package/dist/src/types/messagePayload.js +2 -0
- package/dist/src/types/messagePayload.js.map +1 -0
- package/dist/src/types.d.ts +2 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +1 -0
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buape/carbon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
6
|
"repository": "github:buape/carbon",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@buape/carbon-request": "workspace:*",
|
|
29
|
-
"@types/node": "^
|
|
30
|
-
"discord-api-types": "0.37.
|
|
29
|
+
"@types/node": "^22.10.7",
|
|
30
|
+
"discord-api-types": "0.37.117"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@cloudflare/workers-types": "4.
|
|
34
|
-
"@hono/node-server": "1.13.
|
|
35
|
-
"@types/bun": "1.1.
|
|
33
|
+
"@cloudflare/workers-types": "4.20250121.0",
|
|
34
|
+
"@hono/node-server": "1.13.7",
|
|
35
|
+
"@types/bun": "1.1.18"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApplicationCommandType, type RESTPostAPIApplicationCommandsJSONBody } from "discord-api-types/v10";
|
|
2
|
-
import { ApplicationIntegrationType, type BaseComponent, InteractionContextType, type Modal } from "../index.js";
|
|
2
|
+
import { ApplicationIntegrationType, type ArrayOrSingle, type BaseComponent, InteractionContextType, type Modal, type Permission } from "../index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Represents the base data of a command that the user creates
|
|
5
5
|
*/
|
|
@@ -26,14 +26,17 @@ export declare abstract class BaseCommand {
|
|
|
26
26
|
abstract type: ApplicationCommandType;
|
|
27
27
|
/**
|
|
28
28
|
* The places this command can be used in
|
|
29
|
-
* @beta API types are not finalized
|
|
30
29
|
*/
|
|
31
30
|
integrationTypes: ApplicationIntegrationType[];
|
|
32
31
|
/**
|
|
33
32
|
* The contexts this command can be used in
|
|
34
|
-
* @beta API types are not finalized
|
|
35
33
|
*/
|
|
36
34
|
contexts: InteractionContextType[];
|
|
35
|
+
/**
|
|
36
|
+
* The default permission that a user needs to have to use this command.
|
|
37
|
+
* This can be overridden by server admins.
|
|
38
|
+
*/
|
|
39
|
+
permission?: ArrayOrSingle<(typeof Permission)[keyof typeof Permission]>;
|
|
37
40
|
/**
|
|
38
41
|
* The components that the command is able to use.
|
|
39
42
|
* You pass these here so the handler can listen for them..
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCommand.d.ts","sourceRoot":"","sources":["../../../src/abstracts/BaseCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,sBAAsB,EACtB,KAAK,sCAAsC,EAC3C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACN,0BAA0B,EAC1B,KAAK,aAAa,EAClB,sBAAsB,EACtB,KAAK,KAAK,EACV,MAAM,aAAa,CAAA;AAEpB;;GAEG;AACH,8BAAsB,WAAW;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,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,7 +14,6 @@ export class BaseCommand {
|
|
|
14
14
|
ephemeral = false;
|
|
15
15
|
/**
|
|
16
16
|
* The places this command can be used in
|
|
17
|
-
* @beta API types are not finalized
|
|
18
17
|
*/
|
|
19
18
|
integrationTypes = [
|
|
20
19
|
ApplicationIntegrationType.GuildInstall,
|
|
@@ -22,13 +21,17 @@ export class BaseCommand {
|
|
|
22
21
|
];
|
|
23
22
|
/**
|
|
24
23
|
* The contexts this command can be used in
|
|
25
|
-
* @beta API types are not finalized
|
|
26
24
|
*/
|
|
27
25
|
contexts = [
|
|
28
26
|
InteractionContextType.Guild,
|
|
29
27
|
InteractionContextType.BotDM,
|
|
30
28
|
InteractionContextType.PrivateChannel
|
|
31
29
|
];
|
|
30
|
+
/**
|
|
31
|
+
* The default permission that a user needs to have to use this command.
|
|
32
|
+
* This can be overridden by server admins.
|
|
33
|
+
*/
|
|
34
|
+
permission;
|
|
32
35
|
/**
|
|
33
36
|
* The components that the command is able to use.
|
|
34
37
|
* You pass these here so the handler can listen for them..
|
|
@@ -55,7 +58,12 @@ export class BaseCommand {
|
|
|
55
58
|
description: this.description,
|
|
56
59
|
options: this.serializeOptions(),
|
|
57
60
|
integration_types: this.integrationTypes,
|
|
58
|
-
contexts: this.contexts
|
|
61
|
+
contexts: this.contexts,
|
|
62
|
+
default_member_permissions: Array.isArray(this.permission)
|
|
63
|
+
? this.permission.reduce((a, p) => a | p, 0n).toString()
|
|
64
|
+
: this.permission
|
|
65
|
+
? `${this.permission}`
|
|
66
|
+
: null
|
|
59
67
|
};
|
|
60
68
|
return data;
|
|
61
69
|
}
|
|
@@ -64,7 +72,12 @@ export class BaseCommand {
|
|
|
64
72
|
type: this.type,
|
|
65
73
|
options: this.serializeOptions(),
|
|
66
74
|
integration_types: this.integrationTypes,
|
|
67
|
-
contexts: this.contexts
|
|
75
|
+
contexts: this.contexts,
|
|
76
|
+
default_member_permissions: Array.isArray(this.permission)
|
|
77
|
+
? this.permission.reduce((a, p) => a | p, 0n).toString()
|
|
78
|
+
: this.permission
|
|
79
|
+
? `${this.permission}`
|
|
80
|
+
: null
|
|
68
81
|
};
|
|
69
82
|
return data;
|
|
70
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCommand.js","sourceRoot":"","sources":["../../../src/abstracts/BaseCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,sBAAsB,EAEtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACN,0BAA0B,
|
|
1
|
+
{"version":3,"file":"BaseCommand.js","sourceRoot":"","sources":["../../../src/abstracts/BaseCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,sBAAsB,EAEtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACN,0BAA0B,EAG1B,sBAAsB,EAGtB,MAAM,aAAa,CAAA;AAEpB;;GAEG;AACH,MAAM,OAAgB,WAAW;IAShC;;OAEG;IACH,KAAK,GAAG,KAAK,CAAA;IACb;;OAEG;IACH,SAAS,GAAG,KAAK,CAAA;IAKjB;;OAEG;IACH,gBAAgB,GAAiC;QAChD,0BAA0B,CAAC,YAAY;QACvC,0BAA0B,CAAC,WAAW;KACtC,CAAA;IACD;;OAEG;IACH,QAAQ,GAA6B;QACpC,sBAAsB,CAAC,KAAK;QAC5B,sBAAsB,CAAC,KAAK;QAC5B,sBAAsB,CAAC,cAAc;KACrC,CAAA;IAED;;;OAGG;IACH,UAAU,CAA8D;IAExE;;;OAGG;IACH,UAAU,GAAgC,EAAE,CAAA;IAE5C;;;OAGG;IACH,MAAM,GAAwB,EAAE,CAAA;IAEhC;;;OAGG;IACH,SAAS;QACR,IAAI,IAAI,CAAC,IAAI,KAAK,sBAAsB,CAAC,iBAAiB,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACrE,CAAC;QACD,iDAAiD;QACjD,IAAI,IAAI,CAAC,IAAI,KAAK,sBAAsB,CAAC,SAAS,EAAE,CAAC;YACpD,MAAM,IA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}
|
|
@@ -1,11 +1,42 @@
|
|
|
1
|
+
import type { Client } from "../classes/Client.js";
|
|
2
|
+
/**
|
|
3
|
+
* The base class for all plugins
|
|
4
|
+
*/
|
|
1
5
|
export declare abstract class Plugin {
|
|
2
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Registers the client with this plugin
|
|
8
|
+
* @param client The client to register
|
|
9
|
+
*/
|
|
10
|
+
registerClient?(client: Client): void;
|
|
11
|
+
/**
|
|
12
|
+
* Registers the routes of this plugin with the client
|
|
13
|
+
* @param client The client to register the routes with
|
|
14
|
+
*/
|
|
15
|
+
registerRoutes?(client: Client): void;
|
|
3
16
|
}
|
|
4
17
|
export interface Route {
|
|
18
|
+
/**
|
|
19
|
+
* The HTTP method of the route
|
|
20
|
+
*/
|
|
5
21
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
22
|
+
/**
|
|
23
|
+
* The relative path of the route
|
|
24
|
+
*/
|
|
6
25
|
path: `/${string}`;
|
|
26
|
+
/**
|
|
27
|
+
* The handler function for the route
|
|
28
|
+
* @param req The request object
|
|
29
|
+
* @param ctx The context object
|
|
30
|
+
* @returns The response object or a promise that resolves to a response object
|
|
31
|
+
*/
|
|
7
32
|
handler(req: Request, ctx?: Context): Response | Promise<Response>;
|
|
33
|
+
/**
|
|
34
|
+
* Whether this route requires authentication
|
|
35
|
+
*/
|
|
8
36
|
protected?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether this route is disabled
|
|
39
|
+
*/
|
|
9
40
|
disabled?: boolean;
|
|
10
41
|
}
|
|
11
42
|
export interface Context {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../../src/abstracts/Plugin.ts"],"names":[],"mappings":"AAAA,8BAAsB,MAAM;IAC3B,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../../src/abstracts/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD;;GAEG;AACH,8BAAsB,MAAM;IAC3B;;;OAGG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAErC;;;OAGG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CACrC;AAED,MAAM,WAAW,KAAK;IACrB;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;IAEnD;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,EAAE,CAAA;IAElB;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;IAElE;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,OAAO;IAEvB,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../src/abstracts/Plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../src/abstracts/Plugin.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAgB,MAAM;CAY3B"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import Bun from "bun";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import type { Client } from "../../index.js";
|
|
3
|
+
export type Server = Bun.Server;
|
|
4
|
+
export type ServerOptions = Omit<Bun.ServeOptions, "fetch">;
|
|
5
5
|
/**
|
|
6
|
-
* Creates a
|
|
7
|
-
* @param
|
|
8
|
-
* @param options
|
|
9
|
-
* @returns The
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const server = createServer(handle, { ... })
|
|
13
|
-
* ```
|
|
6
|
+
* Creates a server for the client using Bun.serve
|
|
7
|
+
* @param client The Carbon client to create the server for
|
|
8
|
+
* @param options Additional options for the server
|
|
9
|
+
* @returns The Bun.Server instance
|
|
14
10
|
*/
|
|
15
|
-
export declare function createServer(
|
|
11
|
+
export declare function createServer(client: Client, options: ServerOptions): Server;
|
|
16
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/bun/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/bun/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAG5C,MAAM,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;AAC/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;AAE3D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAM3E"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import Bun from "bun";
|
|
2
|
+
import { createHandler } from "../fetch/index.js";
|
|
2
3
|
/**
|
|
3
|
-
* Creates a
|
|
4
|
-
* @param
|
|
5
|
-
* @param options
|
|
6
|
-
* @returns The
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* const server = createServer(handle, { ... })
|
|
10
|
-
* ```
|
|
4
|
+
* Creates a server for the client using Bun.serve
|
|
5
|
+
* @param client The Carbon client to create the server for
|
|
6
|
+
* @param options Additional options for the server
|
|
7
|
+
* @returns The Bun.Server instance
|
|
11
8
|
*/
|
|
12
|
-
export function createServer(
|
|
13
|
-
const fetch =
|
|
9
|
+
export function createServer(client, options) {
|
|
10
|
+
const fetch = createHandler(client);
|
|
14
11
|
return Bun.serve({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hostname: options.hostname
|
|
12
|
+
...options,
|
|
13
|
+
fetch: (r) => fetch(r, {})
|
|
18
14
|
});
|
|
19
15
|
}
|
|
20
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/bun/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/bun/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAKjD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc,EAAE,OAAsB;IAClE,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;IACnC,OAAO,GAAG,CAAC,KAAK,CAAC;QAChB,GAAG,OAAO;QACV,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;KAC1B,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Context } from "../../abstracts/Plugin.js";
|
|
2
|
+
import type { Client } from "../../classes/Client.js";
|
|
3
|
+
export type Handler = (req: Request, ctx: Context) => Promise<Response>;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a fetch handler function for the clients routes
|
|
6
|
+
* @param client The client to create the handler for
|
|
7
|
+
* @returns The handler function
|
|
8
|
+
*/
|
|
9
|
+
export declare function createHandler(client: Client): Handler;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEvE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAiCrD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a fetch handler function for the clients routes
|
|
3
|
+
* @param client The client to create the handler for
|
|
4
|
+
* @returns The handler function
|
|
5
|
+
*/
|
|
6
|
+
export function createHandler(client) {
|
|
7
|
+
return async (req, ctx) => {
|
|
8
|
+
const method = req.method;
|
|
9
|
+
const url = new URL(req.url, "http://localhost");
|
|
10
|
+
const pathname = //
|
|
11
|
+
resolveRequestPathname(new URL(client.options.baseUrl), url);
|
|
12
|
+
if (!pathname)
|
|
13
|
+
return new Response("Not Found", { status: 404 });
|
|
14
|
+
const matchedRoutesByPath = //
|
|
15
|
+
client.routes.filter((r) => r.path === pathname && !r.disabled);
|
|
16
|
+
const matchedRoutesByMethod = //
|
|
17
|
+
matchedRoutesByPath.filter((r) => r.method === method);
|
|
18
|
+
if (matchedRoutesByMethod.length === 0) {
|
|
19
|
+
if (matchedRoutesByPath.length > 0)
|
|
20
|
+
return new Response("Method Not Allowed", { status: 405 });
|
|
21
|
+
return new Response("Not Found", { status: 404 });
|
|
22
|
+
}
|
|
23
|
+
// Use the last matched route to allow for overriding
|
|
24
|
+
const route = matchedRoutesByMethod.at(-1);
|
|
25
|
+
const passedSecret = url.searchParams.get("secret");
|
|
26
|
+
if (route.protected && client.options.deploySecret !== passedSecret)
|
|
27
|
+
return new Response("Unauthorized", { status: 401 });
|
|
28
|
+
try {
|
|
29
|
+
return await route.handler(req, ctx);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error(error);
|
|
33
|
+
return new Response("Internal Server Error", { status: 500 });
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function resolveRequestPathname(baseUrl, reqUrl) {
|
|
38
|
+
// Need to use pathname only due to host name being different in Cloudflare Tunnel
|
|
39
|
+
const basePathname = baseUrl.pathname.replace(/\/$/, "");
|
|
40
|
+
const reqPathname = reqUrl.pathname.replace(/\/$/, "");
|
|
41
|
+
if (!reqPathname.startsWith(basePathname))
|
|
42
|
+
return null;
|
|
43
|
+
return reqPathname.slice(basePathname.length);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/fetch/index.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC3C,OAAO,KAAK,EAAE,GAAY,EAAE,GAAY,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QACzB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAA;QAChD,MAAM,QAAQ,GAAG,EAAE;SAClB,sBAAsB,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAA;QAC7D,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,C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,CAAC,CAAA;AACF,CAAC;AAED,SAAS,sBAAsB,CAAC,OAAY,EAAE,MAAW;IACxD,kFAAkF;IAClF,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACxD,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACtD,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,IAAI,CAAA;IACtD,OAAO,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import * as Hono from "@hono/node-server";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import type { Client } from "../../index.js";
|
|
3
|
+
export type Server = Hono.ServerType;
|
|
4
|
+
export type ServerOptions = Omit<Parameters<typeof Hono.serve>[0], "fetch">;
|
|
5
5
|
/**
|
|
6
|
-
* Creates a
|
|
7
|
-
* @param
|
|
8
|
-
* @param options
|
|
9
|
-
* @returns The
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const server = createServer(handle, { ... })
|
|
13
|
-
* ```
|
|
6
|
+
* Creates a server for the client using Hono.serve under the hood
|
|
7
|
+
* @param client The Carbon client to create the server for
|
|
8
|
+
* @param options Additional options for the server
|
|
9
|
+
* @returns The server instance
|
|
14
10
|
*/
|
|
15
|
-
export declare function createServer(
|
|
11
|
+
export declare function createServer(client: Client, options: ServerOptions): Server;
|
|
16
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAG5C,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAA;AACpC,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAE3E;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAO3E"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import * as Hono from "@hono/node-server";
|
|
2
|
+
import { createHandler } from "../fetch/index.js";
|
|
2
3
|
/**
|
|
3
|
-
* Creates a
|
|
4
|
-
* @param
|
|
5
|
-
* @param options
|
|
6
|
-
* @returns The
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* const server = createServer(handle, { ... })
|
|
10
|
-
* ```
|
|
4
|
+
* Creates a server for the client using Hono.serve under the hood
|
|
5
|
+
* @param client The Carbon client to create the server for
|
|
6
|
+
* @param options Additional options for the server
|
|
7
|
+
* @returns The server instance
|
|
11
8
|
*/
|
|
12
|
-
export function createServer(
|
|
13
|
-
const fetch =
|
|
9
|
+
export function createServer(client, options) {
|
|
10
|
+
const fetch = createHandler(client);
|
|
14
11
|
return Hono.serve({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
// Weird type issue with options.createServer ??
|
|
13
|
+
...options,
|
|
14
|
+
fetch: (r) => fetch(r, {})
|
|
18
15
|
});
|
|
19
16
|
}
|
|
20
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAKjD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc,EAAE,OAAsB;IAClE,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;IACnC,OAAO,IAAI,CAAC,KAAK,CAAC;QACjB,gDAAgD;QAChD,GAAI,OAAkB;QACtB,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;KAC1B,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { RequestClient, type RequestClientOptions } from "@buape/carbon-request";
|
|
2
2
|
import type { BaseCommand } from "../abstracts/BaseCommand.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { Context, Plugin, Route } from "../abstracts/Plugin.js";
|
|
4
4
|
import { CommandHandler } from "../internals/CommandHandler.js";
|
|
5
5
|
import { ComponentHandler } from "../internals/ComponentHandler.js";
|
|
6
|
+
import { EventHandler } from "../internals/EventHandler.js";
|
|
6
7
|
import { ModalHandler } from "../internals/ModalHandler.js";
|
|
7
8
|
import { Guild } from "../structures/Guild.js";
|
|
8
9
|
import { GuildMember } from "../structures/GuildMember.js";
|
|
9
10
|
import { Role } from "../structures/Role.js";
|
|
10
11
|
import { User } from "../structures/User.js";
|
|
12
|
+
import type { Listener } from "./Listener.js";
|
|
11
13
|
/**
|
|
12
14
|
* The options used for initializing the client
|
|
13
15
|
*/
|
|
14
|
-
export
|
|
16
|
+
export interface ClientOptions {
|
|
15
17
|
/**
|
|
16
18
|
* The base URL of the app
|
|
17
19
|
*/
|
|
@@ -23,11 +25,7 @@ export type ClientOptions = {
|
|
|
23
25
|
/**
|
|
24
26
|
* The deploy secret of the app, used for protecting the deploy route
|
|
25
27
|
*/
|
|
26
|
-
deploySecret
|
|
27
|
-
/**
|
|
28
|
-
* The client secret of the app
|
|
29
|
-
*/
|
|
30
|
-
clientSecret: string;
|
|
28
|
+
deploySecret?: string;
|
|
31
29
|
/**
|
|
32
30
|
* The public key of the app, used for interaction verification
|
|
33
31
|
*/
|
|
@@ -57,15 +55,28 @@ export type ClientOptions = {
|
|
|
57
55
|
*/
|
|
58
56
|
disableDeployRoute?: boolean;
|
|
59
57
|
/**
|
|
60
|
-
* Whether the interactions route should
|
|
58
|
+
* Whether the interactions route should be disabled
|
|
61
59
|
* @default false
|
|
62
60
|
*/
|
|
63
61
|
disableInteractionsRoute?: boolean;
|
|
64
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Whether the events route should be disabled
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
disableEventsRoute?: boolean;
|
|
67
|
+
}
|
|
65
68
|
/**
|
|
66
69
|
* The main client used to interact with Discord
|
|
67
70
|
*/
|
|
68
|
-
export declare class Client
|
|
71
|
+
export declare class Client {
|
|
72
|
+
/**
|
|
73
|
+
* The routes that the client will handle
|
|
74
|
+
*/
|
|
75
|
+
routes: Route[];
|
|
76
|
+
/**
|
|
77
|
+
* The plugins that the client has registered
|
|
78
|
+
*/
|
|
79
|
+
plugins: Plugin[];
|
|
69
80
|
/**
|
|
70
81
|
* The options used to initialize the client
|
|
71
82
|
*/
|
|
@@ -74,6 +85,10 @@ export declare class Client extends Plugin {
|
|
|
74
85
|
* The commands that the client has registered
|
|
75
86
|
*/
|
|
76
87
|
commands: BaseCommand[];
|
|
88
|
+
/**
|
|
89
|
+
* The event listeners that the client has registered
|
|
90
|
+
*/
|
|
91
|
+
listeners: Listener[];
|
|
77
92
|
/**
|
|
78
93
|
* The rest client used to interact with the Discord API
|
|
79
94
|
*/
|
|
@@ -93,18 +108,33 @@ export declare class Client extends Plugin {
|
|
|
93
108
|
* @internal
|
|
94
109
|
*/
|
|
95
110
|
modalHandler: ModalHandler;
|
|
111
|
+
/**
|
|
112
|
+
* The handler for events sent from Discord
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
eventHandler: EventHandler;
|
|
96
116
|
/**
|
|
97
117
|
* Creates a new client
|
|
98
118
|
* @param options The options used to initialize the client
|
|
99
119
|
* @param commands The commands that the client has registered
|
|
120
|
+
* @param plugins The plugins that the client should use
|
|
100
121
|
*/
|
|
101
|
-
constructor(options: ClientOptions,
|
|
122
|
+
constructor(options: ClientOptions, handlers: {
|
|
123
|
+
commands?: BaseCommand[];
|
|
124
|
+
listeners?: Listener[];
|
|
125
|
+
}, plugins?: Plugin[]);
|
|
102
126
|
private appendRoutes;
|
|
103
127
|
/**
|
|
104
128
|
* Handle a request to deploy the commands to Discord
|
|
105
129
|
* @returns A response
|
|
106
130
|
*/
|
|
107
131
|
handleDeployRequest(): Promise<Response>;
|
|
132
|
+
/**
|
|
133
|
+
* Handle an interaction request from Discord
|
|
134
|
+
* @param req The request to handle
|
|
135
|
+
* @returns A response
|
|
136
|
+
*/
|
|
137
|
+
handleEventsRequest(req: Request): Promise<Response>;
|
|
108
138
|
/**
|
|
109
139
|
* Handle an interaction request from Discord
|
|
110
140
|
* @param req The request to handle
|
|
@@ -113,10 +143,10 @@ export declare class Client extends Plugin {
|
|
|
113
143
|
*/
|
|
114
144
|
handleInteractionsRequest(req: Request, ctx: Context): Promise<Response>;
|
|
115
145
|
/**
|
|
116
|
-
* Validate
|
|
146
|
+
* Validate a request from Discord
|
|
117
147
|
* @param req The request to validate
|
|
118
148
|
*/
|
|
119
|
-
private
|
|
149
|
+
private validateDiscordRequest;
|
|
120
150
|
/**
|
|
121
151
|
* Fetch a user from the Discord API
|
|
122
152
|
* @param id The ID of the user to fetch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAchF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC;;;OAGG;IACH,UAAU,CAA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