noblox.js-async 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-async 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 +91 -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,94 @@
|
|
1
1
|
{
|
2
2
|
"name": "noblox.js-async",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "4.6.9",
|
4
|
+
"description": "A Typescript 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
|
+
"chalk": "^4.0.0",
|
25
|
+
"cheerio": "^1.0.0-rc.10",
|
26
|
+
"entities": "^4.3.0",
|
27
|
+
"figlet": "^1.4.0",
|
28
|
+
"form-data": "4.0.0",
|
29
|
+
"node-fetch": "^2.7.0",
|
30
|
+
"os": "0.1.2",
|
31
|
+
"path": "0.12.7",
|
32
|
+
"request": "^2.81.0",
|
33
|
+
"request-promise": "^4.2.4",
|
34
|
+
"signalr-client": "0.0.20",
|
35
|
+
"util": "^0.12.5"
|
36
|
+
},
|
37
|
+
"license": "MIT",
|
38
|
+
"bugs": {
|
39
|
+
"url": "https://github.com/noblox/noblox.js/issues"
|
40
|
+
},
|
41
|
+
"author": "Suufi <suufi@mit.edu> (https://github.com/suufi)",
|
42
|
+
"contributors": [
|
43
|
+
"Joshua Lanese <froastj@gmail.com>",
|
44
|
+
"Neztore <hi@nezto.re>",
|
45
|
+
"Alan Bixby <alan@bxb.gg> (https://alanbix.by)"
|
46
|
+
],
|
47
|
+
"homepage": "https://github.com/noblox/noblox.js",
|
48
|
+
"devDependencies": {
|
49
|
+
"@auto-it/conventional-commits": "^10.30.0",
|
50
|
+
"auto": "^10.30.0",
|
51
|
+
"better-docs": "2.7.2",
|
52
|
+
"dotenv": "16.0.3",
|
53
|
+
"eslint": "^7.28.0",
|
54
|
+
"eslint-config-standard": "^16.0.3",
|
55
|
+
"eslint-plugin-import": "^2.25.3",
|
56
|
+
"eslint-plugin-jest": "27.2.2",
|
57
|
+
"eslint-plugin-node": "^11.0.0",
|
58
|
+
"eslint-plugin-promise": "^5.1.0",
|
59
|
+
"jest": "^29.5.0",
|
60
|
+
"jest-extended": "^3.2.4",
|
61
|
+
"jsdoc": "3.6.10",
|
62
|
+
"JSONStream": "^1.3.1",
|
63
|
+
"progress": "^2.0.0",
|
64
|
+
"standard": "^17.0.0"
|
65
|
+
},
|
66
|
+
"jest": {
|
67
|
+
"setupFiles": [
|
68
|
+
"dotenv/config"
|
69
|
+
],
|
70
|
+
"setupFilesAfterEnv": [
|
71
|
+
"jest-extended/all"
|
72
|
+
],
|
73
|
+
"coveragePathIgnorePatterns": [
|
74
|
+
"lib/party",
|
75
|
+
"lib/util",
|
76
|
+
"lib/internal",
|
77
|
+
"lib/cache",
|
78
|
+
"node_modules",
|
79
|
+
"lib/index.js",
|
80
|
+
"lib/options.js",
|
81
|
+
"lib/*/on*.js"
|
82
|
+
]
|
83
|
+
},
|
84
|
+
"auto": {
|
85
|
+
"plugins": [
|
86
|
+
"npm",
|
87
|
+
"conventional-commits"
|
88
|
+
],
|
89
|
+
"onlyPublishWithReleaseLabel": true
|
90
|
+
},
|
91
|
+
"engines": {
|
92
|
+
"node": ">=14.14.0"
|
93
|
+
}
|
6
94
|
}
|