@wolfstar/plugin-gateway 0.9.1 → 0.10.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/README.md +14 -0
- package/dist/esm/module.d.ts +9 -0
- package/dist/esm/module.d.ts.map +1 -0
- package/dist/esm/module.js +20 -0
- package/dist/esm/module.js.map +1 -0
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -1035,6 +1035,20 @@ try {
|
|
|
1035
1035
|
`shardClient.gatewayOptions` into the client's options.
|
|
1036
1036
|
- Interaction payloads keep being handled as today, they do not read through `client.users` & co.
|
|
1037
1037
|
|
|
1038
|
+
## Stars module
|
|
1039
|
+
|
|
1040
|
+
On framework 6.1 and later, list the module in `modules` in `stars.config` (needs the optional
|
|
1041
|
+
`@wolfstar/kit` peer) to add the package to the auto imports:
|
|
1042
|
+
|
|
1043
|
+
```ts
|
|
1044
|
+
// stars.config.ts
|
|
1045
|
+
export default defineConfig({
|
|
1046
|
+
modules: ["@wolfstar/plugin-gateway/module"],
|
|
1047
|
+
});
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
The module registers no plugin and takes no options: you still construct the `GatewayClient` yourself.
|
|
1051
|
+
|
|
1038
1052
|
## Credits
|
|
1039
1053
|
|
|
1040
1054
|
The error system (`src/errors/`) is adapted from discord.js's
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/module.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The Stars module: listing `@wolfstar/plugin-gateway/module` in `modules` in `stars.config` adds the package to the
|
|
4
|
+
* auto imports. The `GatewayClient` is still constructed by you.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: import("@wolfstar/kit").StarsModule<import("@wolfstar/kit").ModuleOptions>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
|
9
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","names":[],"sources":["../../src/module.ts"],"mappings":";;;;;cAEA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineModule } from "@wolfstar/kit";
|
|
2
|
+
|
|
3
|
+
//#region src/module.ts
|
|
4
|
+
/**
|
|
5
|
+
* The Stars module: listing `@wolfstar/plugin-gateway/module` in `modules` in `stars.config` adds the package to the
|
|
6
|
+
* auto imports. The `GatewayClient` is still constructed by you.
|
|
7
|
+
*/
|
|
8
|
+
var module_default = defineModule({
|
|
9
|
+
meta: {
|
|
10
|
+
name: "@wolfstar/plugin-gateway",
|
|
11
|
+
compatibility: { framework: ">=6.1.0" }
|
|
12
|
+
},
|
|
13
|
+
setup(_options, ctx) {
|
|
14
|
+
ctx.addImports("@wolfstar/plugin-gateway");
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { module_default as default };
|
|
20
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","names":[],"sources":["../../src/module.ts"],"sourcesContent":["import { defineModule } from \"@wolfstar/kit\";\n\n/**\n * The Stars module: listing `@wolfstar/plugin-gateway/module` in `modules` in `stars.config` adds the package to the\n * auto imports. The `GatewayClient` is still constructed by you.\n */\nexport default defineModule({\n meta: { name: \"@wolfstar/plugin-gateway\", compatibility: { framework: \">=6.1.0\" } },\n setup(_options, ctx) {\n ctx.addImports(\"@wolfstar/plugin-gateway\");\n },\n});\n"],"mappings":";;;;;;;AAMA,qBAAe,aAAa;CAC1B,MAAM;EAAE,MAAM;EAA4B,eAAe,EAAE,WAAW,UAAU;CAAE;CAClF,MAAM,UAAU,KAAK;EACnB,IAAI,WAAW,0BAA0B;CAC3C;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wolfstar/plugin-gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Gateway (WebSocket) support for @wolfstar/http-framework: a GatewayClient emitting Structures, backed by a pluggable cache",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"discord",
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
"types": "./dist/esm/register.d.ts",
|
|
41
41
|
"default": "./dist/esm/register.js"
|
|
42
42
|
}
|
|
43
|
+
},
|
|
44
|
+
"./module": {
|
|
45
|
+
"import": {
|
|
46
|
+
"types": "./dist/esm/module.d.ts",
|
|
47
|
+
"default": "./dist/esm/module.js"
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
50
|
},
|
|
45
51
|
"publishConfig": {
|
|
@@ -53,14 +59,21 @@
|
|
|
53
59
|
"@discordjs/structures": "1.0.0-pr-11602.1789066132-275cd4b42",
|
|
54
60
|
"@discordjs/ws": "^2.0.4",
|
|
55
61
|
"@sapphire/pieces": "^4.4.1",
|
|
56
|
-
"@wolfstar/plugin-cache": "^0.
|
|
62
|
+
"@wolfstar/plugin-cache": "^0.6.0",
|
|
57
63
|
"discord-api-types": "^0.38.33"
|
|
58
64
|
},
|
|
59
65
|
"devDependencies": {
|
|
60
|
-
"@wolfstar/http-framework": "^6.1.0"
|
|
66
|
+
"@wolfstar/http-framework": "^6.1.0",
|
|
67
|
+
"@wolfstar/kit": "^0.1.0"
|
|
61
68
|
},
|
|
62
69
|
"peerDependencies": {
|
|
63
|
-
"@wolfstar/http-framework": "^3.4.0 || ^5.0.0 || ^6.0.0"
|
|
70
|
+
"@wolfstar/http-framework": "^3.4.0 || ^5.0.0 || ^6.0.0",
|
|
71
|
+
"@wolfstar/kit": "^0.1.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependenciesMeta": {
|
|
74
|
+
"@wolfstar/kit": {
|
|
75
|
+
"optional": true
|
|
76
|
+
}
|
|
64
77
|
},
|
|
65
78
|
"engines": {
|
|
66
79
|
"node": ">=24.17.0"
|