repo
stringclasses
302 values
file_path
stringlengths
18
241
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
76
697k
tokens
int64
10
271k
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Command_Remover.luau
luau
.luau
--!strict --[[ Author: Sceleratis (Davey_Bones) Description: This plugin will remove certain commands Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-Command_Remover" --]] local COMMANDS_TO_REMOVE: {string} = { --// List of command indices or names to remove "kill", "DonorHat", ...
227
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-CustomRankCommand.luau
luau
.luau
return function(Vargs) local server, service = Vargs.Server, Vargs.Service local Settings = server.Settings local Commands = server.Commands local Functions = server.Functions local Admin = server.Admin Commands.VIP = { Prefix = Settings.Prefix; Commands = {"vip"}; ...
253
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-DisableOldlogs.luau
luau
.luau
--!nonstrict --[[ Author: joritochip Name: Disable oldlogs Description: This plugin allows you to fully disable Adonis old logs Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-DisableOldlogs" --]] return function(Vargs) local server, service = Vargs.Server, Vargs.Service server....
169
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-DiscordWebhookLogs.luau
luau
.luau
--!nonstrict --[[ Original Author: crywink Rewrite Author: Expertcoderz Name: Server-DiscordWebhookLogs Description: Enables logging of commands to a Discord webhook Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-DiscordWebhookLogs" NOTICE: Discord has blocked Roblox from sending ...
832
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Free_Admin.luau
luau
.luau
--!nonstrict --[[ Author: Sceleratis (Davey_Bones) Description: This plugin gives admin to every non-admin player who joins Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-Free_Admin" --]] local FREE_ADMIN_LEVEL: number = 100 --// Level of admin to give everyone; rank levels are defin...
311
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Gear_Blacklist.luau
luau
.luau
--!nonstrict --[[ Name: Gear Blacklist Author: Sceleratis (Davey_Bones) Description: This plugins allows for the blacklisting of certain IDs from the :gear command Place in a ModuleScript under Adonis_Loader > Config > Plugins and name it "Server-Gear_Blacklist" --]] local BLACKLISTED_GEAR_IDS: {number} = { --// ...
347
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Leaderstat_Protector.luau
luau
.luau
--!nonstrict --[[ Author: Expertcoderz Description: Prevents certain leaderstat values from being changed by admins using :change, :add or :subtract Place this in a ModuleScript under Adonis_Loader > Config > Plugins and name it "Server-Leaderstat_Protector" ]] type Permission = string|number|{string|number} --//...
355
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PlayerCollisions.luau
luau
.luau
--!nonstrict --[[ Author: Sceleratis (Davey_Bones) Name: Server-NoPlayerCollide Description: Adds :collisions, :nocollide, :resetcollisions and :setdefaultcollision commands; enables/disables character-to-character collisions per player Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Se...
1,483
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PlayerSelector_Restrictor.luau
luau
.luau
--!strict --[[ Author: Sceleratis/Davey_Bones and Expertcoderz Description: This plugin will restrict any player selectors (all, others, me, etc.) to a specific admin level only. This plugin can also protect admins with certain levels from being selected using player selectors. Place this ModuleScrip...
867
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PrivateServerOwnerAdmin.luau
luau
.luau
--!strict --[[ Original Author: TacoBellSaucePackets Original Source: https://devforum.roblox.com/t/adonis-g-api-usage/477194/4 Description: This plugin will give a certain temporary permission level to private server owners Place this ModuleScript in Adonis_Loader > Config > Plugins and name it "Server-PrivateSer...
254
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-RemoteAdmin.luau
luau
.luau
--!nonstrict --[[ Author: EasternBloxxer Description: This plugin enables the setting of certain players' admin ranks via a BindableEvent Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-RemoteAdmin" Usage: AdminRemote:Fire(player: Player, key: string, adminLevel: string | number...
421
Epix-Incorporated/Adonis-Plugins
Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Uninspiration.luau
luau
.luau
--!strict --[[ Author: pbstFusion Name: Server-Uninspiration Description: To provide people with text that is not vaguely inspiring, nor helpful. Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-Uninspiration" --]] return function(Vargs) local server, service = Vargs.Server, Vargs.Se...
457
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/TestRoot/jest.config.lua
luau
.lua
local Workspace = script.Parent return { setupFilesAfterEnv = { Workspace.testSetupFile }, testMatch = { "**/*.(spec|test)?(.lua|.luau)", "**/__tests__/index" }, snapshotSerializers = { Workspace.normalizeStackTraces }, }
56
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/TestRoot/normalizeStackTraces.lua
luau
.lua
local function removeRootFromStackTrace(line: string): string return line:gsub("LoadedCode.JestRoblox.", ""):gsub("ReplicatedStorage.Packages.", "") end local function serialize(val: string | { [any]: any }, config, indentation, depth, refs, printer): string if typeof(val) == "table" then val.message = removeRootF...
231
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/TestRoot/testSetupFile.lua
luau
.lua
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]] -- Some of the `jest-runtime` tests are very slow and cause -- timeouts on travis -- jest.setTimeout(70000) ...
134
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/scripts/analyze.luau
luau
.luau
local run = require("./utils/run") print("Running static analysis...") local seleneCmd = { "selene", "src" } local styluaCmd = { "stylua", "-c", "src" } local analyzeCmd = { "robloxdev-cli", "analyze", "default.project.json", "--fastFlags.allOnLuau" } run(seleneCmd) run(styluaCmd) run(analyzeCmd)
90
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/scripts/utils/patchErrorPolyfill.luau
luau
.luau
local fs = require("@std/fs") local OPTIMIZE_DIRECTIVE = "--!optimize 1" return function(path) local file = fs.open(path, "r+") if file == nil then error(`Failed to open file: {path}`) end local contents = string.split(fs.readFileToString(path), "\n") if contents[1] ~= OPTIMIZE_DIRECTIVE then table.insert(...
112
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/scripts/utils/run.luau
luau
.luau
local process = require("@lute/process") return function(cmd) print(`> {table.concat(cmd, " ")}`) local ok, result = pcall(function() return process.run(cmd, { stdio = "inherit", env = { PATH = `{process.cwd()}:{process.env.PATH}` } }) end) if not ok then error(result) end if result.ok then print(result...
110
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/CustomReporters.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
301
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/MetricLogger.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
297
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/__tests__/utils.lua
luau
.lua
local exports = {} local function sum(nums: { number }) local sum = 0 for _, num in nums do sum += num end return sum end exports.sum = sum local function average(nums: { number }) if #nums > 0 then return sum(nums) / #nums end return 0 end exports.average = average return exports
83
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/benchmark.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
764
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/heartbeatModule.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
179
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/init.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
225
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/reporters/FpsReporter.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
279
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/reporters/HeartbeatReporter.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
453
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/reporters/SectionTimeReporter.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
360
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-benchmark/src/testModule.lua
luau
.lua
--!strict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law...
203
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-circus/src/init.lua
luau
.lua
-- ROBLOX upstream: no upstream --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless requ...
226
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-console/src/helpers.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
555
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-diff/src/PrettyFormat.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
335
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-each/src/nilPlaceholder.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
188
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-globals/src/init.lua
luau
.lua
-- /** -- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -- * -- * This source code is licensed under the MIT license found in the -- * LICENSE file in the root directory of this source tree. -- * -- */ -- ROBLOX deviation START: add export for additional Expect types local Packages = sc...
133
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-mock-genv/src/init.lua
luau
.lua
--!nonstrict -- ROBLOX NOTE: no upstream --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Un...
1,380
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-mock-rbx/src/DataModelMocker.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
604
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-mock-rbx/src/init.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
265
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-runtime/src/__tests__/mock_me.lua
luau
.lua
-- ROBLOX NOTE: no upstream local exports = {} exports.mocked = false exports.actual = true return exports
28
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-runtime/src/__tests__/rbs_native_errors.global.lua
luau
.lua
-- Captures the actual error messages from the native require for @rbx and @std -- passthrough paths. These vary across roblox-cli versions, so we capture them -- dynamically rather than hardcoding expected strings. -- -- This module must be loaded with the real Roblox native require, NOT Jest's -- sandboxed require. ...
201
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-runtime/src/__tests__/test_fenv/init.lua
luau
.lua
-- ROBLOX NOTE: no upstream local Packages = script.Parent.Parent.Parent local JestGlobals = require(Packages.Dev.JestGlobals) local jest = JestGlobals.jest return { game = game, workspace = workspace, jest = jest, }
55
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-runtime/src/_types.lua
luau
.lua
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]] -- ROBLOX NOTE: Not paired with upstream. Just using for the "Jest Object" type local CurrentModule = scrip...
395
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-runtime/src/resolveInstancePath.lua
luau
.lua
local PATH_SEPARATOR = "/" local PASSTHROUGH_PREFIXES = { "@std", "@rbx" } local function resolveInstancePath(relativeTo: Instance, instancePath: string): Instance? local parts = instancePath:split(PATH_SEPARATOR) local firstPart = parts[1] for _, prefix in PASSTHROUGH_PREFIXES do if firstPart == prefix then ...
582
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest-util/src/getFileSystemService.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
278
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/jest/src/args.roblox.lua
luau
.lua
local processServiceExists, ProcessService = pcall(function() return game:GetService("ProcessService") end) local args = {} if processServiceExists then for _, arg in ProcessService:GetCommandLineArgs() do local a = arg:split("=") a[1] = a[1]:gsub("^%-%-", "") args[a[1]] = a[2] or true end end return args
90
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/path/src/init.lua
luau
.lua
local CurrentModule = script local pathModule = require(CurrentModule.path) local Path = pathModule.Path export type Path = pathModule.Path function makePathImpl() local path = Path.new() path:initialize("/", "/") return path end return { path = makePathImpl(), Path = Path, }
65
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/pretty-format/src/__tests__/dont_touch_im_used_in_snapshots/please_dont_touch_this.lua
luau
.lua
--[[ I copied this folder into here for testing purposes. Specifically, one of the unit tests tries to serialise this folder, and saves the result to a snapshot. If the snapshot changes, the test fails. So if you touch this folder, you'll break that test. Apart from that, nothing in here does any...
77
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/pretty-format/src/plugins/RedactStackTraces.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
560
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/pretty-format/src/plugins/RobloxInstance.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
1,198
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/RobloxInstance.lua
luau
.lua
--!nonstrict --[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable ...
1,960
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/Writeable.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
292
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/__tests__/getParent.test.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
526
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/cleanLoadStringStack.lua
luau
.lua
return function(line: string): string local spacing, filePath, lineNumber, extra = line:match('(%s*)%[string "(.-)"%]:(%d+)(.*)') if filePath then local match = filePath if spacing then match = spacing .. match end if lineNumber then match = match .. ":" .. lineNumber end if extra then match = ma...
107
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/ensureDirectoryExists.lua
luau
.lua
-- moved from jest-snapshot/utils.lua local Packages = script.Parent.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Error = LuauPolyfill.Error local getParent = require(script.Parent.getParent) local getDataModelService = require(script.Parent.getDataModelService) local FileSystemService = getDataM...
241
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/escapePatternCharacters.lua
luau
.lua
local function escapePatternCharacters(str: string): string return string.gsub(str, "([%(%)%.%%%+%-%*%?%[%^%$])", "%%%1") end return { escapePatternCharacters = escapePatternCharacters, }
52
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/getDataModelService.lua
luau
.lua
-- checks that the service exists and is accessible before returning it, otherwise returns nil return function(service: string) local success, result = pcall(function() local service = game:GetService(service) local _ = service.Name return service end) return success and result or nil end
63
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/getParent.lua
luau
.lua
-- ROBLOX deviation: added to handle file paths in snapshot/State local function getParent(path: string, level_: number?): string local level = if level_ then level_ else 0 local isUnixPath = string.sub(path, 1, 1) == "/" local t = {} for p in string.gmatch(path, "[^\\/][^\\/]*") do table.insert(t, p) end if ...
147
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/getRelativePath.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
224
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/init.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
371
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/nodeUtils.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
384
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/normalizePromiseError.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
344
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/pruneDeps.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
276
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/redactStackTrace.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
420
Roblox/jest-roblox
Roblox-jest-roblox-fabf3ae/src/roblox-shared/src/stripAnsi.lua
luau
.lua
--[[ * Copyright (c) Roblox Corporation. All rights reserved. * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * Unless required by applicable law or agreed...
200
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/badger/init.luau
luau
.luau
--[[ badger badge service wrapper ]] local BadgeService = game:GetService("BadgeService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") export type Badge = { index: number, id: number, } type PlayerInfo = { threads_waiting_for_id: { [number]: { thread } }, threads...
1,893
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/character/init.luau
luau
.luau
--[[ character simple utility module for getting accurate character types, and with a special added function that also runs the callback if the player already has a character ]] local Players = game:GetService("Players") export type Character = Model & { Humanoid: Humanoid & { HumanoidDescription: Hu...
1,312
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/cross/init.luau
luau
.luau
--!nocheck --!nolint --[[ cross basic cross runtime utility, covering the bear nessisities ]] local cross_task = require("@self/task") local cross_warn = require("@self/warn") type Runtime = "Roblox" | "Lune" | "Unknown" | "Lute" local RUNTIME: Runtime = if game and workspace then "Roblox" elseif string.find(_...
393
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/cross/task.luau
luau
.luau
--[[ task a good enough pure luau version of roblox's task lib that doesn't require wrapping ur whole script in a task.spawn or anything ]] local function SPAWN<A..., R...>( thread_or_func: thread | (A...) -> R..., ...: A... ): thread if type(thread_or_func) == "thread" then coroutine.resume(thread_or_func, ...
364
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/cross/test.luau
luau
.luau
local testkit = require("@testkit") local cross = require("./init") local TEST, CASE, CHECK, FINISH, SKIP = testkit.test() TEST("cross", function() do CASE("check globals") CHECK( task.cancel == cross.cancel and task.spawn == cross.spawn and task.defer == cross.defer and task.wait == cross.wait and ...
691
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/cross/warn.luau
luau
.luau
--!native --[[ warn pure luau version of roblox's warn global ]] local function warn(...: unknown) print(`\27[0;33m{table.concat({ ... }, " ")}\27[0m`) end return warn
57
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/grouper/init.luau
luau
.luau
--!optimize 2 --!native --[[ Grouper Used for getting the latest group rank or role of a player on the server, and reducing groups api requests as only the server will make the requests and then send down the rank & role for a player. Rather than using Player:GetRankInGroup() on the client, and end up constant...
2,154
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/leaderstats/init.luau
luau
.luau
--[[ leaderstats roblox leaderstats wrapper providing a nicer api, compared to dealing with instances directly ]] local RunService = game:GetService("RunService") local Players = game:GetService("Players") type AllowedValues = number | string type AllowedDefaults = "float" | "string" | "integer" | AllowedValues ...
2,181
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/leventine/test.luau
luau
.luau
local testkit = require("@testkit") local leventine = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() TEST("leventine", function() do CASE("score_32") CHECK( leventine.score("hi hello im meowing so much rn", "and IM A SERTIFIED MEOW HATER :(") == 27 ) end do CASE("score_32_sensitive") ...
238
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/linkedlist/test.luau
luau
.luau
local testkit = require("@testkit") local linkedlist = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() TEST("linked list", function() end)
40
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/loganalytics/init.luau
luau
.luau
--[[ loganalytics a simple wrapper around AnalyticsService's bad api, that makes it into a decent api ]] local AnalyticsService = game:GetService("AnalyticsService") export type CustomFields = { [string]: string } type ConvertedCustomFields = { [Enum.AnalyticsCustomFieldKeys]: string }? type BaseAnalyticsInfo = ...
1,296
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/pagesutil/init.luau
luau
.luau
--[[ pagesutil utility for dealing with roblox page instances easily ]] export type PageInfo = { item_index: number, page_len: number, page: number, } local ADVANCE_ERR_FORMAT = "[PAGES]: an error occurred while trying to advance to the next page\n\tadvance-next-page-err: %s" local pagesutil = {} function pag...
555
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/playerloaded/init.luau
luau
.luau
--[[ player loaded handles callbacks for a player loaded remote, because having a player loaded remote is a good idea so you don't fill up the remote queue for a player before they've been able to receive remote events ]] local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetSe...
1,192
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/playerzone/init.luau
luau
.luau
--!native --[[ playerzone simple util module for detecting players in rectangular zones ]] local RunService = game:GetService("RunService") local Players = game:GetService("Players") local character = require("@libs/character") export type ZoneType = "WHITELIST" | "BLACKLIST" type BaseZone = { callback: (charact...
1,526
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/playerzone/test.luau
luau
.luau
local testkit = require("@testkit") -- local playerzone = require("init") local TEST, CASE, CHECK, FINISH = testkit.test() local NOOP = function() end TEST("player zone", function() -- cannot actually run this test rn, because of the game global not being set -- because it cant be set because of a lune bug :( if ...
164
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/plugtilly/init.luau
luau
.luau
--[[ plugtilly roblox plugin utility ]] export type DockWidgetPluginGuiInfo = { initally_enabled_should_override_restore: boolean, inital_dock_state: Enum.InitialDockState, initally_enabled: boolean, inital_size: vector, min_size: vector?, title: string?, } export type Setting<V> = (value: V?) -> V local SE...
752
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/race/init.luau
luau
.luau
--[[ race a function for getting the first return out of a vararg of functions ]] local cross = require("@libs/cross") local function callback_handler<A..., R...>( f: (A...) -> R..., threads: { thread }, main_thread: thread, ...: A... ) local callback_thread = coroutine.running() local results = { f(...) } f...
230
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/race/test.luau
luau
.luau
local testkit = require("@testkit") local task = require("@lune/task") local race = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() TEST("RACE", function() CASE("MAIN") local result = race({ function(str: string) task.wait(5) return `{str}! i never return ;c` end, function(str: strin...
131
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/random/init.luau
luau
.luau
--!native --[[ random pure luau functional equivalent to Roblox's random class ]] type SetState<V> = (v: V) -> () type MinMaxMethod<S, MIN, MAX, R> = (set_state: SetState<S>, min: MIN, max: MAX, seed: S) -> R type Method<S, V, R...> = (set_state: SetState<S>, v: V, seed: S) -> R... --[[ Generates pseudorandom n...
1,870
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/random/test.luau
luau
.luau
local testkit = require("@testkit") local random = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() local CAT_SOUNDS = { "meow", "mrrp", "mrow" } local function HAS_SAME_VALUES(a: { unknown }, b: { unknown }): boolean for _, value in a do if not table.find(a, value) then return false end en...
713
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/rbxdeeplink/init.luau
luau
.luau
--!native --[[ rbx deeplink utility functions for dealing w roblox deeplinks ]] local url = require("@libs/url") local REGULAR_FORMAT = "https://www.roblox.com/games/start?placeId=%*&launchData=%*" local APPSFLYER_FORMAT = "https://ro.blox.com/Ebh5?af_dp=%*&af_web_dp=%*" local DATA_LEN_LIMIT = 200 local DATA_LEN_E...
423
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/rbxdeeplink/test.luau
luau
.luau
local testkit = require("@testkit") local rbxdeeplink = require("./init") local url = require("../url") local TEST, CASE, CHECK, FINISH = testkit.test() TEST("rbxdeeplink", function() do CASE("get_launchdata") local launchdata = "https://libs.luau.lol/lmao&meow=mrrp&mrrp=meow&launchdata=kitty catters unite now!" ...
286
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/rbxsafeconn/init.luau
luau
.luau
--[[ rbxsafeconn utility for safely connecting to commonly used events where you'd also iterate through some instances ]] local CollectionService = game:GetService("CollectionService") local Players = game:GetService("Players") local character = require("@libs/character") local PLAYER_ADDED = Players.PlayerAdded ...
276
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/rbxthumb/init.luau
luau
.luau
--[[ rbxthumb module for easily creating roblox thumbnail urls, based on Nevermore's rbxthumbutil although with types ]] type PlayerThumbnailFormatter<S> = (player: Player, size: S?, circular: boolean?) -> Content type ThumbnailFormatter<S> = (id: number, size: S?, circular: boolean?) -> Content export type Thumb...
1,341
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/rbxthumb/test.luau
luau
.luau
local testkit = require("@testkit") local rbxthumb = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() local BASE_URL = "rbxthumb://type=%s&id=%d&w=%d&h=%d" local CIRCULAR_URL = `{BASE_URL}&filters=circular` local PLAYER_AUTO_GENERATED_METHODS: { [string]: (player: { UserId: number }, size: string?,...
816
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/retryer/init.luau
luau
.luau
--!native --[[ Retryer Utility for retrying functions easily ]] local cross = require("@libs/cross") local WAIT = cross.wait local function INSURE_MAX_RETRIES_GREATER_THAN_ONE(max_retries: number) if max_retries <= 1 then error("[RETRYER]: max_retries cannot be less than 2") end end local retryer = {} --[[ ...
1,333
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/retryer/test.luau
luau
.luau
local testkit = require("@testkit") local retryer = require("@libs/retryer") local TEST, CASE, CHECK, FINISH = testkit.test() local NOOP = function() end local ATTEMPTS = 0 local function ENDS_WITH(s: string, ends_with: string): boolean return string.sub(s, #s - #ends_with + 1, #s) == ends_with end local function m...
1,041
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/safe-teleport/init.luau
luau
.luau
--[[ safe teleport wrapper for TeleportService:TeleportAsync() with automatic retries, and a better typed api based on the SafeTeleport example function on Roblox's docs: https://create.roblox.com/docs/projects/teleport#handle-failed-teleports ]] local TeleportService = game:GetService("TeleportService") local re...
1,699
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/stack-tree/init.luau
luau
.luau
--!native --[[ stack tree library for generating tree structures for nodes on a shelf to prevent floating nodes from ever happening ]] local random = require("@libs/random") export type FaceTowardsSide = "Front" | "Back" | "Left" | "Right" -- TaperType names are referring to roof types, ie bloxburg roof types exp...
4,732
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/textchat/init.luau
luau
.luau
--[[ textchat utility for TextChatService, making adding/removing, and muting TextSources easier alongside providing some utilities for chat visuals ]] local TextChatService = game:GetService("TextChatService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") type UserId...
1,595
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/url/init.luau
luau
.luau
--!native --[[ url utility functions for encoding and decoding urls ]] export type SpaceEncoding = "+" | "%20" local FORMAT = string.format local GMATCH = string.gmatch local GSUB = string.gsub local function CHAR_TO_CODE(char: string): string return FORMAT("%%%02X", string.byte(char)) end local function COD...
451
gaymeowing/luauberries
gaymeowing-luauberries-056d795/libs/url/test.luau
luau
.luau
local testkit = require("@testkit") local url = require("./init") local TEST, CASE, CHECK, FINISH = testkit.test() TEST("url", function() do CASE("encode %%20") CHECK(url.encode("Je suis allé au cinéma.") == "Je%20suis%20all%C3%A9%20au%20cin%C3%A9ma.") end do CASE("encode +") CHECK(url.encode("Je suis allé au...
373
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/deep_iter_dir.luau
luau
.luau
--[[ deep iter dir recursively iterates over a directory and calls a callback that can then optionally move or change the contents of the file ]] local read_dir = require("@scripts/read_dir") local remove = require("@scripts/remove") local fs = require("@lune/fs") type BaseFileInfo<N, P> = { contents: (string |...
516
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/deep_iter_scripts.luau
luau
.luau
--[[ deep iter scripts recursively iterates over every luau file in a directory and calls a callback that can then optionally overwrite the file ]] local deep_iter_dir = require("@scripts/deep_iter_dir") type IterScriptsCallback = ((path: string, src: string, depth: number) -> string?) | ((path: string, src: str...
191
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/depgraph.luau
luau
.luau
--[[ dep graph module for generating a dependency graph for all libraries ]] local deep_iter_scripts = require("@scripts/deep_iter_scripts") local require_pattern = require("@scripts/require_pattern") local read_dir = require("@scripts/read_dir") local remove = require("@scripts/remove") local process = require("@l...
620
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/depricate/init.luau
luau
.luau
--[[ depricate makes a library depricated ]] local process = require("@lune/process") local fs = require("@lune/fs") local ARGS = process.args local ALT_FORMAT = fs.readFile("scripts/depricate/ALT_FORMAT.md") local FORMAT = fs.readFile("scripts/depricate/FORMAT.md") local LIB = ARGS[1] local INSTEAD for index, ar...
188
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/docs.luau
luau
.luau
--[[ docs generates sidebar, and homepage ]] local deep_iter_dir = require("@scripts/deep_iter_dir") local read_dir = require("@scripts/read_dir") local gsub = require("@scripts/gsub") local serde = require("@lune/serde") local fs = require("@lune/fs") type SidebarItem = { text: string, link: string } type Libdoc...
846
gaymeowing/luauberries
gaymeowing-luauberries-056d795/scripts/get_depth_for_path.luau
luau
.luau
--[[ get depth for path gives how deep a path is (the amount of backslashes it has) ]] local function get_depth_for_path(path: string) return #string.split(path, "/") end return get_depth_for_path
51