repo stringclasses 254
values | file_path stringlengths 29 241 | code stringlengths 100 233k | tokens int64 14 69.4k |
|---|---|---|---|
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/.lune/pesde-scripts/sourcemap-generator.luau | return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator")
| 34 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/.lune/tiniest.luau | local fs = require("@lune/fs")
local tiniest = require("@lune-lib/tiniest/tiniest_for_lune").configure({})
local tests = tiniest.collect_tests(function()
local function visitDir(path: string, luauPath: string)
for _, entry in fs.readDir(path) do
local fullPath = path .. "/" .. entry
local fullLuauPath = luauP... | 218 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/depend.luau | local logger = require("./logger")
local types = require("./types")
local function useBeforeConstructed(unresolved: types.UnresolvedDependency)
logger:fatalError({ template = logger.useBeforeConstructed, unresolved.dependency.name or "subdependency" })
end
local unresolvedMt = {
__metatable = "This metatable is loc... | 202 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/init.luau | local depend = require("@self/depend")
local processDependencies = require("@self/process-dependencies")
local sortByPriority = require("@self/sort-by-priority")
local types = require("@self/types")
export type Dependency<Self, Dependencies = nil, NewArgs... = ()> = types.Dependency<Self, Dependencies, NewArgs...>
re... | 90 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/logger.luau | local logger = require("../logger")
return logger.create("@prvdmwrong/dependencies", logger.standardErrorInfoUrl("dependencies"), {
useBeforeConstructed = "Cannot use %s before it is constructed. Are you using the dependency outside a class method?",
alreadyDestroyed = "Cannot destroy an already destroyed Root.",
a... | 74 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/process-dependencies.luau | local lifecycles = require("../lifecycles")
local types = require("./types")
export type ProccessDependencyResult = {
sortedDependencies: { types.Dependency<any> },
lifecycles: { lifecycles.Lifecycle },
}
type Set<T> = { [T]: true }
local function processDependencies(dependencies: Set<types.Dependency<any>>): Proc... | 386 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "dependencies",
description = "Dependency resolution logic for Prvd 'M Wrong",
types = table.freeze({
["Dependency<Self, Dependencies = nil, NewArgs... = ()>"] = "Dependency<Self, Dependencies, NewArgs...>",
}),
dependencies = ... | 91 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/sort-by-priority.luau | local types = require("./types")
local function sortByPriority(dependencies: { types.Dependency<unknown> })
table.sort(dependencies, function(left: any, right: any)
if left.priority ~= right.priority then
return (left.priority or 1) > (right.priority or 1)
end
local leftIndex = table.find(dependencies, left)... | 104 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/dependencies/types.luau | export type Dependency<Self, Dependencies = nil, NewArgs... = ()> = Self & {
dependencies: Dependencies,
priority: number?,
new: (dependencies: Dependencies, NewArgs...) -> Dependency<Self, Dependencies, NewArgs...>,
}
export type UnresolvedDependency = {
type: "UnresolvedDependency",
dependency: Dependency<any>,... | 88 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/create.luau | local await = require("./methods/await")
local clear = require("./methods/unregister-all")
local destroy = require("./methods/destroy")
local lifecycleConstructed = require("./hooks/lifecycle-constructed")
local methodToLifecycles = require("./method-to-lifecycles")
local onRegistered = require("./methods/on-registered... | 307 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/handlers/fire-concurrent.luau | local runtime = require("../../runtime")
local types = require("../types")
local function fireConcurrent<Args...>(lifecycle: types.Lifecycle<Args...>, ...: Args...)
for _, callback in lifecycle.callbacks do
runtime.threadpool.spawn(callback, ...)
end
end
return fireConcurrent
| 63 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/handlers/fire-sequential.luau | local types = require("../types")
local function fireSequential<Args...>(lifecycle: types.Lifecycle<Args...>, ...: Args...)
for _, callback in lifecycle.callbacks do
callback(...)
end
end
return fireSequential
| 48 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/hooks/lifecycle-constructed.luau | local types = require("../types")
local callbacks: { (lifecycle: types.Lifecycle) -> () } = {}
local function onLifecycleConstructed(listener: (lifecycle: types.Lifecycle) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return... | 90 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/hooks/lifecycle-destroyed.luau | local types = require("../types")
local callbacks: { (lifecycle: types.Lifecycle) -> () } = {}
local function onLifecycleDestroyed(listener: (lifecycle: types.Lifecycle) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return t... | 90 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/hooks/lifecycle-registered.luau | local types = require("../types")
local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {}
local function onLifecycleRegistered<Args...>(
listener: (
lifecycle: types.Lifecycle<Args...>,
callback: (Args...) -> ()
) -> ()
): () -> ()
table.insert(callbacks, listener :: any)
re... | 120 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/hooks/lifecycle-unregistered.luau | local types = require("../types")
local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {}
local function onLifecycleUnregistered<Args...>(
listener: (
lifecycle: types.Lifecycle<Args...>,
callback: (Args...) -> ()
) -> ()
): () -> ()
table.insert(callbacks, listener :: any)
... | 123 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/init.luau | local create = require("@self/create")
local fireConcurrent = require("@self/handlers/fire-concurrent")
local fireSequential = require("@self/handlers/fire-sequential")
local lifecycleConstructed = require("@self/hooks/lifecycle-constructed")
local lifecycleDestroyed = require("@self/hooks/lifecycle-destroyed")
local l... | 247 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/logger.luau | local logger = require("../logger")
return logger.create("@prvdmwrong/lifecycles", logger.standardErrorInfoUrl("lifecycles"), {
useAfterDestroy = "Cannot use Lifecycle after it is destroyed.",
alreadyDestroyed = "Cannot destroy an already destroyed Lifecycle.",
})
| 58 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/method-to-lifecycles.luau | local types = require("./types")
local methodToLifecycles: { [string]: { types.Lifecycle } } = {}
return methodToLifecycles
| 35 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/await.luau | local logger = require("../logger")
local types = require("../types")
local function await<Args...>(lifecycle: types.Self<Args...>): Args...
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.useAfterDestroy })
end
local currentThread = coroutine.running()
local function callback(...: Args...)
... | 104 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/destroy.luau | local lifecycleDestroyed = require("../hooks/lifecycle-destroyed")
local logger = require("../logger")
local methodToLifecycles = require("../method-to-lifecycles")
local types = require("../types")
local function destroy<Args...>(lifecycle: types.Self<Args...>)
if lifecycle._isDestroyed then
logger:fatalError({ te... | 144 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/on-registered.luau | local logger = require("../logger")
local types = require("../types")
local function onRegistered<Args...>(lifecycle: types.Self<Args...>, listener: (callback: (Args...) -> ()) -> ())
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.useAfterDestroy })
end
if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LIS... | 144 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/on-unregistered.luau | local logger = require("../logger")
local types = require("../types")
local function onUnregistered<Args...>(lifecycle: types.Self<Args...>, listener: (callback: (Args...) -> ()) -> ())
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.useAfterDestroy })
end
if _G.PRVDMWRONG_DISALLOW_MULTIPLE_L... | 151 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/register.luau | local logger = require("../logger")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function register<Args...>(lifecycle: types.Self<Args...>, callback: (Args...) -> ())
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.useAf... | 134 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/unregister-all.luau | local logger = require("../logger")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function clear<Args...>(lifecycle: types.Self<Args...>)
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.useAfterDestroy })
end
for _, cal... | 103 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/methods/unregister.luau | local logger = require("../logger")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function unregister<Args...>(lifecycle: types.Self<Args...>, callback: (Args...) -> ())
if lifecycle._isDestroyed then
logger:fatalError({ template = logger.use... | 120 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "lifecycles",
description = "Provider method lifecycles implementation for Prvd 'M Wrong",
dependencies = configure.dependencies({
logger = true,
runtime = true,
}),
types = {
["Lifecycle<Args... = ...unknown>"] = "Lifecycl... | 84 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/lifecycles/types.luau | export type Lifecycle<Args... = ...any> = {
type: "Lifecycle",
callbacks: { (Args...) -> () },
method: string,
register: (self: Lifecycle<Args...>, callback: (Args...) -> ()) -> (),
fire: (self: Lifecycle<Args...>, Args...) -> (),
unregister: (self: Lifecycle<Args...>, callback: (Args...) -> ()) -> (),
clear: ... | 240 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/allow-web-links.luau | local runtime = require("../runtime")
local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true
return allowWebLinks
| 39 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/create.luau | local allowWebLinks = require("./allow-web-links")
local formatLog = require("./format-log")
local runtime = require("../runtime")
local types = require("./types")
local task = runtime.task
local warn = runtime.warn
local function create<T>(label: string, errorInfoUrl: string?, templates: T): types.Logger<T>
local s... | 199 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/format-log.luau | local types = require("./types")
local function formatLog<Templates>(self: types.Logger<Templates>, log: types.Log, errorInfoUrl: string?): string
local formattedTemplate = string.format(log.template, table.unpack(log))
local error = log.error
local trace: string? = log.trace
if error then
trace = error.trace
... | 279 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/init.luau | local allowWebLinks = require("@self/allow-web-links")
local create = require("@self/create")
local formatLog = require("@self/format-log")
local parseError = require("@self/parse-error")
local standardErrorInfoUrl = require("@self/standard-error-info-url")
local types = require("@self/types")
export type Logger<Templ... | 132 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/parse-error.luau | local types = require("./types")
local function parseError(err: string): types.Error
return {
type = "Error",
raw = err,
message = err:gsub("^.+:%d+:%s*", ""),
trace = debug.traceback(nil, 2),
}
end
return parseError
| 66 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "logger",
description = "Logging for Prvd 'M Wrong",
dependencies = configure.dependencies({
runtime = true,
}),
types = {
["Logger<Templates>"] = true,
Log = true,
Error = true,
},
})
| 73 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/standard-error-info-url.luau | local function standardErrorInfoUrl(label: string): string
return `https://prvdmwrong.luau.page/api-reference/{label}/errors`
end
return standardErrorInfoUrl
| 38 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/logger/types.luau | export type Error = {
type: "Error",
raw: string,
message: string,
trace: string,
}
export type Log = {
template: string,
error: Error?,
trace: string?,
[number]: unknown,
}
export type Logger<Templates> = Templates & {
type: "Logger",
print: (self: Logger<Templates>, props: Log) -> (),
warn: (self: Logger... | 129 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/create.luau | local nameOf = require("./name-of")
local providerClasses = require("./provider-classes")
local types = require("./types")
local function createProvider<Self>(self: Self): types.Provider<Self>
local provider: types.Provider<Self> = self :: any
if provider.__index == nil then
provider.__index = provider
end
if ... | 169 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/init.luau | local create = require("@self/create")
local nameOf = require("@self/name-of")
local providerClasses = require("@self/provider-classes")
local types = require("@self/types")
export type Provider<Self, Dependencies = nil> = types.Provider<Self, Dependencies>
local providers = table.freeze({
create = create,
nameOf =... | 89 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/name-of.luau | local types = require("./types")
local function nameOf(provider: types.Provider<any, any>)
return provider.name or "Provider"
end
return nameOf
| 32 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/provider-classes.luau | local types = require("./types")
type Set<T> = { [T]: true }
local providerClasses: Set<types.Provider<any>> = setmetatable({}, { __mode = "k" }) :: any
return providerClasses
| 47 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "providers",
description = "Provider creation for Prvd 'M Wrong",
types = {
["Provider<Self, Dependencies = nil>"] = "Provider<Self, Dependencies>",
},
dependencies = configure.dependencies({
dependencies = true,
logger = t... | 89 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/providers/types.luau | local dependencies = require("../dependencies")
export type Provider<Self, Dependencies = nil> = dependencies.Dependency<Self & {
__index: Provider<Self, Dependencies>,
__tostring: (self: Provider<Self, Dependencies>) -> string,
name: string?,
constructor: ((self: Provider<Self, Dependencies>, dependencies: Depend... | 101 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/prvdmwrong/init.luau | local dependencies = require("./dependencies")
local lifecycles = require("./lifecycles")
local providers = require("./providers")
local roots = require("./roots")
export type Provider<Self, Dependencies = nil> = providers.Provider<Self, Dependencies>
export type Lifecycle<Args... = ...unknown> = lifecycles.Lifecycle<... | 372 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/prvdmwrong/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "prvdmwrong",
description = "Entry point to Prvd 'M Wrong",
types = {
["Lifecycle<Args... = ...unknown>"] = "Lifecycle<Args...>",
["Provider<Self, Dependencies = nil>"] = "Provider<Self, Dependencies>",
Root = true,
StartedR... | 125 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/component-classes.luau | local types = require("./types")
type Set<T> = { [T]: true }
local componentClasses: Set<types.Component<any>> = setmetatable({}, { __mode = "k" }) :: any
return componentClasses
| 47 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/component-provider.luau | local CollectionService = game:GetService("CollectionService")
local componentClasses = require("./component-classes")
local logger = require("./logger")
local providers = require("../providers")
local runtime = require("../runtime")
local types = require("./types")
local threadpool = runtime.threadpool
type Set<T> ... | 1,255 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/create.luau | local componentClasses = require("./component-classes")
local types = require("./types")
-- TODO: prvdmwrong/classes package?
local function create<Self>(self: Self): types.Component<Self, any>
local component: types.Component<Self> = self :: any
if component.__index == nil then
component.__index = component
end... | 155 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/create-component-class-provider.luau | local ComponentProvider = require("../component-provider")
local providers = require("../../providers")
local types = require("../types")
local ComponentClassProvider = {}
ComponentClassProvider.priority = -math.huge
ComponentClassProvider.name = "@rbx-components.ComponentClassProvider"
ComponentClassProvider.dependen... | 178 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/init.luau | local ComponentProvider = require("./component-provider")
local createComponentClassProvider = require("@self/create-component-class-provider")
local logger = require("./logger")
local roots = require("../roots")
local types = require("./types")
local useComponent = require("@self/use-component")
local useComponents = ... | 225 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/use-component.luau | local types = require("../types")
local function useComponent(root: types.RootPrivate, component: types.AnyComponent)
table.insert(root._classes, component)
return root
end
return useComponent
| 40 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/use-components.luau | local types = require("../types")
local function useComponents(root: types.RootPrivate, components: { types.AnyComponent })
for index = 1, #components do
table.insert(root._classes, components[index])
end
return root
end
return useComponents
| 55 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/use-module-as-component.luau | local componentClasses = require("../component-classes")
local types = require("../types")
local function useModuleAsComponent(root: types.RootPrivate, module: ModuleScript)
local required = (require)(module)
if componentClasses[required] then
table.insert(root, required)
end
return root
end
return useModuleAsC... | 70 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/extend-root/use-modules-as-components.luau | local componentClasses = require("../component-classes")
local types = require("../types")
local function useModulesAsComponents(
root: types.RootPrivate,
modules: { Instance },
predicate: ((ModuleScript) -> boolean)?
)
for index = 1, #modules do
local module = modules[index]
if not module:IsA("ModuleScript")... | 139 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/init.luau | local componentClasses = require("@self/component-classes")
local create = require("@self/create")
local extendRoot = require("@self/extend-root")
local types = require("@self/types")
export type Component<Self, Instance = Instance> = types.Component<Self, Instance>
export type Root = types.Root
local components = {
... | 132 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/logger.luau | local logger = require("../logger")
return logger.create("@prvdmwrong/rbx-components", logger.standardErrorInfoUrl("rbx-components"), {
alreadyExtendedRoot = "Root already has component extension.",
invalidComponent = "Not a component, create one with `components(MyComponent)` or `components.create(MyComponent)`.",
... | 123 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "rbx-components",
description = "Component functionality for Prvd 'M Wrong",
unreleased = true,
dependencies = configure.dependencies({
logger = true,
roots = true,
providers = true,
dependencies = true,
}),
})
| 71 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-components/types.luau | local dependencies = require("../dependencies")
local roots = require("../roots")
export type Component<Self, Instance = Instance> = dependencies.Dependency<Self & {
__index: Component<Self, Instance>,
tag: string?,
instanceCheck: (unknown) -> boolean,
blacklistInstances: { Instance }?,
whitelistInstances: { Inst... | 266 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-lifecycles/init.luau | local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local prvd = require("./prvdmwrong")
local fireConcurrent = prvd.fireConcurrent
local RbxLifecycles = {}
RbxLifecycles.name = "@prvdmwrong/rbx-lifecycles"
RbxLifecycles.priority = -math.huge
RbxLifecycles.preSimulation = prv... | 653 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/rbx-lifecycles/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "rbx-lifecycles",
description = "Lifecycles implementations for Roblox",
pesdeTargets = {
roblox = true,
},
dependencies = configure.dependencies({
prvdmwrong = true,
}),
})
| 69 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/create.luau | local destroy = require("./methods/destroy")
local lifecycles = require("../lifecycles")
local rootConstructing = require("./hooks/root-constructing")
local start = require("./methods/start")
local types = require("./types")
local useModule = require("./methods/use-module")
local useModules = require("./methods/use-mod... | 322 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/lifecycle-used.luau | local lifecycles = require("../../lifecycles")
local types = require("../types")
local callbacks: { (root: types.Self, provider: lifecycles.Lifecycle) -> () } = {}
local function onLifecycleUsed(listener: (root: types.Root, lifecycle: lifecycles.Lifecycle) -> ()): () -> ()
table.insert(callbacks, listener)
return f... | 115 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/provider-used.luau | local providers = require("../../providers")
local types = require("../types")
local callbacks: { (root: types.Self, provider: providers.Provider<unknown>) -> () } = {}
local function onProviderUsed(listener: (root: types.Root, provider: providers.Provider<unknown>) -> ()): () -> ()
table.insert(callbacks, listener)... | 108 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/root-constructing.luau | local types = require("../types")
local callbacks: { (root: types.Self) -> () } = {}
local function onRootConstructing(listener: (root: types.Root) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return table.freeze({
callbac... | 90 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/root-destroyed.luau | local types = require("../types")
local callbacks: { (root: types.Self) -> () } = {}
local function onRootDestroyed(listener: (root: types.Root) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return table.freeze({
callbacks ... | 87 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/root-finished.luau | local types = require("../types")
local callbacks: { (root: types.Self) -> () } = {}
local function onRootFinished(listener: (root: types.Root) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return table.freeze({
callbacks =... | 87 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/root-started.luau | local types = require("../types")
local callbacks: { (root: types.Self) -> () } = {}
local function onRootStarted(listener: (root: types.Root) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
end
return table.freeze({
callbacks = ... | 87 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/hooks/root-used.luau | local types = require("../types")
local callbacks: { (root: types.Self, subRoot: types.Root) -> () } = {}
local function onRootUsed(listener: (root: types.Root, subRoot: types.Root) -> ()): () -> ()
table.insert(callbacks, listener)
return function()
table.remove(callbacks, table.find(callbacks, listener))
end
e... | 99 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/init.luau | local create = require("@self/create")
local lifecycleUsed = require("@self/hooks/lifecycle-used")
local providerUsed = require("@self/hooks/provider-used")
local rootConstructing = require("@self/hooks/root-constructing")
local rootDestroyed = require("@self/hooks/root-destroyed")
local rootFinished = require("@self/h... | 220 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/logger.luau | local logger = require("../logger")
return logger.create("@prvdmwrong/roots", logger.standardErrorInfoUrl("roots"), {
useAfterDestroy = "Cannot use Root after it is destroyed.",
alreadyDestroyed = "Cannot destroy an already destroyed Root.",
alreadyFinished = "Root has already finished.",
})
| 63 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/destroy.luau | local logger = require("../logger")
local types = require("../types")
local function destroy(root: types.Self)
if root._destroyed then
logger:fatalError({ template = logger.alreadyDestroyed })
end
root._destroyed = true
table.clear(root._rootLifecycles)
table.clear(root._rootProviders)
table.clear(root._subRoo... | 94 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/start.luau | local dependencies = require("../../dependencies")
local lifecycles = require("../../lifecycles")
local logger = require("../logger")
local providers = require("../../providers")
local rootFinished = require("../hooks/root-finished").callbacks
local rootStarted = require("../hooks/root-started").callbacks
local types =... | 716 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-lifecycle.luau | local lifecycleUsed = require("../hooks/lifecycle-used").callbacks
local lifecycles = require("../../lifecycles")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useLifecycle(root: types.Self, lifecycle: lifecycles.Lifecycle)
table.inser... | 98 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-lifecycles.luau | local lifecycleUsed = require("../hooks/lifecycle-used").callbacks
local lifecycles = require("../../lifecycles")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useLifecycles(root: types.Self, lifecycles: { lifecycles.Lifecycle })
for _... | 120 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-module.luau | local providerUsed = require("../hooks/provider-used").callbacks
local providers = require("../../providers")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local providerClasses = providers._.providerClasses
local function useModule(root: types.Self, ... | 144 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-modules.luau | local providerUsed = require("../hooks/provider-used").callbacks
local providers = require("../../providers")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local providerClasses = providers._.providerClasses
local function useModules(root: types.Self,... | 193 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-provider.luau | local providerUsed = require("../hooks/provider-used").callbacks
local providers = require("../../providers")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useProvider(root: types.Self, provider: providers.Provider<unknown>)
root._root... | 88 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-providers.luau | local providerUsed = require("../hooks/provider-used").callbacks
local providers = require("../../providers")
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useProviders(root: types.Self, providers: { providers.Provider<unknown> })
for ... | 101 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-root.luau | local rootUsed = require("../hooks/root-used").callbacks
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useRoot(root: types.Self, subRoot: types.Root)
root._subRoots[subRoot] = true
threadpool.spawnCallbacks(rootUsed, root, subRoot)
r... | 82 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/use-roots.luau | local rootUsed = require("../hooks/root-used").callbacks
local runtime = require("../../runtime")
local types = require("../types")
local threadpool = runtime.threadpool
local function useRoots(root: types.Self, subRoots: { types.Root })
for _, subRoot in subRoots do
root._subRoots[subRoot] = true
threadpool.spa... | 100 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/will-finish.luau | local types = require("../types")
local function willFinish(root: types.Self, callback: () -> ())
root._finish:register(callback)
return root
end
return willFinish
| 38 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/methods/will-start.luau | local types = require("../types")
local function willStart(root: types.Self, callback: () -> ())
root._start:register(callback)
return root
end
return willStart
| 38 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "roots",
description = "Roots implementation for Prvd 'M Wrong",
types = {
Root = true,
StartedRoot = true,
},
dependencies = configure.dependencies({
dependencies = true,
logger = true,
lifecycles = true,
runtime = t... | 91 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/roots/types.luau | local lifecycles = require("../lifecycles")
local providers = require("../providers")
type Set<T> = { [T]: true }
export type Root = {
type: "Root",
start: (root: Root) -> StartedRoot,
useModule: (root: Root, module: ModuleScript) -> Root,
useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScrip... | 342 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/batteries/threadpool.luau | local task = require("../libs/task")
local freeThreads: { thread } = {}
local function run<T...>(f: (T...) -> (), thread: thread, ...)
f(...)
table.insert(freeThreads, thread)
end
local function yielder()
while true do
run(coroutine.yield())
end
end
local function spawn<T...>(f: (T...) -> (), ...: T...)
loca... | 201 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/init.luau | local types = require("@self/../types")
type Implementation<T> = { new: (() -> T)?, implementation: T? }
export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"
local supportedRuntimes = table.freeze({
roblox = require("@self/roblox"),
luau = require("@self/luau"),
lune = require("@self/lu... | 395 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/luau.luau | local types = require("../types")
return types.Runtime({
name = "luau",
priority = -1,
is = function()
return true
end,
})
| 34 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/lune.luau | local types = require("../types")
local LUNE_VERSION_FORMAT = "(Lune) (%d+%.%d+%.%d+.*)+(%d+)"
return types.Runtime({
name = "lune",
is = function()
return string.match(_VERSION, LUNE_VERSION_FORMAT) ~= nil
end,
})
| 66 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/lute.luau | local types = require("../types")
return types.Runtime({
name = "lute",
is = function()
return false
end,
})
| 28 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/roblox.luau | local types = require("../types")
return types.Runtime({
name = "roblox",
is = function()
-- wtf
return not not (_VERSION == "Luau" and game and workspace)
end,
})
| 46 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/seal.luau | local types = require("../types")
return types.Runtime({
name = "seal",
is = function()
return false
end,
})
| 28 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/implementations/zune.luau | local types = require("../types")
local ZUNE_VERSION_FORMAT = "(Zune) (%d+%.%d+%.%d+.*)+(%d+%.%d+)"
return types.Runtime({
name = "zune",
is = function()
return string.match(_VERSION, ZUNE_VERSION_FORMAT) ~= nil
end,
})
| 70 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/init.luau | local implementations = require("@self/implementations")
local task = require("@self/libs/task")
local threadpool = require("@self/batteries/threadpool")
local warn = require("@self/libs/warn")
export type RuntimeName = implementations.RuntimeName
return table.freeze({
name = implementations.currentRuntimeName,
ta... | 78 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/libs/task.luau | local implementations = require("../implementations")
export type TaskLib = {
cancel: (thread) -> (),
defer: <T...>(functionOrThread: thread | (T...) -> (), T...) -> thread,
delay: <T...>(duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread,
spawn: <T...>(functionOrThread: thread | (T...) -> ... | 1,053 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/libs/warn.luau | local implementations = require("../implementations")
local supportedRuntimes = implementations.supportedRuntimes
local implementFunction = implementations.implementFunction
local function tostringTuple(...: any)
local stringified = {}
for index = 1, select("#", ...) do
table.insert(stringified, tostring(select(i... | 177 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "runtime",
description = "Runtime agnostic libraries for Prvd 'M Wrong",
types = {
RuntimeName = true,
},
})
| 46 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/runtime/types.luau | export type Runtime = {
name: string,
priority: number?,
is: () -> boolean,
}
local function Runtime(x: Runtime)
return table.freeze(x)
end
return table.freeze({
Runtime = Runtime,
})
| 44 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/packages/typecheckers/prvd.config.luau | local configure = require("@lune-lib/configure")
return configure.package({
name = "typecheckers",
description = "Typechecking primitives and compatibility for Prvd 'M Wrong",
})
| 38 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/sitegen/build.luau | local fs = require("@lune/fs")
local h = require("./h")
local path = require("@lune-lib/utils/path")
local process = require("@lune/process")
local siteUrls = require("@sitegen/config/site-urls")
local sitemap = require("@sitegen/config/sitemap")
local rootPath = process.args[1]
pcall(fs.removeDir, "site")
fs.copy(pa... | 196 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/sitegen/components/article.luau | local Document = require("./document")
local h = require("@sitegen/h")
local siteBaseUrl = require("@sitegen/utils/site-base-url")
export type ArticleSection = {
title: string,
content: { h.Child },
sections: { ArticleSection }?,
}
local headings = {
h.h1,
h.h2,
h.h3,
h.h4,
h.h5,
h.h6,
}
local defaultHeadin... | 335 |
team-fireworks/prvdmwrong | team-fireworks-prvdmwrong-a935ae2/sitegen/components/button.luau | local h = require("@sitegen/h")
local function Button(props: {
href: string,
[number]: h.Child,
})
return h.a({
href = props.href,
class = "button",
table.unpack(props),
})
end
return Button
| 56 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.