magmastream 2.9.0-dev.2 → 2.9.0-dev.21
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 +2 -2
- package/dist/index.d.ts +169 -46
- package/dist/storage/CollectionPlayerStore.js +77 -0
- package/dist/storage/RedisPlayerStore.js +156 -0
- package/dist/structures/Manager.js +419 -179
- package/dist/structures/Node.js +47 -38
- package/dist/structures/Player.js +59 -55
- package/dist/structures/Queue.js +92 -32
- package/dist/structures/RedisQueue.js +309 -0
- package/dist/structures/Utils.js +400 -343
- package/dist/utils/managerCheck.js +8 -5
- package/package.json +12 -11
|
@@ -10,7 +10,7 @@ const Manager_1 = require("../structures/Manager");
|
|
|
10
10
|
function managerCheck(options) {
|
|
11
11
|
if (!options)
|
|
12
12
|
throw new TypeError("ManagerOptions must not be empty.");
|
|
13
|
-
const { playNextOnEnd, clientName, defaultSearchPlatform,
|
|
13
|
+
const { playNextOnEnd, clientName, defaultSearchPlatform, autoPlaySearchPlatforms, nodes, enabledPlugins, send, trackPartial, enablePriorityMode, useNode, normalizeYouTubeTitles, lastFmApiKey, maxPreviousTracks, } = options;
|
|
14
14
|
// Validate playNextOnEnd option
|
|
15
15
|
if (typeof playNextOnEnd !== "boolean") {
|
|
16
16
|
throw new TypeError('Manager option "playNextOnEnd" must be a boolean.');
|
|
@@ -27,10 +27,13 @@ function managerCheck(options) {
|
|
|
27
27
|
throw new TypeError(`Manager option "defaultSearchPlatform" must be one of: ${Object.values(Manager_1.SearchPlatform).join(", ")}.`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
// Validate
|
|
31
|
-
if (typeof
|
|
32
|
-
if (!
|
|
33
|
-
throw new TypeError(
|
|
30
|
+
// Validate autoPlaySearchPlatforms
|
|
31
|
+
if (typeof autoPlaySearchPlatforms !== "undefined") {
|
|
32
|
+
if (!Array.isArray(autoPlaySearchPlatforms)) {
|
|
33
|
+
throw new TypeError('Manager option "autoPlaySearchPlatforms" must be an array.');
|
|
34
|
+
}
|
|
35
|
+
if (!autoPlaySearchPlatforms.every((platform) => Object.values(Manager_1.AutoPlayPlatform).includes(platform))) {
|
|
36
|
+
throw new TypeError(`Manager option "autoPlaySearchPlatforms" must be an array of valid AutoPlayPlatform values.`);
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
// Validate nodes option
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magmastream",
|
|
3
|
-
"version": "2.9.0-dev.
|
|
3
|
+
"version": "2.9.0-dev.21",
|
|
4
4
|
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,21 +17,22 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@favware/rollup-type-bundler": "^4.0.0",
|
|
19
19
|
"@types/lodash": "^4.17.16",
|
|
20
|
-
"@types/node": "^22.
|
|
21
|
-
"@types/ws": "^8.18.
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
23
|
-
"@typescript-eslint/parser": "^8.
|
|
24
|
-
"eslint": "^9.
|
|
20
|
+
"@types/node": "^22.15.2",
|
|
21
|
+
"@types/ws": "^8.18.1",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
23
|
+
"@typescript-eslint/parser": "^8.31.0",
|
|
24
|
+
"eslint": "^9.25.1",
|
|
25
25
|
"npm-run-all": "^4.1.5",
|
|
26
26
|
"typedoc": "^0.27.9",
|
|
27
|
-
"typedoc-plugin-no-inherit": "^1.
|
|
28
|
-
"typescript": "^5.8.
|
|
27
|
+
"typedoc-plugin-no-inherit": "^1.6.1",
|
|
28
|
+
"typescript": "^5.8.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@discordjs/collection": "^2.1.1",
|
|
32
|
-
"axios": "^1.
|
|
32
|
+
"axios": "^1.9.0",
|
|
33
33
|
"events": "^3.3.0",
|
|
34
|
-
"
|
|
34
|
+
"ioredis": "^5.6.1",
|
|
35
|
+
"jsdom": "^26.1.0",
|
|
35
36
|
"lodash": "^4.17.21",
|
|
36
37
|
"tslib": "^2.8.1",
|
|
37
38
|
"ws": "^8.18.1"
|
|
@@ -89,4 +90,4 @@
|
|
|
89
90
|
"homepage": "https://docs.magmastream.com",
|
|
90
91
|
"author": "Abel Purnwasy",
|
|
91
92
|
"license": "Apache-2.0"
|
|
92
|
-
}
|
|
93
|
+
}
|