noblox.js-middleware 0.0.1-security → 4.6.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of noblox.js-middleware might be problematic. Click here for more details.
- package/.eslintrc.js +21 -0
- package/.github/FUNDING.yml +3 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- package/.github/workflows/doc-publish.yml +33 -0
- package/.github/workflows/npmpublish.yml +70 -0
- package/.travis.yml +13 -0
- package/CODE_OF_CONDUCT.md +76 -0
- package/LICENSE +21 -0
- package/README.md +166 -3
- package/examples/cleanPlayers.js +130 -0
- package/examples/cleanWall.js +110 -0
- package/examples/revertRanks.js +100 -0
- package/examples/savePlayers.js +119 -0
- package/examples/saveWall.js +96 -0
- package/img/moderatedThumbnails/moderatedThumbnail_100x100.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_110x110.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_140x140.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_150x150.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_150x200.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_180x180.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_250x250.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_30x30.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_352x352.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_420x420.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_48x48.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_50x50.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_60x60.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_720x720.png +0 -0
- package/img/moderatedThumbnails/moderatedThumbnail_75x75.png +0 -0
- package/img/noblox-js-small.png +0 -0
- package/img/noblox-js.png +0 -0
- package/img/thumbnailSizes.png +0 -0
- package/jsDocsConfig.json +55 -0
- package/lib/accountinformation/getUserSocialLinks.js +42 -0
- package/lib/accountsettings/block.js +58 -0
- package/lib/accountsettings/unblock.js +58 -0
- package/lib/asset/deleteFromInventory.js +69 -0
- package/lib/asset/getGamePassProductInfo.js +51 -0
- package/lib/asset/getProductInfo.js +56 -0
- package/lib/asset/uploadAnimation.js +103 -0
- package/lib/asset/uploadItem.js +83 -0
- package/lib/asset/uploadModel.js +90 -0
- package/lib/avatar/avatarRules.js +38 -0
- package/lib/avatar/currentlyWearing.js +32 -0
- package/lib/avatar/getAvatar.js +35 -0
- package/lib/avatar/getCurrentAvatar.js +37 -0
- package/lib/avatar/getRecentItems.js +37 -0
- package/lib/avatar/outfitDetails.js +32 -0
- package/lib/avatar/outfits.js +37 -0
- package/lib/avatar/redrawAvatar.js +48 -0
- package/lib/avatar/removeAssetId.js +55 -0
- package/lib/avatar/setAvatarBodyColors.js +60 -0
- package/lib/avatar/setAvatarScales.js +60 -0
- package/lib/avatar/setPlayerAvatarType.js +50 -0
- package/lib/avatar/setWearingAssets.js +50 -0
- package/lib/avatar/wearAssetId.js +55 -0
- package/lib/badges/getAwardedTimestamps.js +52 -0
- package/lib/badges/getBadgeInfo.js +43 -0
- package/lib/badges/getGameBadges.js +62 -0
- package/lib/badges/getPlayerBadges.js +28 -0
- package/lib/badges/updateBadgeInfo.js +80 -0
- package/lib/cache/add.js +14 -0
- package/lib/cache/addIf.js +26 -0
- package/lib/cache/clear.js +8 -0
- package/lib/cache/get.js +28 -0
- package/lib/cache/index.js +17 -0
- package/lib/cache/new.js +12 -0
- package/lib/cache/wrap.js +25 -0
- package/lib/chat/addUsersToConversation.js +61 -0
- package/lib/chat/chatSettings.js +33 -0
- package/lib/chat/getChatMessages.js +40 -0
- package/lib/chat/getConversations.js +43 -0
- package/lib/chat/getRolloutSettings.js +35 -0
- package/lib/chat/getUnreadConversationCount.js +33 -0
- package/lib/chat/getUnreadMessages.js +38 -0
- package/lib/chat/getUserConversations.js +37 -0
- package/lib/chat/markChatAsRead.js +52 -0
- package/lib/chat/markChatAsSeen.js +50 -0
- package/lib/chat/multiGetLatestMessages.js +37 -0
- package/lib/chat/onNewConversation.js +50 -0
- package/lib/chat/onNewMessage.js +53 -0
- package/lib/chat/onNewMessageBySelf.js +50 -0
- package/lib/chat/onUserOnline.js +50 -0
- package/lib/chat/onUserTyping.js +54 -0
- package/lib/chat/removeFromGroupConversation.js +62 -0
- package/lib/chat/renameGroupConversation.js +57 -0
- package/lib/chat/sendChatMessage.js +57 -0
- package/lib/chat/setChatUserTyping.js +61 -0
- package/lib/chat/start121Conversation.js +50 -0
- package/lib/chat/startCloudEditConversation.js +50 -0
- package/lib/chat/startGroupConversation.js +62 -0
- package/lib/client/onNotification.js +70 -0
- package/lib/client/setAPIKey.js +18 -0
- package/lib/client/setCookie.js +38 -0
- package/lib/datastores/deleteDatastoreEntry.js +66 -0
- package/lib/datastores/getDatastoreEntry.js +98 -0
- package/lib/datastores/getDatastoreEntryVersions.js +83 -0
- package/lib/datastores/getDatastoreKeys.js +73 -0
- package/lib/datastores/getDatastores.js +72 -0
- package/lib/datastores/incrementDatastoreEntry.js +93 -0
- package/lib/datastores/setDatastoreEntry.js +90 -0
- package/lib/develop/canManage.js +44 -0
- package/lib/develop/configureItem.js +142 -0
- package/lib/develop/updateUniverse.js +53 -0
- package/lib/develop/updateUniverseAccess.js +55 -0
- package/lib/economy/buy.js +99 -0
- package/lib/economy/getGroupFunds.js +43 -0
- package/lib/economy/getGroupRevenueSummary.js +48 -0
- package/lib/economy/getGroupTransactions.js +32 -0
- package/lib/economy/getResaleData.js +54 -0
- package/lib/economy/getResellers.js +35 -0
- package/lib/economy/getUserTransactions.js +34 -0
- package/lib/economy/onGroupTransaction.js +74 -0
- package/lib/friends/acceptFriendRequest.js +59 -0
- package/lib/friends/declineAllFriendRequests.js +57 -0
- package/lib/friends/declineFriendRequest.js +59 -0
- package/lib/friends/getFollowers.js +61 -0
- package/lib/friends/getFollowings.js +61 -0
- package/lib/friends/getFriendRequests.js +56 -0
- package/lib/friends/getFriends.js +53 -0
- package/lib/friends/onFriendRequest.js +58 -0
- package/lib/friends/removeFriend.js +58 -0
- package/lib/friends/sendFriendRequest.js +59 -0
- package/lib/friends/unfollow.js +58 -0
- package/lib/games/addDeveloperProduct.js +65 -0
- package/lib/games/checkDeveloperProductName.js +39 -0
- package/lib/games/configureGamePass.js +146 -0
- package/lib/games/getDeveloperProducts.js +51 -0
- package/lib/games/getGameInstances.js +31 -0
- package/lib/games/getGamePasses.js +39 -0
- package/lib/games/getGameRevenue.js +49 -0
- package/lib/games/getGameSocialLinks.js +45 -0
- package/lib/games/getGroupGames.js +30 -0
- package/lib/games/getPlaceInfo.js +48 -0
- package/lib/games/getUniverseInfo.js +51 -0
- package/lib/games/updateDeveloperProduct.js +69 -0
- package/lib/groups/changeRank.js +59 -0
- package/lib/groups/deleteWallPost.js +64 -0
- package/lib/groups/deleteWallPostsByUser.js +59 -0
- package/lib/groups/demote.js +25 -0
- package/lib/groups/exile.js +59 -0
- package/lib/groups/getAuditLog.js +67 -0
- package/lib/groups/getGroup.js +57 -0
- package/lib/groups/getGroupSocialLinks.js +44 -0
- package/lib/groups/getGroups.js +88 -0
- package/lib/groups/getJoinRequest.js +52 -0
- package/lib/groups/getJoinRequests.js +58 -0
- package/lib/groups/getPlayers.js +108 -0
- package/lib/groups/getRankInGroup.js +52 -0
- package/lib/groups/getRankNameInGroup.js +52 -0
- package/lib/groups/getRole.js +64 -0
- package/lib/groups/getRolePermissions.js +51 -0
- package/lib/groups/getRoles.js +56 -0
- package/lib/groups/getShout.js +49 -0
- package/lib/groups/getWall.js +59 -0
- package/lib/groups/groupPayout.js +103 -0
- package/lib/groups/handleJoinRequest.js +60 -0
- package/lib/groups/leaveGroup.js +60 -0
- package/lib/groups/onAuditLog.js +62 -0
- package/lib/groups/onJoinRequest.js +63 -0
- package/lib/groups/onJoinRequestHandle.js +105 -0
- package/lib/groups/onShout.js +57 -0
- package/lib/groups/onWallPost.js +58 -0
- package/lib/groups/promote.js +25 -0
- package/lib/groups/searchGroups.js +32 -0
- package/lib/groups/setGroupDescription.js +65 -0
- package/lib/groups/setGroupName.js +66 -0
- package/lib/groups/setRank.js +79 -0
- package/lib/groups/shout.js +65 -0
- package/lib/index.js +30 -0
- package/lib/internal/levelOneCopy.js +16 -0
- package/lib/internal/queue.js +61 -0
- package/lib/internal/timeout.js +30 -0
- package/lib/internal/wrap.js +78 -0
- package/lib/inventory/getCollectibles.js +31 -0
- package/lib/inventory/getInventory.js +32 -0
- package/lib/inventory/getInventoryById.js +31 -0
- package/lib/inventory/getOwnership.js +54 -0
- package/lib/inventory/getUAIDs.js +47 -0
- package/lib/itemconfiguration/getGroupAssets.js +32 -0
- package/lib/options.js +26 -0
- package/lib/party/onPartyDeleted.js +53 -0
- package/lib/party/onPartyInvite.js +53 -0
- package/lib/party/onPartyJoinedGame.js +53 -0
- package/lib/party/onPartyLeftGame.js +53 -0
- package/lib/party/onPartySelfJoined.js +53 -0
- package/lib/party/onPartySelfLeft.js +53 -0
- package/lib/party/onPartyUserJoined.js +53 -0
- package/lib/party/onPartyUserLeft.js +53 -0
- package/lib/premiumfeatures/getPremium.js +51 -0
- package/lib/presence/getPresences.js +63 -0
- package/lib/privatemessages/getMessages.js +60 -0
- package/lib/privatemessages/message.js +80 -0
- package/lib/privatemessages/onMessage.js +88 -0
- package/lib/thumbnails/getLogo.js +60 -0
- package/lib/thumbnails/getPlayerThumbnail.js +121 -0
- package/lib/thumbnails/getThumbnails.js +93 -0
- package/lib/trades/acceptTrade.js +58 -0
- package/lib/trades/canTradeWith.js +48 -0
- package/lib/trades/counterTrade.js +84 -0
- package/lib/trades/declineTrade.js +58 -0
- package/lib/trades/getTradeInfo.js +52 -0
- package/lib/trades/getTrades.js +37 -0
- package/lib/trades/sendTrade.js +82 -0
- package/lib/users/getBlurb.js +36 -0
- package/lib/users/getIdFromUsername.js +53 -0
- package/lib/users/getPlayerInfo.js +100 -0
- package/lib/users/getUsernameFromId.js +44 -0
- package/lib/users/onBlurbChange.js +46 -0
- package/lib/util/clearSession.js +32 -0
- package/lib/util/generalRequest.js +61 -0
- package/lib/util/getAction.js +45 -0
- package/lib/util/getCurrentUser.js +44 -0
- package/lib/util/getGeneralToken.js +52 -0
- package/lib/util/getHash.js +29 -0
- package/lib/util/getInputs.js +37 -0
- package/lib/util/getPageResults.js +89 -0
- package/lib/util/getSenderUserId.js +30 -0
- package/lib/util/getSession.js +38 -0
- package/lib/util/getVerification.js +60 -0
- package/lib/util/getVerificationInputs.js +31 -0
- package/lib/util/http.js +110 -0
- package/lib/util/jar.js +24 -0
- package/lib/util/refreshCookie.js +52 -0
- package/lib/util/relog.js +81 -0
- package/lib/util/setOptions.js +54 -0
- package/lib/util/shortPoll.js +102 -0
- package/lib/util/threaded.js +80 -0
- package/package.json +93 -3
- package/postinstall.js +1 -0
- package/settings.json +107 -0
- package/test/accountinformation.test.js +27 -0
- package/test/accountsettings.test.js +27 -0
- package/test/asset.test.js +81 -0
- package/test/assets/Great-White-Shark-Fin.rbxm +0 -0
- package/test/assets/KeyframeSequence.rbxm +0 -0
- package/test/avatar.test.js +164 -0
- package/test/badges.test.js +96 -0
- package/test/chat.test.js +104 -0
- package/test/datastore.test.js +105 -0
- package/test/develop.test.js +53 -0
- package/test/economy.test.js +137 -0
- package/test/friends.test.js +128 -0
- package/test/games.test.js +212 -0
- package/test/groups.test.js +311 -0
- package/test/inventory.test.js +98 -0
- package/test/itemconfiguration.test.js +24 -0
- package/test/premiumfeatures.test.js +17 -0
- package/test/presence.test.js +25 -0
- package/test/privatemessages.test.js +33 -0
- package/test/thumbnails.test.js +53 -0
- package/test/users.test.js +68 -0
- package/tutorials/Authentication.md +75 -0
- package/tutorials/Event Emitters.md +26 -0
- package/tutorials/Promises.md +86 -0
- package/tutorials/VPS Authentication.md +72 -0
- package/typings/index.d.ts +2525 -0
- package/typings/jsDocs.ts +1927 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
// Includes
|
2
|
+
const settings = require('../../settings.json')
|
3
|
+
|
4
|
+
// Args
|
5
|
+
exports.required = ['getPage', 'start', 'end']
|
6
|
+
|
7
|
+
// Define
|
8
|
+
exports.func = function (args) {
|
9
|
+
const getPage = args.getPage
|
10
|
+
const start = args.start
|
11
|
+
const end = args.end
|
12
|
+
let completed = 0
|
13
|
+
let expected = end - start
|
14
|
+
let rslv
|
15
|
+
function next (i, ivl, tries) {
|
16
|
+
if (i >= end) {
|
17
|
+
return
|
18
|
+
}
|
19
|
+
if (i < start) {
|
20
|
+
next(i + ivl, ivl, 0)
|
21
|
+
return
|
22
|
+
}
|
23
|
+
if (tries > 2) {
|
24
|
+
expected--
|
25
|
+
console.error('Ran out of tries for ' + i)
|
26
|
+
if (completed >= expected) {
|
27
|
+
rslv()
|
28
|
+
} else {
|
29
|
+
next(i + ivl, ivl, 0)
|
30
|
+
}
|
31
|
+
return
|
32
|
+
}
|
33
|
+
const res = getPage(i)
|
34
|
+
if (res && res.then) {
|
35
|
+
res.then(function () {
|
36
|
+
completed++
|
37
|
+
if (completed >= expected) {
|
38
|
+
rslv()
|
39
|
+
return
|
40
|
+
}
|
41
|
+
next(i + ivl, ivl, 0)
|
42
|
+
})
|
43
|
+
.catch(function (err) {
|
44
|
+
if (!err.stack.includes('ESOCKETTIMEDOUT')) { // Silence common socket timeout errors
|
45
|
+
console.error('Thread error: ' + err.stack)
|
46
|
+
}
|
47
|
+
setTimeout(next, 5000, i, ivl, tries + 1)
|
48
|
+
})
|
49
|
+
} else {
|
50
|
+
expected--
|
51
|
+
if (completed >= expected) {
|
52
|
+
rslv()
|
53
|
+
return
|
54
|
+
}
|
55
|
+
next(i + ivl, ivl, 0)
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
const promise = new Promise(function (resolve) {
|
60
|
+
rslv = resolve
|
61
|
+
if (expected <= 0) {
|
62
|
+
resolve()
|
63
|
+
return
|
64
|
+
}
|
65
|
+
const ivl = Math.min(settings.maxThreads, expected)
|
66
|
+
for (let i = 0; i < ivl; i++) {
|
67
|
+
next(i, ivl, 0)
|
68
|
+
}
|
69
|
+
})
|
70
|
+
promise.getStatus = function () {
|
71
|
+
return Math.round((completed / expected) * 10000) / 100 || 0
|
72
|
+
}
|
73
|
+
promise.getCompleted = function () {
|
74
|
+
return completed
|
75
|
+
}
|
76
|
+
promise.getExpected = function () {
|
77
|
+
return expected
|
78
|
+
}
|
79
|
+
return promise
|
80
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,96 @@
|
|
1
1
|
{
|
2
2
|
"name": "noblox.js-middleware",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "4.6.9",
|
4
|
+
"description": "A MiddleWare API wrapper for Roblox.",
|
5
|
+
"main": "lib/index.js",
|
6
|
+
"types": "typings/index.d.ts",
|
7
|
+
"scripts": {
|
8
|
+
"docs": "jsdoc -c jsDocsConfig.json -r -t ./node_modules/better-docs",
|
9
|
+
"lint": "eslint lib/",
|
10
|
+
"test": "jest",
|
11
|
+
"postinstall": "node postinstall.js"
|
12
|
+
},
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "https://github.com/noblox/noblox.js.git"
|
16
|
+
},
|
17
|
+
"keywords": [
|
18
|
+
"roblox",
|
19
|
+
"bot",
|
20
|
+
"clans"
|
21
|
+
],
|
22
|
+
"dependencies": {
|
23
|
+
"archiver": "6.0.1",
|
24
|
+
"axios": "^1.7.6",
|
25
|
+
"chalk": "^4.0.0",
|
26
|
+
"cheerio": "^1.0.0-rc.10",
|
27
|
+
"entities": "^4.3.0",
|
28
|
+
"figlet": "^1.4.0",
|
29
|
+
"form-data": "4.0.0",
|
30
|
+
"node-dpapi-prebuilt": "^1.0.4",
|
31
|
+
"node-fetch": "^2.7.0",
|
32
|
+
"os": "0.1.2",
|
33
|
+
"path": "0.12.7",
|
34
|
+
"request": "^2.81.0",
|
35
|
+
"request-promise": "^4.2.4",
|
36
|
+
"signalr-client": "0.0.20",
|
37
|
+
"util": "^0.12.5"
|
38
|
+
},
|
39
|
+
"license": "MIT",
|
40
|
+
"bugs": {
|
41
|
+
"url": "https://github.com/noblox/noblox.js/issues"
|
42
|
+
},
|
43
|
+
"author": "Suufi <suufi@mit.edu> (https://github.com/suufi)",
|
44
|
+
"contributors": [
|
45
|
+
"Joshua Lanese <froastj@gmail.com>",
|
46
|
+
"Neztore <hi@nezto.re>",
|
47
|
+
"Alan Bixby <alan@bxb.gg> (https://alanbix.by)"
|
48
|
+
],
|
49
|
+
"homepage": "https://github.com/noblox/noblox.js",
|
50
|
+
"devDependencies": {
|
51
|
+
"@auto-it/conventional-commits": "^10.30.0",
|
52
|
+
"auto": "^10.30.0",
|
53
|
+
"better-docs": "2.7.2",
|
54
|
+
"dotenv": "16.0.3",
|
55
|
+
"eslint": "^7.28.0",
|
56
|
+
"eslint-config-standard": "^16.0.3",
|
57
|
+
"eslint-plugin-import": "^2.25.3",
|
58
|
+
"eslint-plugin-jest": "27.2.2",
|
59
|
+
"eslint-plugin-node": "^11.0.0",
|
60
|
+
"eslint-plugin-promise": "^5.1.0",
|
61
|
+
"jest": "^29.5.0",
|
62
|
+
"jest-extended": "^3.2.4",
|
63
|
+
"jsdoc": "3.6.10",
|
64
|
+
"JSONStream": "^1.3.1",
|
65
|
+
"progress": "^2.0.0",
|
66
|
+
"standard": "^17.0.0"
|
67
|
+
},
|
68
|
+
"jest": {
|
69
|
+
"setupFiles": [
|
70
|
+
"dotenv/config"
|
71
|
+
],
|
72
|
+
"setupFilesAfterEnv": [
|
73
|
+
"jest-extended/all"
|
74
|
+
],
|
75
|
+
"coveragePathIgnorePatterns": [
|
76
|
+
"lib/party",
|
77
|
+
"lib/util",
|
78
|
+
"lib/internal",
|
79
|
+
"lib/cache",
|
80
|
+
"node_modules",
|
81
|
+
"lib/index.js",
|
82
|
+
"lib/options.js",
|
83
|
+
"lib/*/on*.js"
|
84
|
+
]
|
85
|
+
},
|
86
|
+
"auto": {
|
87
|
+
"plugins": [
|
88
|
+
"npm",
|
89
|
+
"conventional-commits"
|
90
|
+
],
|
91
|
+
"onlyPublishWithReleaseLabel": true
|
92
|
+
},
|
93
|
+
"engines": {
|
94
|
+
"node": ">=14.14.0"
|
95
|
+
}
|
6
96
|
}
|