diff --git a/.lune/lib/configure.luau b/.lune/lib/configure.luau deleted file mode 100644 index 7d84c8ff..00000000 --- a/.lune/lib/configure.luau +++ /dev/null @@ -1,81 +0,0 @@ --- Repository - -export type RootPublisher = { - scope: string, - registry: string, -} - -local function publisher(x: RootPublisher) - return table.freeze(x) -end - -export type RepoConfig = { - repository: string, - homepage: string, - packageDir: string, - defaults: { - authors: { string }, - license: string, - version: string, - }, - publishers: { - pesde: RootPublisher, - wally: RootPublisher, - npm: RootPublisher, - } -} - -local function root(x: RepoConfig) - return table.freeze(x) -end - --- Packages - -export type PackageName = - | "prvdmwrong" - | "runtime" - | "logger" - | "dependencies" - | "providers" - | "lifecycles" - | "roots" - | "rbx-components" - | "rbx-lifecycles" - -export type PackageTarget = "roblox" - -export type PackageDependencies = { [PackageName]: true? } - -local function dependencies(x: PackageDependencies) - return table.freeze(x) -end - -export type PackageConfig = { - name: string, - description: string, - - authors: { string }?, - license: string?, - version: string?, - - pesdeTargets: { [PesdeEnvironment]: true }?, - - dependencies: PackageDependencies?, - - types: { [string]: boolean | string }?, - - unreleased: boolean? -} - -local function package(x: PackageConfig) - return table.freeze(x) -end - -export type PesdeEnvironment = "roblox" | "roblox_server" | "luau" | "lune" - -return table.freeze({ - root = root, - publisher = publisher, - package = package, - dependencies = dependencies, -}) diff --git a/.lune/lib/publish/init.luau b/.lune/lib/publish/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/.lune/lib/root-config.luau b/.lune/lib/root-config.luau deleted file mode 100644 index 8315f3d4..00000000 --- a/.lune/lib/root-config.luau +++ /dev/null @@ -1,2 +0,0 @@ -local rootConfig = require("../../prvd.config") -return rootConfig diff --git a/.lune/lib/tiniest/tiniest.luau b/.lune/lib/tiniest/tiniest.luau deleted file mode 100644 index d509a9f5..00000000 --- a/.lune/lib/tiniest/tiniest.luau +++ /dev/null @@ -1,219 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -local tiniest_plugin = require("./tiniest_plugin") - -type Context = DescribeContext | RunContext - -type DescribeContext = { - type: "describe", - labels: { string }, - add_test: (Test) -> (), -} - -type RunContext = { - type: "run", -} - -export type ErrorReport = { - type: "tiniest.ErrorReport", - message: string, - trace: string, - code: { - snippet: string, - line: string, - }?, -} - -export type Test = { - labels: { string }, - run: () -> (), -} - -export type RunResult = { - tests: { Test }, - status_tally: { - pass: number, - fail: number, - }, - individual: { [Test]: TestRunResult }, -} - -export type TestRunResult = PassTestRunResult | FailTestRunResult - -export type PassTestRunResult = { - status: "pass", -} - -export type FailTestRunResult = { - status: "fail", - error: ErrorReport, -} - -export type Options = { - plugins: nil | { tiniest_plugin.Plugin }, -} - -export type RunOptions = {} - -local function catch_errors(func: any, ...) - local outer_trace - local function handler(message) - local report: ErrorReport - if typeof(message) == "table" and message.type == "tiniest.ErrorReport" then - report = message :: ErrorReport - else - report = { - type = "tiniest.ErrorReport", - message = tostring(message), - trace = debug.traceback(nil, 2), - } - end - local from, to = string.find(report.trace, outer_trace, 1, true) - if from ~= nil and to ~= nil then - report.trace = report.trace:sub(1, from - 1) .. report.trace:sub(to + 1) - end - return report - end - outer_trace = debug.traceback() - return xpcall(func, handler, ...) -end - -local tiniest = {} - -function tiniest.configure(options: Options) - local plugins = tiniest_plugin.configure(options.plugins) - - local get_context, with_root_context, with_inner_context - do - local current_context: Context? = nil - - function get_context(): Context - assert(current_context ~= nil, "This function can only be called from inside of a test suite") - return current_context - end - - function with_root_context(root_context: Context, inner: (Context) -> ()): () - assert(current_context == nil, "This function can't be called from inside of a test suite") - current_context = root_context - local ok, err = catch_errors(inner :: any, root_context) - current_context = nil - if not ok then - -- bro - -- error(err.message, 0) - error(err, 0) - end - end - - function with_inner_context(make_context: (Context) -> Context, inner: (Context) -> ()): () - local outer_context = get_context() - local inner_context = make_context(outer_context) - current_context = inner_context - local ok, err = catch_errors(inner :: any, inner_context) - current_context = outer_context - if not ok then - error(err.message, 0) - end - end - end - - local self = {} - - function self.describe(label: string, inner: () -> ()): () - with_inner_context(function(outer_context: Context): Context - assert(outer_context.type == "describe", "This function can only be called outside of tests") - local context = table.clone(outer_context) - context.labels = table.clone(context.labels) - table.insert(context.labels, label) - return context - end, inner) - end - - function self.test(label: string, run: () -> ()): () - local context = get_context() - assert(context.type == "describe", "This function can only be called outside of tests") - local labels = table.clone(context.labels) - table.insert(labels, label) - local test: Test = { - labels = labels, - run = run, - } - context.add_test(test) - end - - function self.collect_tests(inner: () -> ()): { Test } - local tests = {} - local context: Context = { - type = "describe", - labels = {}, - add_test = function(test) - table.insert(tests, test) - end, - } - with_root_context(context, inner) - return tests - end - - function self.run_tests(tests: { Test }, run_options: RunOptions): RunResult - plugins.notify("before_run", tests, run_options) - - local context: Context = { - type = "run", - } - - local individual = {} - for _, test in tests do - plugins.notify("before_test", test, run_options) - local _, test_run_result = xpcall(function() - with_root_context(context, test.run) - local pass: TestRunResult = { - status = "pass", - } - return pass - end, function(message) - if typeof(message) == "table" and message.type == "tiniest.ErrorReport" then - local fail: TestRunResult = { - status = "fail", - error = message :: ErrorReport, - } - return fail - else - local error: ErrorReport = { - type = "tiniest.ErrorReport", - message = tostring(message), - trace = debug.traceback(), - } - local fail: TestRunResult = { - status = "fail", - error = error, - } - return fail - end - end) - plugins.notify("after_test", test, test_run_result, run_options) - individual[test] = test_run_result - end - - local status_tally = { - pass = 0, - fail = 0, - } - - for _, result in individual do - status_tally[result.status] += 1 - end - - local result: RunResult = { - tests = tests, - status_tally = status_tally, - individual = individual, - } - plugins.notify("after_run", result, run_options) - - return result - end - - return self -end - -return tiniest diff --git a/.lune/lib/tiniest/tiniest_expect.luau b/.lune/lib/tiniest/tiniest_expect.luau deleted file mode 100644 index 623feecb..00000000 --- a/.lune/lib/tiniest/tiniest_expect.luau +++ /dev/null @@ -1,147 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -local tiniest_quote = require("./tiniest_quote") - -local tiniest_expect = {} - -type Context = { - target: unknown, - test: string, - params: { unknown }, -} - -local context: Context = { - target = nil, - test = "", - params = {}, -} - -local function fail(message: string?): never - local quoted = {} - for index, param in context.params do - quoted[index] = tiniest_quote(param) - end - local param_list = table.concat(quoted, ",") - error({ - type = "tiniest.ErrorReport", - message = "Expectation not met" .. if message == nil then "" else `, because:\n{message}`, - trace = debug.traceback(nil, 4), - code = { - snippet = `expect({tiniest_quote(context.target)}).{context.test}({param_list})`, - line = debug.info(4, "l"), - }, - }, 0) -end - -local function check(condition: boolean, cause: string): () - if not condition then - error(`Bad usage of expect().{context.test}()\nCause: {cause}`, 0) - end -end - -local function is_indexable(x: unknown): boolean - return type(x) == "table" or type(x) == "userdata" -end - -function tiniest_expect.expect(a: any) - local tests = {} - - function tests.exists() - return if a ~= nil then tests else fail() - end - - function tests.never_exists() - return if a == nil then tests else fail() - end - - function tests.is(b: any) - return if a == b then tests else fail() - end - - function tests.never_is(b: any) - return if a ~= b then tests else fail() - end - - function tests.is_true() - check(typeof(a) == "boolean", "expect() value must be boolean") - return if a then tests else fail() - end - - function tests.never_is_true() - check(typeof(a) == "boolean", "expect() value must be boolean") - return if not a then tests else fail() - end - - function tests.is_a(b: string) - return if typeof(a) == b then tests else fail() - end - - function tests.never_is_a(b: string) - return if typeof(a) ~= b then tests else fail() - end - - function tests.has_key(b: any) - check(is_indexable(a), "expect() value must be indexable") - check(b ~= nil, "key cannot be nil") - return if a[b] then tests else fail() - end - - function tests.never_has_key(b: any) - check(is_indexable(a), "expect() value must be indexable") - check(b ~= nil, "key cannot be nil") - return if not a[b] then tests else fail(`[{tiniest_quote(b)}] = {tiniest_quote(a[b])}`) - end - - function tests.has_value(b: any) - check(typeof(a) == "table", "expect() value must be table") - check(b ~= nil, "value cannot be nil") - return if table.find(a, b) then tests else fail() - end - - function tests.never_has_value(b: any) - check(typeof(a) == "table", "expect() value must be table") - check(b ~= nil, "value cannot be nil") - local index = table.find(a, b) - return if index == nil then tests else fail(`Found at index {index}`) - end - - function tests.fails() - check(typeof(a) == "function", "expect() value must be function") - local ok = pcall(a) - return if not ok then tests else fail() - end - - function tests.never_fails() - check(typeof(a) == "function", "expect() value must be function") - local ok, err = pcall(a) - return if ok then tests else fail(`Failed with {tiniest_quote(err)}`) - end - - function tests.fails_with(b: string) - check(typeof(a) == "function", "expect() value must be function") - local ok, err = pcall(a) - return if not ok and err:lower():match(b:lower()) - then tests - else if ok then fail("Did not fail") else fail(`Failed with {tiniest_quote(err)}`) - end - - function tests.never_fails_with(b: string) - check(typeof(a) == "function", "expect() value must be function") - local ok, err = pcall(a) - return if ok or not err:lower():match(b:lower()) then tests else fail() - end - - for name: any, body: any in tests do - tests[name] = function(...) - context.target = a - context.test = name - context.params = { ... } - return body(...) - end - end - - return tests -end - -return tiniest_expect diff --git a/.lune/lib/tiniest/tiniest_for_lune.luau b/.lune/lib/tiniest/tiniest_for_lune.luau deleted file mode 100644 index 89dc2838..00000000 --- a/.lune/lib/tiniest/tiniest_for_lune.luau +++ /dev/null @@ -1,114 +0,0 @@ --- From dphfox/tiniest, licensed under BSD3 ---!strict - -local tiniest = require("./tiniest") -local tiniest_expect = require("./tiniest_expect") -local tiniest_pretty = require("./tiniest_pretty") -local tiniest_snapshot = require("./tiniest_snapshot") -local tiniest_time = require("./tiniest_time") - -local fs = require("@lune/fs") -local luau = require("@lune/luau") - -export type Options = { - snapshot_path: string?, - save_snapshots: boolean?, - pretty: nil | { - disable_colour: boolean?, - disable_emoji: boolean?, - disable_unicode: boolean?, - disable_output: nil | { - after_run: boolean?, - }, - }, -} - -local tiniest_for_lune = {} - -function tiniest_for_lune.configure(options: Options) - local self = {} - - local function get_path_to_snapshot(key: string): string - assert(options.snapshot_path ~= nil) - return `{options.snapshot_path}/{key}.snap.luau` - end - - local function load_snapshots(key: string): { string }? - local path = get_path_to_snapshot(key) - if not fs.isFile(path) then - return nil - else - local ok, result = pcall(function() - local source = fs.readFile(path) - local bytecode = luau.compile(source) - local loaded = luau.load(bytecode, { - injectGlobals = false, - }) - return loaded() - end) - if ok then - return result - else - error("[tiniest_for_lune] Failed to load snapshots from disk: " .. tostring(result), 0) - end - end - end - - local function save_snapshots(key: string, snapshots: { string }): () - local ok, result = pcall(function() - snapshots = table.clone(snapshots) - for index, snapshot in snapshots do - snapshots[index] = `[====[{snapshot}]====]` - end - fs.writeFile( - get_path_to_snapshot(key), - "-- Auto-generated by dphfox/tiniest. Do not modify!\n" - .. "--!nocheck\n" - .. "return {" - .. table.concat(snapshots, ", ") - .. "}" - ) - end) - if not ok then - error("[tiniest_for_lune] Failed to save snapshots to disk: " .. tostring(result), 0) - end - end - - self.expect = tiniest_expect.expect - - local tiniest_time = tiniest_time.configure({ - get_timestamp = os.clock, - }) - - local tiniest_snapshot = tiniest_snapshot.configure({ - load_snapshots = if options.snapshot_path then load_snapshots else nil, - save_snapshots = if options.save_snapshots then save_snapshots else nil, - }) - self.snapshot = tiniest_snapshot.snapshot - - local tiniest_pretty = tiniest_pretty.configure({ - disable_colour = options.pretty and options.pretty.disable_colour, - disable_emoji = options.pretty and options.pretty.disable_emoji, - disable_unicode = options.pretty and options.pretty.disable_unicode, - disable_output = options.pretty and options.pretty.disable_output, - plugins = { tiniest_time :: any, tiniest_snapshot }, - }) - self.format_run = tiniest_pretty.format_run - - local tiniest = tiniest.configure({ - plugins = { tiniest_time :: any, tiniest_snapshot, tiniest_pretty }, - }) - self.describe = tiniest.describe - self.test = tiniest.test - self.collect_tests = tiniest.collect_tests - self.run_tests = tiniest.run_tests - - return self -end - --- bro -export type Configured = typeof(tiniest.configure({})) & { - expect: typeof(tiniest_expect.expect), -} - -return tiniest_for_lune diff --git a/.lune/lib/tiniest/tiniest_plugin.luau b/.lune/lib/tiniest/tiniest_plugin.luau deleted file mode 100644 index f4c6ebe9..00000000 --- a/.lune/lib/tiniest/tiniest_plugin.luau +++ /dev/null @@ -1,36 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -export type Plugin = { - is_tiniest_plugin: true, -} - -local tiniest_plugin = {} - -function tiniest_plugin.configure(plugins: { any }?) - if plugins ~= nil then - for index, plugin in plugins do - if not plugin.is_tiniest_plugin then - error(`sanity check: plugin #{index} is not a valid plugin`) - end - end - end - - local self = {} - - function self.notify(method_name: string, ...): () - if plugins == nil then - return - end - for _, plugin in plugins do - local method = plugin[method_name] - if typeof(method) == "function" then - method(...) - end - end - end - - return self -end - -return tiniest_plugin diff --git a/.lune/lib/tiniest/tiniest_pretty.luau b/.lune/lib/tiniest/tiniest_pretty.luau deleted file mode 100644 index 2654e979..00000000 --- a/.lune/lib/tiniest/tiniest_pretty.luau +++ /dev/null @@ -1,228 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -local tiniest = require("./tiniest") -local tiniest_plugin = require("./tiniest_plugin") -type Test = tiniest.Test -type TestRunResult = tiniest.TestRunResult -type RunResult = tiniest.RunResult - -export type Options = { - plugins: nil | { tiniest_plugin.Plugin }, - disable_emoji: boolean?, - disable_unicode: boolean?, - disable_colour: boolean?, - disable_output: nil | { - after_run: boolean?, - }, -} - -local tiniest_pretty = {} - -function tiniest_pretty.configure(options: Options) - if options.disable_unicode then - options.disable_emoji = true - end - - local plugins = tiniest_plugin.configure(options.plugins) - - local function string_len(text: string) - if options.disable_unicode then - return string.len(text) - else - return utf8.len(text) or string.len(text) - end - end - local status_icons = { - pass = if options.disable_emoji then "[PASS]" else "✅", - fail = if options.disable_emoji then "[FAIL]" else "❌", - } - local crumb_trail = if options.disable_unicode then " > " else " ▸ " - local divider = if options.disable_unicode then "=" else "═" - local margin_line = if options.disable_unicode then "|" else "│" - - local paint = {} - do - local function ansi_mode(...) - if options.disable_colour then - return "" - else - return `{string.char(27)}[{table.concat({ ... }, ";")}m` - end - end - local DIM = ansi_mode("2") - local PASS = ansi_mode("1", "32") - local PASS_DIM = ansi_mode("2", "32") - local FAIL = ansi_mode("1", "31") - local FAIL_DIM = ansi_mode("2", "31") - local TRACE = ansi_mode("1", "34") - local TRACE_DIM = ansi_mode("2", "34") - local NUMBER = ansi_mode("1", "36") - local STRING = ansi_mode("1", "33") - local KEYWORD = ansi_mode("1", "35") - local RESET = ansi_mode("0") - - function paint.dim(text: string): string - return DIM .. text .. RESET - end - - function paint.pass(text: string): string - return PASS .. text .. RESET - end - - function paint.pass_dim(text: string): string - return PASS_DIM .. text .. RESET - end - - function paint.fail(text: string): string - return FAIL .. text .. RESET - end - - function paint.fail_dim(text: string): string - return FAIL_DIM .. text .. RESET - end - - function paint.trace(text: string): string - return TRACE .. text .. RESET - end - - function paint.trace_dim(text: string): string - return TRACE_DIM .. text .. RESET - end - - function paint.number(text: string): string - return NUMBER .. text .. RESET - end - - function paint.string(text: string): string - return STRING .. text .. RESET - end - - function paint.keyword(text: string): string - return KEYWORD .. text .. RESET - end - end - - local LINE_LENGTH = 80 - local full_width_divider = paint.dim(string.rep(divider, LINE_LENGTH)) - local function title(text: string): string - local no_ansi = text:gsub(`{string.char(27)}.-m`, "") - local divider_count = (LINE_LENGTH - string_len(no_ansi) - 2) / 2 - local divider_lhs = string.rep(divider, math.ceil(divider_count)) - local divider_rhs = string.rep(divider, math.floor(divider_count)) - return paint.dim(divider_lhs) .. " " .. text .. " " .. paint.dim(divider_rhs) - end - local function syntax(snippet: string): string - return snippet - :gsub("0?[xXbB]?%d*%.?%d*[eE]?%-?%d+", paint.number) - :gsub('".-"', paint.string) - :gsub("'.-'", paint.string) - :gsub("function", paint.keyword) - :gsub("end", paint.keyword) - :gsub("true", paint.keyword) - :gsub("false", paint.keyword) - :gsub("nil", paint.keyword) - :gsub("%-%-.-\n", paint.dim) - end - local function indent(passage: string, indentation: string): string - return passage:gsub("\n", "\n" .. indentation) - end - - local self = {} - self.is_tiniest_plugin = true - - function self.format_run(run_result: RunResult): string - local lines = {} - - local pretty_results = {} - for _, test in run_result.tests do - local result = run_result.individual[test] - local painted_labels = table.clone(test.labels) - for index, label in painted_labels do - local style = result.status .. if index < #painted_labels then "_dim" else "" - painted_labels[index] = paint[style](label) - end - local annotations = "" - local function add_annotation(annotation: string): () - annotations ..= ` - {annotation}` - end - plugins.notify("add_annotations", result, options, add_annotation) - local pretty = { - test = test, - result = result, - crumbs = table.concat(painted_labels, paint[result.status .. "_dim"](crumb_trail)), - icon = status_icons[result.status], - annotations = paint.dim(annotations), - } - table.insert(pretty_results, pretty) - end - - if run_result.status_tally.fail > 0 then - table.insert(lines, title(`Errors from {run_result.status_tally.fail} test(s)`)) - table.insert(lines, "") - for _, pretty in pretty_results do - if pretty.result.status == "pass" then - continue - end - table.insert(lines, `{pretty.icon} {pretty.crumbs}`) - table.insert(lines, paint.trace(pretty.result.error.message)) - local code = pretty.result.error.code - if code ~= nil then - local num_length = string_len(code.line) - local empty_margin = string.rep(" ", num_length + 1) .. paint.dim(margin_line) .. " " - table.insert(lines, empty_margin) - table.insert( - lines, - `{paint.dim(`{code.line} {margin_line}`)} {indent(syntax(code.snippet), empty_margin)}` - ) - table.insert(lines, empty_margin) - end - local trace = pretty.result.error.trace:gsub("\n+$", "") - table.insert(lines, paint.trace_dim(trace)) - table.insert(lines, "") - end - end - - local line_items = {} - local function add_line_items(key: string, value: string): () - table.insert(line_items, `{paint.dim(key .. ":")} {value}`) - end - plugins.notify("add_line_items", run_result, options, add_line_items) - - table.insert(lines, title(`Status of {#pretty_results} test(s)`)) - table.insert(lines, "") - for _, pretty in pretty_results do - table.insert(lines, `{pretty.icon} {pretty.crumbs}{pretty.annotations}`) - end - table.insert(lines, "") - table.insert( - lines, - title( - `{paint.pass(`{run_result.status_tally.pass} passed`)}, {paint.fail( - `{run_result.status_tally.fail} failed` - )}` - ) - ) - if #line_items > 0 then - table.insert(lines, "") - for _, line_item in line_items do - table.insert(lines, line_item) - end - table.insert(lines, "") - table.insert(lines, full_width_divider) - end - - return table.concat(lines, "\n") - end - - function self.after_run(run_result: RunResult, _): () - if options.disable_output and options.disable_output.after_run then - return - end - print(self.format_run(run_result)) - end - - return self -end - -return tiniest_pretty diff --git a/.lune/lib/tiniest/tiniest_quote.luau b/.lune/lib/tiniest/tiniest_quote.luau deleted file mode 100644 index c2310337..00000000 --- a/.lune/lib/tiniest/tiniest_quote.luau +++ /dev/null @@ -1,40 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -local function tiniest_quote(x: unknown, given_indent_amount: number?): string - if type(x) == "nil" or type(x) == "number" or type(x) == "boolean" or type(x) == "userdata" then - return tostring(x) - elseif type(x) == "string" then - return string.format("%q", x) - elseif type(x) == "function" then - return "function() ... end" - elseif type(x) == "table" then - local outer_indent_amount = given_indent_amount or 0 - local inner_indent_amount = outer_indent_amount + 1 - local outer_indent = string.rep(" ", outer_indent_amount) - local inner_indent = string.rep(" ", inner_indent_amount) - - local tbl: {} = x :: any - local sorted_pairs = {} - for key, value in tbl do - table.insert(sorted_pairs, { - key = tiniest_quote(key, inner_indent_amount), - value = tiniest_quote(value, inner_indent_amount), - }) - end - table.sort(sorted_pairs, function(a, b) - return a.key < b.key - end) - local frozen = table.isfrozen(tbl) - local lines = { if frozen then "table.freeze {" else "{" } - for _, pair in sorted_pairs do - table.insert(lines, `{inner_indent}[{pair.key}] = {pair.value};`) - end - table.insert(lines, outer_indent .. "}") - return table.concat(lines, "\n") - else - return `{type(x)}({tostring(x)})` - end -end - -return tiniest_quote :: (unknown) -> string diff --git a/.lune/lib/tiniest/tiniest_snapshot.luau b/.lune/lib/tiniest/tiniest_snapshot.luau deleted file mode 100644 index eba9de3e..00000000 --- a/.lune/lib/tiniest/tiniest_snapshot.luau +++ /dev/null @@ -1,159 +0,0 @@ --- From dphfox/tiniest, licensed under BSD3 ---!strict - -local tiniest = require("./tiniest") -local tiniest_quote = require("./tiniest_quote") -type Test = tiniest.Test - -export type TestRunResult = tiniest.TestRunResult & { - num_snapshots_updated: number, - num_snapshots_obsolete: number, -} -export type RunResult = tiniest.RunResult & { - num_snapshots_updated: number, - num_snapshots_obsolete: number, -} - -export type Options = { - save_snapshots: nil | (key: string, values: { string }) -> (), - load_snapshots: nil | (key: string) -> { string }?, -} - -type TestContext = { - key: string, - snapshots: { string }, - next_snapshot_index: number, - num_updated: number, -} - -type RunContext = { - num_updated: number, - num_obsolete: number, -} - -local tiniest_snapshot = {} - -function tiniest_snapshot.configure(options: Options) - local self = {} - self.is_tiniest_plugin = true - - local function get_test_key(test: Test) - local labels = {} - for _, label in test.labels do - label = label:lower():gsub("[^%w%s]", ""):gsub(" ", "_") - table.insert(labels, label) - end - return table.concat(labels, ".") - end - - local run_context: RunContext? - local test_context: TestContext? - - function self.snapshot(x: unknown): () - if options.load_snapshots == nil then - error("snapshot() is unavailable - snapshots have not been configured", 0) - elseif run_context == nil or test_context == nil then - error("snapshot() can only be used while a test is running with tiniest_snapshot", 0) - end - - local snapshot_index = test_context.next_snapshot_index - test_context.next_snapshot_index += 1 - - local fresh_snapshot = tiniest_quote(x) - local snapshot_on_disk = test_context.snapshots[snapshot_index] - test_context.snapshots[snapshot_index] = fresh_snapshot - - if fresh_snapshot == snapshot_on_disk then - return - end - - if options.save_snapshots then - run_context.num_updated += 1 - test_context.num_updated += 1 - test_context.snapshots[snapshot_index] = fresh_snapshot - elseif snapshot_on_disk == nil then - error({ - type = "tiniest.ErrorReport", - message = "New snapshot() call needs to be saved.\nRun while saving snapshots to save it to disk.", - trace = debug.traceback(nil, 2), - code = { - snippet = `snapshot({fresh_snapshot})`, - line = debug.info(2, "l"), - }, - }, 0) - else - error({ - type = "tiniest.ErrorReport", - message = "Snapshot does not match", - trace = debug.traceback(nil, 2), - code = { - snippet = `snapshot({fresh_snapshot})\n\n-- snapshot on disk:\nsnapshot({snapshot_on_disk})`, - line = debug.info(2, "l"), - }, - }, 0) - end - end - - function self.before_run(_, _): () - run_context = { - num_updated = 0, - num_obsolete = 0, - } - end - - function self.after_run(original_run_result: tiniest.RunResult, _): () - assert(run_context ~= nil) - local run_result = original_run_result :: RunResult - run_result.num_snapshots_updated = run_context.num_updated - run_result.num_snapshots_obsolete = run_context.num_obsolete - run_context = nil - end - - function self.before_test(test: Test, _): () - assert(run_context ~= nil) - local key = get_test_key(test) - test_context = { - key = key, - snapshots = options.load_snapshots and options.load_snapshots(key) or {}, - next_snapshot_index = 1, - num_updated = 0, - } - end - - function self.after_test(_, original_run_result: tiniest.TestRunResult, _): () - assert(run_context ~= nil) - assert(test_context ~= nil) - local run_result = original_run_result :: TestRunResult - run_result.num_snapshots_updated = test_context.num_updated - run_result.num_snapshots_obsolete = test_context.next_snapshot_index - #test_context.snapshots - 1 - run_context.num_obsolete += run_result.num_snapshots_obsolete - if test_context.num_updated > 0 and options.save_snapshots ~= nil then - options.save_snapshots(test_context.key, test_context.snapshots) - end - test_context = nil - end - - function self.add_annotations(original_run_result: tiniest.TestRunResult, _, add_annotation: (string) -> ()) - local run_result = original_run_result :: TestRunResult - if run_result.num_snapshots_updated > 0 then - add_annotation(`{run_result.num_snapshots_updated} snapshot(s) updated`) - end - if run_result.num_snapshots_obsolete > 0 then - add_annotation(`{run_result.num_snapshots_obsolete} snapshot(s) obsolete`) - end - end - - function self.add_line_items(original_run_result: tiniest.RunResult, _, add_line_item: (string, string) -> ()) - local run_result = original_run_result :: RunResult - if run_result.num_snapshots_updated > 0 then - add_line_item("Updated snapshots", tostring(run_result.num_snapshots_updated)) - end - if run_result.num_snapshots_obsolete > 0 then - add_line_item("Obsolete snapshots", tostring(run_result.num_snapshots_obsolete)) - end - end - - return self -end - -return tiniest_snapshot diff --git a/.lune/lib/tiniest/tiniest_time.luau b/.lune/lib/tiniest/tiniest_time.luau deleted file mode 100644 index 48adf1c4..00000000 --- a/.lune/lib/tiniest/tiniest_time.luau +++ /dev/null @@ -1,86 +0,0 @@ --- From dphfox/tiniest, licenced under BSD ---!strict - -local tiniest = require("./tiniest") -local tiniest_pretty = require("./tiniest_pretty") -type Test = tiniest.Test - -export type TestRunResult = tiniest.TestRunResult & { - duration: number, -} -export type RunResult = tiniest.RunResult & { - duration: number, -} - -export type Options = { - get_timestamp: () -> number, -} - -local tiniest_time = {} - -local function format_duration(seconds: number, options: tiniest_pretty.Options): string - local SECOND = 1 - local MILLISECOND = SECOND / 1000 - local MICROSECOND = MILLISECOND / 1000 - local suffix = { - micro = if options.disable_unicode then "u" else "µ", - milli = "m", - } - - if seconds < 100 * MICROSECOND then - return `{math.ceil(seconds / MICROSECOND * 100) / 100}{suffix.micro}s` - elseif seconds < 100 * MILLISECOND then - return `{math.ceil(seconds / MILLISECOND * 100) / 100}{suffix.milli}s` - else - return `{math.ceil(seconds * 100) / 100}s` - end -end - -function tiniest_time.configure(options: Options) - local self = {} - self.is_tiniest_plugin = true - - local start_times = {} - - function self.before_run(tests: { Test }, _): () - start_times[tests] = options.get_timestamp() - end - - function self.after_run(original_run_result: tiniest.RunResult, _): () - local run_result = original_run_result :: RunResult - run_result.duration = options.get_timestamp() - start_times[run_result.tests] - start_times[run_result.tests] = nil - end - - function self.before_test(test: Test, _): () - start_times[test] = options.get_timestamp() - end - - function self.after_test(test: Test, original_run_result: tiniest.TestRunResult, _): () - local run_result = original_run_result :: TestRunResult - run_result.duration = options.get_timestamp() - start_times[test] - start_times[test] = nil - end - - function self.add_annotations( - original_run_result: tiniest.TestRunResult, - options: tiniest_pretty.Options, - add_annotation: (string) -> () - ) - local run_result = original_run_result :: TestRunResult - add_annotation(format_duration(run_result.duration, options)) - end - - function self.add_line_items( - original_run_result: tiniest.RunResult, - options: tiniest_pretty.Options, - add_line_item: (string, string) -> () - ) - local run_result = original_run_result :: RunResult - add_line_item("Time to run", format_duration(run_result.duration, options)) - end - - return self -end - -return tiniest_time diff --git a/.lune/lib/types.luau b/.lune/lib/types.luau deleted file mode 100644 index ade017aa..00000000 --- a/.lune/lib/types.luau +++ /dev/null @@ -1,17 +0,0 @@ -local configure = require("@lune-lib/configure") - -export type PackageContext = { - rootDir: string, - outDir: string, - outWorkDir: string, - packagesDir: string, - packages: { [string]: Package }, -} - -export type Package = { - absolutePath: string, - relativePath: string, - config: configure.PackageConfig, -} - -return nil diff --git a/.lune/lib/utils/collect-packages.luau b/.lune/lib/utils/collect-packages.luau deleted file mode 100644 index dd9931f4..00000000 --- a/.lune/lib/utils/collect-packages.luau +++ /dev/null @@ -1,37 +0,0 @@ -local configure = require("@lune-lib/configure") -local fs = require("@lune/fs") -local path = require("@lune-lib/utils/path") -local types = require("@lune-lib/types") - -local function collectPackages(rootPath: string, packageDir: string) - local packages: { types.Package } = {} - local packageDirPath = path(rootPath, packageDir) - local knownNames = {} - - for _, package in fs.readDir(packageDirPath) do - local packagePath = path(packageDirPath, package) - if fs.isDir(packagePath) then - local packageRelativePath = path(packageDir, package) - local configRequirePath = path(packageRelativePath, "prvd.config") - local configPath = path(packagePath, "prvd.config.luau") - - if fs.isFile(configPath) then - -- HACK: lune i beg you to have a cwd parameter for requires - local config: configure.PackageConfig = (require)(`@lune-lib/../../{configRequirePath}`) - - assert(not knownNames[config.name], `Duplicate package name found: {config.name}`) - knownNames[config.name] = true - - table.insert(packages, { - absolutePath = packagePath, - relativePath = packageRelativePath, - config = config, - }) - end - end - end - - return packages -end - -return collectPackages diff --git a/.lune/lib/utils/path.luau b/.lune/lib/utils/path.luau deleted file mode 100644 index 34b1fed4..00000000 --- a/.lune/lib/utils/path.luau +++ /dev/null @@ -1,9 +0,0 @@ -local process = require("@lune/process") - -local delimiter = if process.os == "windows" then "\\" else "/" - -local function path(...: string) - return table.concat({ ... }, delimiter) -end - -return path diff --git a/.lune/lib/utils/print-divider.luau b/.lune/lib/utils/print-divider.luau deleted file mode 100644 index ffc3f8c8..00000000 --- a/.lune/lib/utils/print-divider.luau +++ /dev/null @@ -1,14 +0,0 @@ -local styles = require("./styles") - -local LINE_COUNT = 80 - -local bold = styles.bold -local dim = styles.dim - -local function printDivider(str: string, lineCount: number?) - local dashRepeats = ((lineCount or LINE_COUNT) - str:len()) * 0.5 - local extraIfUneven = if str:len() % 2 ~= 0 then 1 else 0 - return print(bold(`{dim(string.rep("=", dashRepeats))} {str} {dim(string.rep("=", dashRepeats + extraIfUneven))}`)) -end - -return printDivider diff --git a/.lune/lib/utils/select-packages.luau b/.lune/lib/utils/select-packages.luau deleted file mode 100644 index 98c14574..00000000 --- a/.lune/lib/utils/select-packages.luau +++ /dev/null @@ -1,42 +0,0 @@ -local process = require("@lune/process") -local stdio = require("@lune/stdio") -local types = require("@lune-lib/types") - -local function selectPackages(packages: { types.Package }): { - names: { string }, - nameToPackage: { [string]: types.Package }, - selected: { string }, -} - local packageNames = {} - local nameToPackage = {} - - local selected: { string } = {} - - table.sort(packages, function(lhs, rhs) - return lhs.config.name < rhs.config.name - end) - - for _, package in packages do - local name = package.config.name - table.insert(packageNames, name) - nameToPackage[name] = package - end - - if #process.args == 0 then - for _, index in stdio.prompt("multiselect", "Which packages to build?", packageNames) do - table.insert(selected, packageNames[index]) - end - elseif table.find(process.args, "all") then - selected = table.clone(packageNames) - else - table.move(process.args, 1, #process.args, 1, selected) - end - - return { - names = packageNames, - nameToPackage = nameToPackage, - selected = selected, - } -end - -return selectPackages diff --git a/.lune/lib/utils/styles.luau b/.lune/lib/utils/styles.luau deleted file mode 100644 index 7a30dfa9..00000000 --- a/.lune/lib/utils/styles.luau +++ /dev/null @@ -1,40 +0,0 @@ -local stdio = require("@lune/stdio") - -local RESET_STYLE = stdio.style("reset") -local RESET_COLOR = stdio.color("reset") - -local function wrapStyle(style: stdio.Style) - local code = stdio.style(style) - return function(str: string) - return code .. str .. RESET_STYLE - end -end - -local function wrapColor(color: stdio.Color) - local code = stdio.color(color) - return function(str: string) - return code .. str .. RESET_COLOR - end -end - -local function wrapCode(code: string) - return function() - stdio.write(code) - end -end - -return table.freeze({ - dim = wrapStyle("dim"), - bold = wrapStyle("bold"), - - red = wrapColor("red"), - yellow = wrapColor("yellow"), - green = wrapColor("green"), - cyan = wrapColor("cyan"), - blue = wrapColor("blue"), - purple = wrapColor("purple"), - black = wrapColor("black"), - white = wrapColor("white"), - - clearLine = wrapCode("\x1b[2K\x1b[2A"), -}) diff --git a/.lune/pesde-scripts/roblox_sync_config_generator.luau b/.lune/pesde-scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/.lune/pesde-scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/.lune/pesde-scripts/sourcemap-generator.luau b/.lune/pesde-scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/.lune/pesde-scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/.lune/publish.luau b/.lune/publish.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/.lune/tiniest.luau b/.lune/tiniest.luau deleted file mode 100644 index 9213bcae..00000000 --- a/.lune/tiniest.luau +++ /dev/null @@ -1,25 +0,0 @@ -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 = luauPath .. "/" .. entry - if fs.isDir(fullPath) then - visitDir(fullPath, fullLuauPath) - elseif fs.isFile(fullPath) and fullPath:match("%.spec.luau$") ~= nil then - (require)(fullLuauPath)(tiniest) - end - end - end - - for _, package in fs.readDir("packages") do - tiniest.describe(package, function() - visitDir("packages/" .. package, "../packages/" .. package) - end) - end -end) - -tiniest.run_tests(tests, {}) --- print(tiniest.format_run()) diff --git a/.zed/settings.json b/.zed/settings.json index 89f14320..5b1926b2 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -2,16 +2,176 @@ // // For a full list of overridable settings, and general information on folder-specific settings, // see the documentation: https://zed.dev/docs/configuring-zed#settings-files +// Folder-specific settings +// +// For a full list of overridable settings, and general information on folder-specific settings, +// see the documentation: https://zed.dev/docs/configuring-zed#settings-files { + "project_name": "Prvd 'M Wrong", + "languages": { + "Luau": { + "formatter": { + "external": { + "command": "stylua", + "arguments": ["-"] + } + } + } + }, "lsp": { "luau-lsp": { "settings": { + // luau-lsp settings. What belongs here is specified below this entire block + // of code and the contents written out are a snapshot. If it seems the snapshot + // is out of date, please file an issue or PR about it. + "luau-lsp": { + // Files that match these globs will not be shown during auto-import + "ignoreGlobs": [] + // "sourcemap": { + // // Whether Rojo sourcemap-related features are enabled + // "enabled": true, + // // Whether we should autogenerate the Rojo sourcemap by calling `rojo sourcemap` + // "autogenerate": true, + // // The project file to generate a sourcemap for + // "rojoProjectFile": "default.project.json", + // // Whether non script instances should be included in the generated sourcemap + // "includeNonScripts": true, + // // The sourcemap file name + // "sourcemapFile": "sourcemap.json" + // }, + // "diagnostics": { + // // Whether to also compute diagnostics for dependents when a file changes + // "includeDependents": true, + // // Whether to compute diagnostics for a whole workspace + // "workspace": false, + // // Whether to use expressive DM types in the diagnostics typechecker + // "strictDatamodelTypes": false + // }, + // "types": { + // // Any definition files to load globally + // "definitionFiles": [], + // // A list of globals to remove from the global scope. Accepts full libraries + // // or particular functions (e.g., `table` or `table.clone`) + // "disabledGlobals": [] + // }, + // "inlayHints": { + // // "none" | "literals" | "all" + // "parameterNames": "none", + // "variableTypes": false, + // "parameterTypes": false, + // "functionReturnTypes": false, + // "hideHintsForErrorTypes": false, + // "hideHintsForMatchingParameterNames": true, + // "typeHintMaxLength": 50, + // // Whether type inlay hints should be made insertable + // "makeInsertable": true + // }, + // "hover": { + // "enabled": true, + // "showTableKinds": false, + // "multilineFunctionDefinitions": false, + // "strictDatamodelTypes": true, + // "includeStringLength": true + // }, + // "completion": { + // "enabled": true, + // // Whether to automatically autocomplete end + // "autocompleteEnd": false, + // // Automatic imports configuration + // "imports": { + // // Whether we should suggest automatic imports in completions + // "enabled": false, + // // Whether services should be suggested in auto-import + // "suggestServices": true, + // // Whether requires should be suggested in auto-import + // "suggestRequires": true, + // // The style of the auto-imported require. + // // "Auto" | "AlwaysRelative" | "AlwaysAbsolute" + // "requireStyle": "Auto", + // "stringRequires": { + // // Whether to use string requires when auto-importing requires (roblox platform only) + // "enabled": false + // }, + // // Whether services and requires should be separated by an empty line + // "separateGroupsWithLine": false, + // // Files that match these globs will not be shown during auto-import + // "ignoreGlobs": [] + // }, + // // Automatically add parentheses to a function call + // "addParentheses": true, + // // If parentheses are added, include a $0 tabstop after the parentheses + // "addTabstopAfterParentheses": true, + // // If parentheses are added, fill call arguments with parameter names + // "fillCallArguments": true, + // // Whether to show non-function properties when performing a method call with a colon + // "showPropertiesOnMethodCall": false, + // // Enables the experimental fragment autocomplete system for performance improvements + // "enableFragmentAutocomplete": false + // }, + // "signatureHelp": { + // "enabled": true + // }, + // "index": { + // // Whether the whole workspace should be indexed. If disabled, only limited support is + // // available for features such as "Find All References" and "Rename" + // "enabled": true, + // // The maximum amount of files that can be indexed + // "maxFiles": 10000 + // } + }, "roblox": { + // Whether or not Roblox-specific features should be enabled. "enabled": true, + // The security level of scripts. + // Must be "roblox_script", "local_user", "plugin" or "none". "security_level": "none", + // Whether or not API documentation should be downloaded and added to luau-lsp. "download_api_documentation": true, + // Whether or not definitions should be downloaded and added to luau-lsp. "download_definitions": true + }, + "fflags": { + // Whether or not all boolean, non-experimental fflags should be enabled + // by default. + "enable_by_default": true, + // Whether or not the new Luau type solver should be enabled. + "enable_new_solver": true, + // Whether or not FFlag values should be synced with Roblox's default + // FFlag values. + // "sync": true, + // FFlags that are forced to some value. + "override": {} + }, + "binary": { + // Whether or not the extension should skip searching for a binary in + // your `$PATH` to use instead of installing one itself. + // "ignore_system_version": false, + // The path to the language server binary you want to force the extension + // to use. + // "path": null, + // Additional arguments to pass to the language server. If you want to + // set exactly which arguments are passed, use `lsp.luau-lsp.binary.path` + // & `lsp.luau-lsp.binary.args` instead. Note that this path does not + // support tilde expansion (`~/...`). + // "args": [] + }, + "plugin": { + // Whether or not Roblox Studio Plugin support should be enabled. If false, the + // extension will use the regular language server binary only, whereas if true, + // it will use, thereby starting an HTTP server, and potentially install + // 4teapo/luau-lsp-proxy as well. This is necessary for plugin support + // to be possible. + // "enabled": false, + // The port number to connect the Roblox Studio Plugin to. + // "port": 3667, + // The path to the luau-lsp-proxy binary you want to force the extension + // to use. If null, the extension tries to install it itself. + // "proxy_path": null } + // Additional definition file paths to pass to the language server. + // "definitions": [], + // Additional documentation file paths to pass to the language server. + // "documentation": [] } } } diff --git a/README.md b/README.md index 4be745a1..b4d0273c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ > [!WARNING] > **Prvd 'M Wrong is unfinished.** Do not use Prvd 'M Wrong for production. - Luau has often meant navigating sprawling mazes of dependencies, grappling with incomplete frameworks, and a challenging development experience. diff --git a/.lune/build.luau b/build.luau similarity index 100% rename from .lune/build.luau rename to build.luau diff --git a/dist/bundle.rbxl b/dist/bundle.rbxl deleted file mode 100644 index e6d10b1d..00000000 Binary files a/dist/bundle.rbxl and /dev/null differ diff --git a/dist/bundle.rbxm b/dist/bundle.rbxm deleted file mode 100644 index 8317c613..00000000 Binary files a/dist/bundle.rbxm and /dev/null differ diff --git a/dist/models/dependencies.rbxm b/dist/models/dependencies.rbxm deleted file mode 100644 index 39687f4d..00000000 Binary files a/dist/models/dependencies.rbxm and /dev/null differ diff --git a/dist/models/lifecycles.rbxm b/dist/models/lifecycles.rbxm deleted file mode 100644 index bdb9c7f6..00000000 Binary files a/dist/models/lifecycles.rbxm and /dev/null differ diff --git a/dist/models/logger.rbxm b/dist/models/logger.rbxm deleted file mode 100644 index 31b211bd..00000000 Binary files a/dist/models/logger.rbxm and /dev/null differ diff --git a/dist/models/providers.rbxm b/dist/models/providers.rbxm deleted file mode 100644 index d283676e..00000000 Binary files a/dist/models/providers.rbxm and /dev/null differ diff --git a/dist/models/prvdmwrong.rbxm b/dist/models/prvdmwrong.rbxm deleted file mode 100644 index a8acdeb3..00000000 Binary files a/dist/models/prvdmwrong.rbxm and /dev/null differ diff --git a/dist/models/rbx-components.rbxm b/dist/models/rbx-components.rbxm deleted file mode 100644 index ca27a952..00000000 Binary files a/dist/models/rbx-components.rbxm and /dev/null differ diff --git a/dist/models/rbx-lifecycles.rbxm b/dist/models/rbx-lifecycles.rbxm deleted file mode 100644 index 3f1d199c..00000000 Binary files a/dist/models/rbx-lifecycles.rbxm and /dev/null differ diff --git a/dist/models/roots.rbxm b/dist/models/roots.rbxm deleted file mode 100644 index 121e8de1..00000000 Binary files a/dist/models/roots.rbxm and /dev/null differ diff --git a/dist/models/runtime.rbxm b/dist/models/runtime.rbxm deleted file mode 100644 index 6dc1306a..00000000 Binary files a/dist/models/runtime.rbxm and /dev/null differ diff --git a/dist/models/typecheckers.rbxm b/dist/models/typecheckers.rbxm deleted file mode 100644 index 5cd55bc9..00000000 Binary files a/dist/models/typecheckers.rbxm and /dev/null differ diff --git a/dist/npm/dependencies/LICENSE.md b/dist/npm/dependencies/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/dependencies/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/dependencies/lifecycles.luau b/dist/npm/dependencies/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/npm/dependencies/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/npm/dependencies/logger.luau b/dist/npm/dependencies/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/npm/dependencies/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/npm/dependencies/package.json b/dist/npm/dependencies/package.json deleted file mode 100644 index 57bd1000..00000000 --- a/dist/npm/dependencies/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/lifecycles": "0.2.0-rc.4", - "@prvdmwrong/logger": "0.2.0-rc.4" - }, - "description": "Dependency resolution logic for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/dependencies", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/dependencies/src/depend.luau b/dist/npm/dependencies/src/depend.luau deleted file mode 100644 index 55230b4e..00000000 --- a/dist/npm/dependencies/src/depend.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 locked.", - __index = useBeforeConstructed, - __newindex = useBeforeConstructed, -} - -function unresolvedMt:__tostring() - return "UnresolvedDependency" -end - --- Wtf luau -local function depend(dependency: types.Dependency): typeof(({} :: types.Dependency).new( - (nil :: any) :: Dependencies, - ... -)) - -- Return a mock value that will be resolved during dependency resolution. - return setmetatable({ - type = "UnresolvedDependency", - dependency = dependency, - }, unresolvedMt) :: any -end - -return depend diff --git a/dist/npm/dependencies/src/index.d.ts b/dist/npm/dependencies/src/index.d.ts deleted file mode 100644 index 8d992015..00000000 --- a/dist/npm/dependencies/src/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Lifecycle } from "@prvdmwrong/lifecycles"; - -declare namespace dependencies { - export type Dependency = Self & { - dependencies: Dependencies, - priority?: number, - new(dependencies: Dependencies, ...args: NewArgs): Dependency; - }; - - interface ProccessDependencyResult { - sortedDependencies: Dependency[]; - lifecycles: Lifecycle[]; - } - - export type SubdependenciesOf = T extends { dependencies: infer Dependencies } - ? Dependencies - : never; - - export function depend InstanceType>(dependency: T): InstanceType; - export function processDependencies(dependencies: Set>): ProccessDependencyResult; - export function sortByPriority(dependencies: Dependency[]): void; -} - -export = dependencies; -export as namespace dependencies; diff --git a/dist/npm/dependencies/src/init.luau b/dist/npm/dependencies/src/init.luau deleted file mode 100644 index e6b27b24..00000000 --- a/dist/npm/dependencies/src/init.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 = types.Dependency - -return table.freeze({ - depend = depend, - processDependencies = processDependencies, - sortByPriority = sortByPriority, -}) diff --git a/dist/npm/dependencies/src/logger.luau b/dist/npm/dependencies/src/logger.luau deleted file mode 100644 index 22f3b307..00000000 --- a/dist/npm/dependencies/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", - alreadyFinished = "Root has already finished.", -}) diff --git a/dist/npm/dependencies/src/process-dependencies.luau b/dist/npm/dependencies/src/process-dependencies.luau deleted file mode 100644 index 20820a35..00000000 --- a/dist/npm/dependencies/src/process-dependencies.luau +++ /dev/null @@ -1,57 +0,0 @@ -local lifecycles = require("../lifecycles") -local types = require("./types") - -export type ProccessDependencyResult = { - sortedDependencies: { types.Dependency }, - lifecycles: { lifecycles.Lifecycle }, -} - -type Set = { [T]: true } - -local function processDependencies(dependencies: Set>): ProccessDependencyResult - local sortedDependencies = {} - local lifecycles = {} - - -- TODO: optimize ts - local function visitDependency(dependency: types.Dependency) - -- print("Visiting dependency", dependency) - - for key, value in dependency :: any do - if key == "dependencies" then - -- print("Checking [prvd.dependencies]") - if typeof(value) == "table" then - for key, value in value do - -- print("Checking key", key, "value", value) - if typeof(value) == "table" and value.type == "UnresolvedDependency" then - local unresolved: types.UnresolvedDependency = value - -- print("Got unresolved dependency", unresolved.dependency, "visiting") - visitDependency(unresolved.dependency) - end - end - end - - continue - end - - if typeof(value) == "table" and value.type == "Lifecycle" and not table.find(lifecycles, value) then - table.insert(lifecycles, value) - end - end - - if dependencies[dependency] and not table.find(sortedDependencies, dependency) then - -- print("Pushing to sort") - table.insert(sortedDependencies, dependency) - end - end - - for dependency in dependencies do - visitDependency(dependency) - end - - return { - sortedDependencies = sortedDependencies, - lifecycles = lifecycles, - } -end - -return processDependencies diff --git a/dist/npm/dependencies/src/process-dependencies.spec.luau b/dist/npm/dependencies/src/process-dependencies.spec.luau deleted file mode 100644 index 0fcfcac8..00000000 --- a/dist/npm/dependencies/src/process-dependencies.spec.luau +++ /dev/null @@ -1,67 +0,0 @@ -local depend = require("./depend") -local processDependencies = require("./process-dependencies") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -local function nickname(name: string) - return function(tbl: T): T - return setmetatable(tbl :: any, { - __tostring = function() - return name - end, - }) - end -end - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("processDependencies", function() - test("sortedDependencies", function() - local first = nickname("first")({}) - - local second = nickname("second")({ - dependencies = { - toFirst = depend(first :: any), - toFirstAgain = depend(first :: any), - }, - }) - - local third = nickname("third")({ - dependencies = { - toSecond = depend(second :: any), - }, - }) - - local fourth = nickname("fourth")({ - dependencies = { - toFirst = depend(first :: any), - toSecond = depend(second :: any), - toThird = depend(third :: any), - }, - }) - - local processed = processDependencies({ - [first] = true, - [second] = true, - [third] = true, - [fourth] = true, - } :: any) - - expect(typeof(processed)).is("table") - expect(processed).has_key("sortedDependencies") - expect(typeof(processed.sortedDependencies)).is("table") - - local sortedDependencies = processed.sortedDependencies - - expect(typeof(sortedDependencies)).is("table") - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - expect(sortedDependencies[4]).is(fourth) - end) - - test("lifecycles", function() end) - end) -end diff --git a/dist/npm/dependencies/src/sort-by-priority.luau b/dist/npm/dependencies/src/sort-by-priority.luau deleted file mode 100644 index 638468ab..00000000 --- a/dist/npm/dependencies/src/sort-by-priority.luau +++ /dev/null @@ -1,14 +0,0 @@ -local types = require("./types") - -local function sortByPriority(dependencies: { types.Dependency }) - 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) - local rightIndex = table.find(dependencies, right) - return leftIndex < rightIndex - end) -end - -return sortByPriority diff --git a/dist/npm/dependencies/src/sort-by-priority.spec.luau b/dist/npm/dependencies/src/sort-by-priority.spec.luau deleted file mode 100644 index eeb34933..00000000 --- a/dist/npm/dependencies/src/sort-by-priority.spec.luau +++ /dev/null @@ -1,52 +0,0 @@ -local sortByPriority = require("./sort-by-priority") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("sortByPriority", function() - test("dependencies", function() - local first = {} - - local second = { - toFirst = first, - } - - local third = { - toSecond = second, - } - - local sortedDependencies = { - first, - second, - third, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - end) - - test("priority", function() - local low = {} - - local high = { - priority = 500, - } - - local sortedDependencies = { - low, - high, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(high) - expect(sortedDependencies[2]).is(low) - end) - end) -end diff --git a/dist/npm/dependencies/src/types.luau b/dist/npm/dependencies/src/types.luau deleted file mode 100644 index 2b1c72aa..00000000 --- a/dist/npm/dependencies/src/types.luau +++ /dev/null @@ -1,14 +0,0 @@ -export type Dependency = Self & { - dependencies: Dependencies, - priority: number?, - new: (dependencies: Dependencies, NewArgs...) -> Dependency, -} - -export type UnresolvedDependency = { - type: "UnresolvedDependency", - dependency: Dependency, -} - -export type dependencies = { __prvdmwrong_dependencies: never } - -return nil diff --git a/dist/npm/lifecycles/LICENSE.md b/dist/npm/lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/lifecycles/logger.luau b/dist/npm/lifecycles/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/npm/lifecycles/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/npm/lifecycles/package.json b/dist/npm/lifecycles/package.json deleted file mode 100644 index c8218ee0..00000000 --- a/dist/npm/lifecycles/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/logger": "0.2.0-rc.4", - "@prvdmwrong/runtime": "0.2.0-rc.4" - }, - "description": "Provider method lifecycles implementation for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/lifecycles", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/lifecycles/runtime.luau b/dist/npm/lifecycles/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/npm/lifecycles/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/npm/lifecycles/src/create.luau b/dist/npm/lifecycles/src/create.luau deleted file mode 100644 index 6cdd2891..00000000 --- a/dist/npm/lifecycles/src/create.luau +++ /dev/null @@ -1,45 +0,0 @@ -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") -local onUnregistered = require("./methods/on-unregistered") -local register = require("./methods/register") -local types = require("./types") -local unregister = require("./methods/unregister") - -local function create( - method: string, - onFire: (lifecycle: types.Lifecycle, Args...) -> () -): types.Lifecycle - local self: types.Self = { - _isDestroyed = false, - _selfRegistered = {}, - _selfUnregistered = {}, - - type = "Lifecycle", - callbacks = {}, - - fire = onFire, - method = method, - register = register, - unregister = unregister, - clear = clear, - onRegistered = onRegistered, - onUnregistered = onUnregistered, - await = await, - destroy = destroy, - } :: any - - methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) - - for _, onLifecycleConstructed in lifecycleConstructed.callbacks do - onLifecycleConstructed(self :: types.Lifecycle) - end - - return self -end - -return create diff --git a/dist/npm/lifecycles/src/index.d.ts b/dist/npm/lifecycles/src/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/dist/npm/lifecycles/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/dist/npm/lifecycles/src/init.luau b/dist/npm/lifecycles/src/init.luau deleted file mode 100644 index dbec091b..00000000 --- a/dist/npm/lifecycles/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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 lifecycleRegistered = require("@self/hooks/lifecycle-registered") -local lifecycleUnregistered = require("@self/hooks/lifecycle-unregistered") -local methodToLifecycles = require("@self/method-to-lifecycles") -local types = require("@self/types") - -export type Lifecycle = types.Lifecycle - -return table.freeze({ - create = create, - handlers = table.freeze({ - fireConcurrent = fireConcurrent, - fireSequential = fireSequential, - }), - hooks = table.freeze({ - onLifecycleRegistered = lifecycleRegistered.onLifecycleRegistered, - onLifecycleUnregistered = lifecycleUnregistered.onLifecycleUnregistered, - onLifecycleConstructed = lifecycleConstructed.onLifecycleConstructed, - onLifecycleDestroyed = lifecycleDestroyed.onLifecycleDestroyed, - }), - _ = table.freeze({ - methodToLifecycles = methodToLifecycles, - }), -}) diff --git a/dist/npm/lifecycles/src/logger.luau b/dist/npm/lifecycles/src/logger.luau deleted file mode 100644 index 3ae7c27e..00000000 --- a/dist/npm/lifecycles/src/logger.luau +++ /dev/null @@ -1,6 +0,0 @@ -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.", -}) diff --git a/dist/npm/lifecycles/src/method-to-lifecycles.luau b/dist/npm/lifecycles/src/method-to-lifecycles.luau deleted file mode 100644 index 386a8756..00000000 --- a/dist/npm/lifecycles/src/method-to-lifecycles.luau +++ /dev/null @@ -1,5 +0,0 @@ -local types = require("./types") - -local methodToLifecycles: { [string]: { types.Lifecycle } } = {} - -return methodToLifecycles diff --git a/dist/npm/lifecycles/src/types.luau b/dist/npm/lifecycles/src/types.luau deleted file mode 100644 index f2931b52..00000000 --- a/dist/npm/lifecycles/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -export type Lifecycle = { - type: "Lifecycle", - - callbacks: { (Args...) -> () }, - method: string, - - register: (self: Lifecycle, callback: (Args...) -> ()) -> (), - fire: (self: Lifecycle, Args...) -> (), - unregister: (self: Lifecycle, callback: (Args...) -> ()) -> (), - clear: (self: Lifecycle) -> (), - onRegistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - onUnregistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - await: (self: Lifecycle) -> Args..., - destroy: (self: Lifecycle) -> (), -} - -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - -return nil diff --git a/dist/npm/logger/LICENSE.md b/dist/npm/logger/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/logger/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/logger/package.json b/dist/npm/logger/package.json deleted file mode 100644 index b9954136..00000000 --- a/dist/npm/logger/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/runtime": "0.2.0-rc.4" - }, - "description": "Logging for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/logger", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/logger/runtime.luau b/dist/npm/logger/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/npm/logger/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/npm/logger/src/allow-web-links.luau b/dist/npm/logger/src/allow-web-links.luau deleted file mode 100644 index dcd0bb82..00000000 --- a/dist/npm/logger/src/allow-web-links.luau +++ /dev/null @@ -1,5 +0,0 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks diff --git a/dist/npm/logger/src/create.luau b/dist/npm/logger/src/create.luau deleted file mode 100644 index 943aab25..00000000 --- a/dist/npm/logger/src/create.luau +++ /dev/null @@ -1,32 +0,0 @@ -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(label: string, errorInfoUrl: string?, templates: T): types.Logger - local self = {} :: types.Logger - self.type = "Logger" - - label = `[{label}] ` - errorInfoUrl = if allowWebLinks then errorInfoUrl else nil - - function self:warn(log) - warn(label .. formatLog(self, log, errorInfoUrl)) - end - - function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) - end - - function self:fatalError(log) - error(label .. formatLog(self, log, errorInfoUrl)) - end - - setmetatable(self :: any, { __index = templates }) - return self -end - -return create diff --git a/dist/npm/logger/src/format-log.luau b/dist/npm/logger/src/format-log.luau deleted file mode 100644 index 3eeda21b..00000000 --- a/dist/npm/logger/src/format-log.luau +++ /dev/null @@ -1,43 +0,0 @@ -local types = require("./types") - -local function formatLog(self: types.Logger, 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 - formattedTemplate = string.gsub(formattedTemplate, "ERROR_MESSAGE", error.message) - end - - local id: string? - - -- TODO: find a better way to do ts while still being ergonomic - for templateKey, template in (self :: any) :: { [string]: string } do - if template == log.template then - id = templateKey - break - end - end - - if id then - formattedTemplate ..= `\nID: {id}` - end - - if errorInfoUrl then - formattedTemplate ..= `\nLearn more: {errorInfoUrl}` - if id then - formattedTemplate ..= `#{string.lower(id)}` - end - end - - if trace then - formattedTemplate ..= `\n---- Stack trace ----\n{trace}` - end - - -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") -end - -return formatLog diff --git a/dist/npm/logger/src/index.d.ts b/dist/npm/logger/src/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/dist/npm/logger/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/dist/npm/logger/src/init.luau b/dist/npm/logger/src/init.luau deleted file mode 100644 index 52760a5d..00000000 --- a/dist/npm/logger/src/init.luau +++ /dev/null @@ -1,18 +0,0 @@ -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 = types.Logger -export type Log = types.Log -export type Error = types.Error - -return table.freeze({ - create = create, - formatLog = formatLog, - parseError = parseError, - allowWebLinks = allowWebLinks, - standardErrorInfoUrl = standardErrorInfoUrl, -}) diff --git a/dist/npm/logger/src/parse-error.luau b/dist/npm/logger/src/parse-error.luau deleted file mode 100644 index e43fe53d..00000000 --- a/dist/npm/logger/src/parse-error.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/dist/npm/logger/src/standard-error-info-url.luau b/dist/npm/logger/src/standard-error-info-url.luau deleted file mode 100644 index 345faf36..00000000 --- a/dist/npm/logger/src/standard-error-info-url.luau +++ /dev/null @@ -1,5 +0,0 @@ -local function standardErrorInfoUrl(label: string): string - return `https://prvdmwrong.luau.page/api-reference/{label}/errors` -end - -return standardErrorInfoUrl diff --git a/dist/npm/logger/src/types.luau b/dist/npm/logger/src/types.luau deleted file mode 100644 index d1699037..00000000 --- a/dist/npm/logger/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -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 & { - type: "Logger", - print: (self: Logger, props: Log) -> (), - warn: (self: Logger, props: Log) -> (), - error: (self: Logger, props: Log) -> (), - fatalError: (self: Logger, props: Log) -> never, -} - -return nil diff --git a/dist/npm/providers/LICENSE.md b/dist/npm/providers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/providers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/providers/dependencies.luau b/dist/npm/providers/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/npm/providers/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/npm/providers/lifecycles.luau b/dist/npm/providers/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/npm/providers/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/npm/providers/logger.luau b/dist/npm/providers/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/npm/providers/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/npm/providers/package.json b/dist/npm/providers/package.json deleted file mode 100644 index 37cbe6b4..00000000 --- a/dist/npm/providers/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/dependencies": "0.2.0-rc.4", - "@prvdmwrong/lifecycles": "0.2.0-rc.4", - "@prvdmwrong/logger": "0.2.0-rc.4", - "@prvdmwrong/runtime": "0.2.0-rc.4" - }, - "description": "Provider creation for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/providers", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/providers/runtime.luau b/dist/npm/providers/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/npm/providers/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/npm/providers/src/create.luau b/dist/npm/providers/src/create.luau deleted file mode 100644 index 016b8a6d..00000000 --- a/dist/npm/providers/src/create.luau +++ /dev/null @@ -1,30 +0,0 @@ -local nameOf = require("./name-of") -local providerClasses = require("./provider-classes") -local types = require("./types") - -local function createProvider(self: Self): types.Provider - local provider: types.Provider = self :: any - - if provider.__index == nil then - provider.__index = provider - end - - if provider.__tostring == nil then - provider.__tostring = nameOf - end - - if provider.new == nil then - function provider.new(dependencies) - local self: types.Provider = setmetatable({}, provider) :: any - if provider.constructor then - return provider.constructor(self, dependencies) or self - end - return self - end - end - - providerClasses[provider] = true - return provider -end - -return createProvider diff --git a/dist/npm/providers/src/index.d.ts b/dist/npm/providers/src/index.d.ts deleted file mode 100644 index 410e31c5..00000000 --- a/dist/npm/providers/src/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "@prvdmwrong/dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/dist/npm/providers/src/init.luau b/dist/npm/providers/src/init.luau deleted file mode 100644 index d678d850..00000000 --- a/dist/npm/providers/src/init.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 = types.Provider - -local providers = table.freeze({ - create = create, - nameOf = nameOf, - _ = table.freeze({ - providerClasses = providerClasses, - }), -}) - -return providers diff --git a/dist/npm/providers/src/name-of.luau b/dist/npm/providers/src/name-of.luau deleted file mode 100644 index 3f86ceec..00000000 --- a/dist/npm/providers/src/name-of.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -local function nameOf(provider: types.Provider) - return provider.name or "Provider" -end - -return nameOf diff --git a/dist/npm/providers/src/provider-classes.luau b/dist/npm/providers/src/provider-classes.luau deleted file mode 100644 index cc57922f..00000000 --- a/dist/npm/providers/src/provider-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local providerClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return providerClasses diff --git a/dist/npm/providers/src/types.luau b/dist/npm/providers/src/types.luau deleted file mode 100644 index 4f4d4dc9..00000000 --- a/dist/npm/providers/src/types.luau +++ /dev/null @@ -1,12 +0,0 @@ -local dependencies = require("../dependencies") - -export type Provider = dependencies.Dependency, - __tostring: (self: Provider) -> string, - name: string?, - constructor: ((self: Provider, dependencies: Dependencies) -> ())?, - start: (self: Provider) -> ()?, - destroy: (self: Provider) -> ()?, -}, Dependencies> - -return nil diff --git a/dist/npm/prvdmwrong/LICENSE.md b/dist/npm/prvdmwrong/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/prvdmwrong/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/prvdmwrong/dependencies.luau b/dist/npm/prvdmwrong/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/npm/prvdmwrong/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/npm/prvdmwrong/lifecycles.luau b/dist/npm/prvdmwrong/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/npm/prvdmwrong/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/npm/prvdmwrong/package.json b/dist/npm/prvdmwrong/package.json deleted file mode 100644 index 9ebac38e..00000000 --- a/dist/npm/prvdmwrong/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/dependencies": "0.2.0-rc.4", - "@prvdmwrong/lifecycles": "0.2.0-rc.4", - "@prvdmwrong/providers": "0.2.0-rc.4", - "@prvdmwrong/roots": "0.2.0-rc.4" - }, - "description": "Entry point to Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/prvdmwrong", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/prvdmwrong/providers.luau b/dist/npm/prvdmwrong/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/npm/prvdmwrong/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/npm/prvdmwrong/roots.luau b/dist/npm/prvdmwrong/roots.luau deleted file mode 100644 index c606c7bd..00000000 --- a/dist/npm/prvdmwrong/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./Packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/npm/prvdmwrong/src/index.d.ts b/dist/npm/prvdmwrong/src/index.d.ts deleted file mode 100644 index 4200df79..00000000 --- a/dist/npm/prvdmwrong/src/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "@prvdmwrong/dependencies"; -import lifecycles from "@prvdmwrong/lifecycles"; -import providers from "@prvdmwrong/providers"; -import roots from "@prvdmwrong/roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/dist/npm/prvdmwrong/src/init.luau b/dist/npm/prvdmwrong/src/init.luau deleted file mode 100644 index 413e2258..00000000 --- a/dist/npm/prvdmwrong/src/init.luau +++ /dev/null @@ -1,44 +0,0 @@ -local dependencies = require("./dependencies") -local lifecycles = require("./lifecycles") -local providers = require("./providers") -local roots = require("./roots") - -export type Provider = providers.Provider -export type Lifecycle = lifecycles.Lifecycle -export type Root = roots.Root -export type StartedRoot = roots.StartedRoot - -local prvd = { - provider = providers.create, - root = roots.create, - depend = dependencies.depend, - nameOf = providers.nameOf, - - lifecycle = lifecycles.create, - fireConcurrent = lifecycles.handlers.fireConcurrent, - fireSequential = lifecycles.handlers.fireSequential, - - hooks = table.freeze({ - onProviderUsed = roots.hooks.onProviderUsed, - onLifecycleUsed = roots.hooks.onLifecycleUsed, - onRootConstructing = roots.hooks.onRootConstructing, - onRootUsed = roots.hooks.onRootUsed, - onRootStarted = roots.hooks.onRootStarted, - onRootFinished = roots.hooks.onRootFinished, - onRootDestroyed = roots.hooks.onRootDestroyed, - - onLifecycleConstructed = lifecycles.hooks.onLifecycleConstructed, - onLifecycleDestroyed = lifecycles.hooks.onLifecycleDestroyed, - onLifecycleRegistered = lifecycles.hooks.onLifecycleRegistered, - onLifecycleUnregistered = lifecycles.hooks.onLifecycleUnregistered, - }), -} - -local mt = {} - -function mt.__call(_, provider: Self): providers.Provider - return providers.create(provider) :: any -end - -table.freeze(mt) -return setmetatable(prvd, mt) diff --git a/dist/npm/rbx-components/LICENSE.md b/dist/npm/rbx-components/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/rbx-components/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/rbx-components/dependencies.luau b/dist/npm/rbx-components/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/npm/rbx-components/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/npm/rbx-components/logger.luau b/dist/npm/rbx-components/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/npm/rbx-components/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/npm/rbx-components/package.json b/dist/npm/rbx-components/package.json deleted file mode 100644 index f7343109..00000000 --- a/dist/npm/rbx-components/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/dependencies": "0.2.0-rc.4", - "@prvdmwrong/logger": "0.2.0-rc.4", - "@prvdmwrong/providers": "0.2.0-rc.4", - "@prvdmwrong/roots": "0.2.0-rc.4" - }, - "description": "Component functionality for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/rbx-components", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/rbx-components/providers.luau b/dist/npm/rbx-components/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/npm/rbx-components/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/npm/rbx-components/roots.luau b/dist/npm/rbx-components/roots.luau deleted file mode 100644 index c606c7bd..00000000 --- a/dist/npm/rbx-components/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./Packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/npm/rbx-components/src/component-classes.luau b/dist/npm/rbx-components/src/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/dist/npm/rbx-components/src/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/dist/npm/rbx-components/src/component-provider.luau b/dist/npm/rbx-components/src/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/dist/npm/rbx-components/src/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/dist/npm/rbx-components/src/create.luau b/dist/npm/rbx-components/src/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/dist/npm/rbx-components/src/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/dist/npm/rbx-components/src/init.luau b/dist/npm/rbx-components/src/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/dist/npm/rbx-components/src/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/dist/npm/rbx-components/src/logger.luau b/dist/npm/rbx-components/src/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/dist/npm/rbx-components/src/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/dist/npm/rbx-components/src/types.luau b/dist/npm/rbx-components/src/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/dist/npm/rbx-components/src/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/dist/npm/rbx-lifecycles/LICENSE.md b/dist/npm/rbx-lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/rbx-lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/rbx-lifecycles/package.json b/dist/npm/rbx-lifecycles/package.json deleted file mode 100644 index 3dffc1ae..00000000 --- a/dist/npm/rbx-lifecycles/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/prvdmwrong": "0.2.0-rc.4" - }, - "description": "Lifecycles implementations for Roblox", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/rbx-lifecycles", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/rbx-lifecycles/prvdmwrong.luau b/dist/npm/rbx-lifecycles/prvdmwrong.luau deleted file mode 100644 index 6f986dff..00000000 --- a/dist/npm/rbx-lifecycles/prvdmwrong.luau +++ /dev/null @@ -1,6 +0,0 @@ -local DEPENDENCY = require("./Packages/prvdmwrong") -export type Root = DEPENDENCY.Root -export type Lifecycle = DEPENDENCY.Lifecycle -export type StartedRoot = DEPENDENCY.StartedRoot -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/npm/rbx-lifecycles/src/index.d.ts b/dist/npm/rbx-lifecycles/src/index.d.ts deleted file mode 100644 index 98361bf5..00000000 --- a/dist/npm/rbx-lifecycles/src/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Lifecycle } from "@prvdmwrong/lifecycles"; -import { Provider } from "@prvdmwrong/providers"; - -declare namespace RbxLifecycles { - export const RbxLifecycles: Provider<{ - preSimulation: Lifecycle<[dt: number]>; - postSimulation: Lifecycle<[dt: number]>; - preAnimation: Lifecycle<[dt: number]>; - preRender: Lifecycle<[dt: number]>; - playerAdded: Lifecycle<[player: Player]>; - playerRemoving: Lifecycle<[player: Player]>; - }>; - - export interface PreSimulation { - preSimulation(dt: number): void; - } - - export interface PostSimulation { - postSimulation(dt: number): void; - } - - export interface PreAnimation { - preAnimation(dt: number): void; - } - - export interface PreRender { - preRender(dt: number): void; - } - - export interface PlayerAdded { - playerAdded(player: Player): void; - } - - export interface PlayerRemoving { - playerRemoving(player: Player): void; - } -} - -export = RbxLifecycles; -export as namespace RbxLifecycles; diff --git a/dist/npm/rbx-lifecycles/src/init.luau b/dist/npm/rbx-lifecycles/src/init.luau deleted file mode 100644 index c1243680..00000000 --- a/dist/npm/rbx-lifecycles/src/init.luau +++ /dev/null @@ -1,67 +0,0 @@ -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 = prvd.lifecycle("preSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.postSimulation = prvd.lifecycle("postSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preAnimation = prvd.lifecycle("preAnimation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preRender = prvd.lifecycle("preRender", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerAdded = prvd.lifecycle("playerAdded", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerRemoving = prvd.lifecycle("playerRemoving", fireConcurrent) :: prvd.Lifecycle - -local function wrapLifecycle(lifecycle: prvd.Lifecycle<...unknown>) - return function(...: unknown) - lifecycle:fire(...) - end -end - -function RbxLifecycles.constructor(self: RbxLifecycles) - self.connections = {} :: { RBXScriptConnection } - - self:_addConnections( - RunService.PreSimulation:Connect(wrapLifecycle(RbxLifecycles.preSimulation :: any)), - RunService.PostSimulation:Connect(wrapLifecycle(RbxLifecycles.postSimulation :: any)), - RunService.PreAnimation:Connect(wrapLifecycle(RbxLifecycles.preAnimation :: any)) - ) - - if RunService:IsClient() then - self:_addConnections(RunService.PreRender:Connect(wrapLifecycle(RbxLifecycles.preRender :: any))) - end - - self:_addConnections( - Players.PlayerAdded:Connect(wrapLifecycle(RbxLifecycles.playerAdded :: any)), - Players.PlayerRemoving:Connect(wrapLifecycle(RbxLifecycles.playerRemoving :: any)) - ) -end - -function RbxLifecycles.finish(self: RbxLifecycles) - for _, connection in self.connections do - if connection.Connected then - connection:Disconnect() - end - end - table.clear(self.connections) -end - -function RbxLifecycles._addConnections(self: RbxLifecycles, ...: RBXScriptConnection) - for index = 1, select("#", ...) do - table.insert(self.connections, select(index, ...) :: any) - end -end - --- Needed so typescript can require the provider as: --- --- ```ts --- import { RbxLifecycles } from "@rbxts/rbx-lifecycles" --- ``` -RbxLifecycles.RbxLifecycles = RbxLifecycles - -export type RbxLifecycles = typeof(RbxLifecycles) -return prvd(RbxLifecycles) diff --git a/dist/npm/roots/LICENSE.md b/dist/npm/roots/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/roots/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/roots/dependencies.luau b/dist/npm/roots/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/npm/roots/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/npm/roots/lifecycles.luau b/dist/npm/roots/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/npm/roots/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/npm/roots/logger.luau b/dist/npm/roots/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/npm/roots/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/npm/roots/package.json b/dist/npm/roots/package.json deleted file mode 100644 index a65ab21b..00000000 --- a/dist/npm/roots/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": { - "@prvdmwrong/dependencies": "0.2.0-rc.4", - "@prvdmwrong/lifecycles": "0.2.0-rc.4", - "@prvdmwrong/logger": "0.2.0-rc.4", - "@prvdmwrong/providers": "0.2.0-rc.4", - "@prvdmwrong/runtime": "0.2.0-rc.4" - }, - "description": "Roots implementation for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/roots", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/roots/providers.luau b/dist/npm/roots/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/npm/roots/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/npm/roots/runtime.luau b/dist/npm/roots/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/npm/roots/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/npm/roots/src/create.luau b/dist/npm/roots/src/create.luau deleted file mode 100644 index 26c14f4e..00000000 --- a/dist/npm/roots/src/create.luau +++ /dev/null @@ -1,47 +0,0 @@ -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-modules") -local useProvider = require("./methods/use-provider") -local useProviders = require("./methods/use-providers") -local useRoot = require("./methods/use-root") -local useRoots = require("./methods/use-roots") -local willFinish = require("./methods/will-finish") -local willStart = require("./methods/will-start") - -local function create(): types.Root - local self: types.Self = { - type = "Root", - - start = start, - - useProvider = useProvider, - useProviders = useProviders, - useModule = useModule, - useModules = useModules, - useRoot = useRoot, - useRoots = useRoots, - destroy = destroy, - - willStart = willStart, - willFinish = willFinish, - - _destroyed = false, - _rootProviders = {}, - _rootLifecycles = {}, - _subRoots = {}, - _start = lifecycles.create("start", lifecycles.handlers.fireConcurrent), - _finish = lifecycles.create("destroy", lifecycles.handlers.fireSequential), - } :: any - - for _, callback in rootConstructing.callbacks do - callback(self) - end - - return self -end - -return create diff --git a/dist/npm/roots/src/index.d.ts b/dist/npm/roots/src/index.d.ts deleted file mode 100644 index 6fadb025..00000000 --- a/dist/npm/roots/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "@prvdmwrong/lifecycles"; -import { Provider } from "@prvdmwrong/providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/dist/npm/roots/src/init.luau b/dist/npm/roots/src/init.luau deleted file mode 100644 index f6aa7495..00000000 --- a/dist/npm/roots/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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/hooks/root-finished") -local rootStarted = require("@self/hooks/root-started") -local rootUsed = require("@self/hooks/root-used") -local types = require("@self/types") - -export type Root = types.Root -export type StartedRoot = types.StartedRoot - -local roots = table.freeze({ - create = create, - hooks = table.freeze({ - onLifecycleUsed = lifecycleUsed.onLifecycleUsed, - onProviderUsed = providerUsed.onProviderUsed, - onRootUsed = rootUsed.onRootUsed, - - onRootConstructing = rootConstructing.onRootConstructing, - onRootStarted = rootStarted.onRootStarted, - onRootFinished = rootFinished.onRootFinished, - onRootDestroyed = rootDestroyed.onRootDestroyed, - }), -}) - -return roots diff --git a/dist/npm/roots/src/logger.luau b/dist/npm/roots/src/logger.luau deleted file mode 100644 index 92e611ef..00000000 --- a/dist/npm/roots/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", -}) diff --git a/dist/npm/roots/src/types.luau b/dist/npm/roots/src/types.luau deleted file mode 100644 index 104143c4..00000000 --- a/dist/npm/roots/src/types.luau +++ /dev/null @@ -1,40 +0,0 @@ -local lifecycles = require("../lifecycles") -local providers = require("../providers") - -type Set = { [T]: true } - -export type Root = { - type: "Root", - - start: (root: Root) -> StartedRoot, - - useModule: (root: Root, module: ModuleScript) -> Root, - useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useRoot: (root: Root, root: Root) -> Root, - useRoots: (root: Root, roots: { Root }) -> Root, - useProvider: (root: Root, provider: providers.Provider) -> Root, - useProviders: (root: Root, providers: { providers.Provider }) -> Root, - useLifecycle: (root: Root, lifecycle: lifecycles.Lifecycle) -> Root, - useLifecycles: (root: Root, lifecycles: { lifecycles.Lifecycle }) -> Root, - destroy: (root: Root) -> (), - - willStart: (callback: () -> ()) -> Root, - willFinish: (callback: () -> ()) -> Root, -} - -export type StartedRoot = { - type: "StartedRoot", - - finish: (root: StartedRoot) -> (), -} - -export type Self = Root & { - _destroyed: boolean, - _rootProviders: Set>, - _rootLifecycles: { lifecycles.Lifecycle }, - _subRoots: Set, - _start: lifecycles.Lifecycle<()>, - _finish: lifecycles.Lifecycle<()>, -} - -return nil diff --git a/dist/npm/runtime/LICENSE.md b/dist/npm/runtime/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/runtime/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/runtime/package.json b/dist/npm/runtime/package.json deleted file mode 100644 index ab51e871..00000000 --- a/dist/npm/runtime/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": {}, - "description": "Runtime agnostic libraries for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/runtime", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/runtime/src/index.d.ts b/dist/npm/runtime/src/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/dist/npm/runtime/src/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/dist/npm/runtime/src/init.luau b/dist/npm/runtime/src/init.luau deleted file mode 100644 index 26bdeee0..00000000 --- a/dist/npm/runtime/src/init.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - - task = task, - warn = warn, - - threadpool = threadpool, -}) diff --git a/dist/npm/runtime/src/types.luau b/dist/npm/runtime/src/types.luau deleted file mode 100644 index ca050fce..00000000 --- a/dist/npm/runtime/src/types.luau +++ /dev/null @@ -1,13 +0,0 @@ -export type Runtime = { - name: string, - priority: number?, - is: () -> boolean, -} - -local function Runtime(x: Runtime) - return table.freeze(x) -end - -return table.freeze({ - Runtime = Runtime, -}) diff --git a/dist/npm/typecheckers/LICENSE.md b/dist/npm/typecheckers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/npm/typecheckers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/npm/typecheckers/package.json b/dist/npm/typecheckers/package.json deleted file mode 100644 index c6bd8d0f..00000000 --- a/dist/npm/typecheckers/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "author": "Fire ", - "bugs": { - "url": "https://github.com/prvdmwrong/prvdmwrong/issues" - }, - "dependencies": {}, - "description": "Typechecking primitives and compatibility for Prvd 'M Wrong", - "files": [ - "src", - "LICENSE.md", - "package.json" - ], - "main": "src/init.luau", - "name": "@prvdmwrong/typecheckers", - "repository": { - "type": "git", - "url": "git+https://github.com/prvdmwrong/prvdmwrong.git" - }, - "types": "src/init.luau", - "version": "0.2.0-rc.4" -} \ No newline at end of file diff --git a/dist/npm/typecheckers/src/init.luau b/dist/npm/typecheckers/src/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/dist/pesde/luau/dependencies/LICENSE.md b/dist/pesde/luau/dependencies/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/dependencies/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/dependencies/lifecycles.luau b/dist/pesde/luau/dependencies/lifecycles.luau deleted file mode 100644 index a79c5172..00000000 --- a/dist/pesde/luau/dependencies/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/luau/dependencies/logger.luau b/dist/pesde/luau/dependencies/logger.luau deleted file mode 100644 index 527ed682..00000000 --- a/dist/pesde/luau/dependencies/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./luau_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/luau/dependencies/pesde.toml b/dist/pesde/luau/dependencies/pesde.toml deleted file mode 100644 index 8533f8d8..00000000 --- a/dist/pesde/luau/dependencies/pesde.toml +++ /dev/null @@ -1,37 +0,0 @@ -authors = ["Fire "] -description = "Dependency resolution logic for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/dependencies" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/dependencies/src/depend.luau b/dist/pesde/luau/dependencies/src/depend.luau deleted file mode 100644 index 55230b4e..00000000 --- a/dist/pesde/luau/dependencies/src/depend.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 locked.", - __index = useBeforeConstructed, - __newindex = useBeforeConstructed, -} - -function unresolvedMt:__tostring() - return "UnresolvedDependency" -end - --- Wtf luau -local function depend(dependency: types.Dependency): typeof(({} :: types.Dependency).new( - (nil :: any) :: Dependencies, - ... -)) - -- Return a mock value that will be resolved during dependency resolution. - return setmetatable({ - type = "UnresolvedDependency", - dependency = dependency, - }, unresolvedMt) :: any -end - -return depend diff --git a/dist/pesde/luau/dependencies/src/index.d.ts b/dist/pesde/luau/dependencies/src/index.d.ts deleted file mode 100644 index a5bddcde..00000000 --- a/dist/pesde/luau/dependencies/src/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Lifecycle } from "../lifecycles"; - -declare namespace dependencies { - export type Dependency = Self & { - dependencies: Dependencies, - priority?: number, - new(dependencies: Dependencies, ...args: NewArgs): Dependency; - }; - - interface ProccessDependencyResult { - sortedDependencies: Dependency[]; - lifecycles: Lifecycle[]; - } - - export type SubdependenciesOf = T extends { dependencies: infer Dependencies } - ? Dependencies - : never; - - export function depend InstanceType>(dependency: T): InstanceType; - export function processDependencies(dependencies: Set>): ProccessDependencyResult; - export function sortByPriority(dependencies: Dependency[]): void; -} - -export = dependencies; -export as namespace dependencies; diff --git a/dist/pesde/luau/dependencies/src/init.luau b/dist/pesde/luau/dependencies/src/init.luau deleted file mode 100644 index e6b27b24..00000000 --- a/dist/pesde/luau/dependencies/src/init.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 = types.Dependency - -return table.freeze({ - depend = depend, - processDependencies = processDependencies, - sortByPriority = sortByPriority, -}) diff --git a/dist/pesde/luau/dependencies/src/logger.luau b/dist/pesde/luau/dependencies/src/logger.luau deleted file mode 100644 index 22f3b307..00000000 --- a/dist/pesde/luau/dependencies/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", - alreadyFinished = "Root has already finished.", -}) diff --git a/dist/pesde/luau/dependencies/src/process-dependencies.luau b/dist/pesde/luau/dependencies/src/process-dependencies.luau deleted file mode 100644 index 20820a35..00000000 --- a/dist/pesde/luau/dependencies/src/process-dependencies.luau +++ /dev/null @@ -1,57 +0,0 @@ -local lifecycles = require("../lifecycles") -local types = require("./types") - -export type ProccessDependencyResult = { - sortedDependencies: { types.Dependency }, - lifecycles: { lifecycles.Lifecycle }, -} - -type Set = { [T]: true } - -local function processDependencies(dependencies: Set>): ProccessDependencyResult - local sortedDependencies = {} - local lifecycles = {} - - -- TODO: optimize ts - local function visitDependency(dependency: types.Dependency) - -- print("Visiting dependency", dependency) - - for key, value in dependency :: any do - if key == "dependencies" then - -- print("Checking [prvd.dependencies]") - if typeof(value) == "table" then - for key, value in value do - -- print("Checking key", key, "value", value) - if typeof(value) == "table" and value.type == "UnresolvedDependency" then - local unresolved: types.UnresolvedDependency = value - -- print("Got unresolved dependency", unresolved.dependency, "visiting") - visitDependency(unresolved.dependency) - end - end - end - - continue - end - - if typeof(value) == "table" and value.type == "Lifecycle" and not table.find(lifecycles, value) then - table.insert(lifecycles, value) - end - end - - if dependencies[dependency] and not table.find(sortedDependencies, dependency) then - -- print("Pushing to sort") - table.insert(sortedDependencies, dependency) - end - end - - for dependency in dependencies do - visitDependency(dependency) - end - - return { - sortedDependencies = sortedDependencies, - lifecycles = lifecycles, - } -end - -return processDependencies diff --git a/dist/pesde/luau/dependencies/src/process-dependencies.spec.luau b/dist/pesde/luau/dependencies/src/process-dependencies.spec.luau deleted file mode 100644 index 0fcfcac8..00000000 --- a/dist/pesde/luau/dependencies/src/process-dependencies.spec.luau +++ /dev/null @@ -1,67 +0,0 @@ -local depend = require("./depend") -local processDependencies = require("./process-dependencies") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -local function nickname(name: string) - return function(tbl: T): T - return setmetatable(tbl :: any, { - __tostring = function() - return name - end, - }) - end -end - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("processDependencies", function() - test("sortedDependencies", function() - local first = nickname("first")({}) - - local second = nickname("second")({ - dependencies = { - toFirst = depend(first :: any), - toFirstAgain = depend(first :: any), - }, - }) - - local third = nickname("third")({ - dependencies = { - toSecond = depend(second :: any), - }, - }) - - local fourth = nickname("fourth")({ - dependencies = { - toFirst = depend(first :: any), - toSecond = depend(second :: any), - toThird = depend(third :: any), - }, - }) - - local processed = processDependencies({ - [first] = true, - [second] = true, - [third] = true, - [fourth] = true, - } :: any) - - expect(typeof(processed)).is("table") - expect(processed).has_key("sortedDependencies") - expect(typeof(processed.sortedDependencies)).is("table") - - local sortedDependencies = processed.sortedDependencies - - expect(typeof(sortedDependencies)).is("table") - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - expect(sortedDependencies[4]).is(fourth) - end) - - test("lifecycles", function() end) - end) -end diff --git a/dist/pesde/luau/dependencies/src/sort-by-priority.luau b/dist/pesde/luau/dependencies/src/sort-by-priority.luau deleted file mode 100644 index 638468ab..00000000 --- a/dist/pesde/luau/dependencies/src/sort-by-priority.luau +++ /dev/null @@ -1,14 +0,0 @@ -local types = require("./types") - -local function sortByPriority(dependencies: { types.Dependency }) - 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) - local rightIndex = table.find(dependencies, right) - return leftIndex < rightIndex - end) -end - -return sortByPriority diff --git a/dist/pesde/luau/dependencies/src/sort-by-priority.spec.luau b/dist/pesde/luau/dependencies/src/sort-by-priority.spec.luau deleted file mode 100644 index eeb34933..00000000 --- a/dist/pesde/luau/dependencies/src/sort-by-priority.spec.luau +++ /dev/null @@ -1,52 +0,0 @@ -local sortByPriority = require("./sort-by-priority") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("sortByPriority", function() - test("dependencies", function() - local first = {} - - local second = { - toFirst = first, - } - - local third = { - toSecond = second, - } - - local sortedDependencies = { - first, - second, - third, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - end) - - test("priority", function() - local low = {} - - local high = { - priority = 500, - } - - local sortedDependencies = { - low, - high, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(high) - expect(sortedDependencies[2]).is(low) - end) - end) -end diff --git a/dist/pesde/luau/dependencies/src/types.luau b/dist/pesde/luau/dependencies/src/types.luau deleted file mode 100644 index 2b1c72aa..00000000 --- a/dist/pesde/luau/dependencies/src/types.luau +++ /dev/null @@ -1,14 +0,0 @@ -export type Dependency = Self & { - dependencies: Dependencies, - priority: number?, - new: (dependencies: Dependencies, NewArgs...) -> Dependency, -} - -export type UnresolvedDependency = { - type: "UnresolvedDependency", - dependency: Dependency, -} - -export type dependencies = { __prvdmwrong_dependencies: never } - -return nil diff --git a/dist/pesde/luau/lifecycles/LICENSE.md b/dist/pesde/luau/lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/lifecycles/logger.luau b/dist/pesde/luau/lifecycles/logger.luau deleted file mode 100644 index 527ed682..00000000 --- a/dist/pesde/luau/lifecycles/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./luau_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/luau/lifecycles/pesde.toml b/dist/pesde/luau/lifecycles/pesde.toml deleted file mode 100644 index a427c0bc..00000000 --- a/dist/pesde/luau/lifecycles/pesde.toml +++ /dev/null @@ -1,37 +0,0 @@ -authors = ["Fire "] -description = "Provider method lifecycles implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/lifecycles" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/lifecycles/runtime.luau b/dist/pesde/luau/lifecycles/runtime.luau deleted file mode 100644 index 0345a532..00000000 --- a/dist/pesde/luau/lifecycles/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/luau/lifecycles/src/create.luau b/dist/pesde/luau/lifecycles/src/create.luau deleted file mode 100644 index 6cdd2891..00000000 --- a/dist/pesde/luau/lifecycles/src/create.luau +++ /dev/null @@ -1,45 +0,0 @@ -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") -local onUnregistered = require("./methods/on-unregistered") -local register = require("./methods/register") -local types = require("./types") -local unregister = require("./methods/unregister") - -local function create( - method: string, - onFire: (lifecycle: types.Lifecycle, Args...) -> () -): types.Lifecycle - local self: types.Self = { - _isDestroyed = false, - _selfRegistered = {}, - _selfUnregistered = {}, - - type = "Lifecycle", - callbacks = {}, - - fire = onFire, - method = method, - register = register, - unregister = unregister, - clear = clear, - onRegistered = onRegistered, - onUnregistered = onUnregistered, - await = await, - destroy = destroy, - } :: any - - methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) - - for _, onLifecycleConstructed in lifecycleConstructed.callbacks do - onLifecycleConstructed(self :: types.Lifecycle) - end - - return self -end - -return create diff --git a/dist/pesde/luau/lifecycles/src/handlers/fire-concurrent.luau b/dist/pesde/luau/lifecycles/src/handlers/fire-concurrent.luau deleted file mode 100644 index f279b888..00000000 --- a/dist/pesde/luau/lifecycles/src/handlers/fire-concurrent.luau +++ /dev/null @@ -1,10 +0,0 @@ -local runtime = require("../../runtime") -local types = require("../types") - -local function fireConcurrent(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - runtime.threadpool.spawn(callback, ...) - end -end - -return fireConcurrent diff --git a/dist/pesde/luau/lifecycles/src/handlers/fire-sequential.luau b/dist/pesde/luau/lifecycles/src/handlers/fire-sequential.luau deleted file mode 100644 index 80911ad9..00000000 --- a/dist/pesde/luau/lifecycles/src/handlers/fire-sequential.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -local function fireSequential(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - callback(...) - end -end - -return fireSequential diff --git a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-constructed.luau b/dist/pesde/luau/lifecycles/src/hooks/lifecycle-constructed.luau deleted file mode 100644 index 8ea4d81b..00000000 --- a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-constructed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleConstructed = onLifecycleConstructed, -}) diff --git a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-destroyed.luau b/dist/pesde/luau/lifecycles/src/hooks/lifecycle-destroyed.luau deleted file mode 100644 index 47abcfab..00000000 --- a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleDestroyed = onLifecycleDestroyed, -}) diff --git a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-registered.luau b/dist/pesde/luau/lifecycles/src/hooks/lifecycle-registered.luau deleted file mode 100644 index fab588a3..00000000 --- a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-registered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleRegistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleRegistered = onLifecycleRegistered, -}) diff --git a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-unregistered.luau b/dist/pesde/luau/lifecycles/src/hooks/lifecycle-unregistered.luau deleted file mode 100644 index 0ec81756..00000000 --- a/dist/pesde/luau/lifecycles/src/hooks/lifecycle-unregistered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleUnregistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUnregistered = onLifecycleUnregistered, -}) diff --git a/dist/pesde/luau/lifecycles/src/index.d.ts b/dist/pesde/luau/lifecycles/src/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/dist/pesde/luau/lifecycles/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/dist/pesde/luau/lifecycles/src/init.luau b/dist/pesde/luau/lifecycles/src/init.luau deleted file mode 100644 index dbec091b..00000000 --- a/dist/pesde/luau/lifecycles/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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 lifecycleRegistered = require("@self/hooks/lifecycle-registered") -local lifecycleUnregistered = require("@self/hooks/lifecycle-unregistered") -local methodToLifecycles = require("@self/method-to-lifecycles") -local types = require("@self/types") - -export type Lifecycle = types.Lifecycle - -return table.freeze({ - create = create, - handlers = table.freeze({ - fireConcurrent = fireConcurrent, - fireSequential = fireSequential, - }), - hooks = table.freeze({ - onLifecycleRegistered = lifecycleRegistered.onLifecycleRegistered, - onLifecycleUnregistered = lifecycleUnregistered.onLifecycleUnregistered, - onLifecycleConstructed = lifecycleConstructed.onLifecycleConstructed, - onLifecycleDestroyed = lifecycleDestroyed.onLifecycleDestroyed, - }), - _ = table.freeze({ - methodToLifecycles = methodToLifecycles, - }), -}) diff --git a/dist/pesde/luau/lifecycles/src/logger.luau b/dist/pesde/luau/lifecycles/src/logger.luau deleted file mode 100644 index 3ae7c27e..00000000 --- a/dist/pesde/luau/lifecycles/src/logger.luau +++ /dev/null @@ -1,6 +0,0 @@ -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.", -}) diff --git a/dist/pesde/luau/lifecycles/src/method-to-lifecycles.luau b/dist/pesde/luau/lifecycles/src/method-to-lifecycles.luau deleted file mode 100644 index 386a8756..00000000 --- a/dist/pesde/luau/lifecycles/src/method-to-lifecycles.luau +++ /dev/null @@ -1,5 +0,0 @@ -local types = require("./types") - -local methodToLifecycles: { [string]: { types.Lifecycle } } = {} - -return methodToLifecycles diff --git a/dist/pesde/luau/lifecycles/src/methods/await.luau b/dist/pesde/luau/lifecycles/src/methods/await.luau deleted file mode 100644 index ed8299d6..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/await.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function await(lifecycle: types.Self): Args... - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local currentThread = coroutine.running() - local function callback(...: Args...) - lifecycle:unregister(callback) - coroutine.resume(currentThread, ...) - end - lifecycle:register(callback) - return coroutine.yield() -end - -return await diff --git a/dist/pesde/luau/lifecycles/src/methods/destroy.luau b/dist/pesde/luau/lifecycles/src/methods/destroy.luau deleted file mode 100644 index d9d5d6cc..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/destroy.luau +++ /dev/null @@ -1,18 +0,0 @@ -local lifecycleDestroyed = require("../hooks/lifecycle-destroyed") -local logger = require("../logger") -local methodToLifecycles = require("../method-to-lifecycles") -local types = require("../types") - -local function destroy(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.alreadyDestroyed }) - end - table.remove(methodToLifecycles[lifecycle.method], table.find(methodToLifecycles[lifecycle.method], lifecycle)) - table.clear(lifecycle.callbacks) - for _, callback in lifecycleDestroyed.callbacks do - callback(lifecycle) - end - lifecycle._isDestroyed = true -end - -return destroy diff --git a/dist/pesde/luau/lifecycles/src/methods/on-registered.luau b/dist/pesde/luau/lifecycles/src/methods/on-registered.luau deleted file mode 100644 index 7ddb009a..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/on-registered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onRegistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end - table.insert(lifecycle._selfRegistered, listener) - return function() - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end -end - -return onRegistered diff --git a/dist/pesde/luau/lifecycles/src/methods/on-unregistered.luau b/dist/pesde/luau/lifecycles/src/methods/on-unregistered.luau deleted file mode 100644 index 842040ec..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/on-unregistered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onUnregistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end - table.insert(lifecycle._selfUnregistered, listener) - return function() - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end -end - -return onUnregistered diff --git a/dist/pesde/luau/lifecycles/src/methods/register.luau b/dist/pesde/luau/lifecycles/src/methods/register.luau deleted file mode 100644 index 3fd74d56..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/register.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function register(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle.callbacks, table.find(lifecycle.callbacks, callback)) - end - table.insert(lifecycle.callbacks, callback) - threadpool.spawnCallbacks(lifecycle._selfRegistered, callback) -end - -return register diff --git a/dist/pesde/luau/lifecycles/src/methods/unregister-all.luau b/dist/pesde/luau/lifecycles/src/methods/unregister-all.luau deleted file mode 100644 index 5e6235af..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/unregister-all.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function clear(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - for _, callback in lifecycle.callbacks do - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end - table.clear(lifecycle.callbacks) -end - -return clear diff --git a/dist/pesde/luau/lifecycles/src/methods/unregister.luau b/dist/pesde/luau/lifecycles/src/methods/unregister.luau deleted file mode 100644 index 0ca7223f..00000000 --- a/dist/pesde/luau/lifecycles/src/methods/unregister.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function unregister(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local index = table.find(lifecycle.callbacks, callback) - if index then - table.remove(lifecycle.callbacks, index) - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end -end - -return unregister diff --git a/dist/pesde/luau/lifecycles/src/types.luau b/dist/pesde/luau/lifecycles/src/types.luau deleted file mode 100644 index f2931b52..00000000 --- a/dist/pesde/luau/lifecycles/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -export type Lifecycle = { - type: "Lifecycle", - - callbacks: { (Args...) -> () }, - method: string, - - register: (self: Lifecycle, callback: (Args...) -> ()) -> (), - fire: (self: Lifecycle, Args...) -> (), - unregister: (self: Lifecycle, callback: (Args...) -> ()) -> (), - clear: (self: Lifecycle) -> (), - onRegistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - onUnregistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - await: (self: Lifecycle) -> Args..., - destroy: (self: Lifecycle) -> (), -} - -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - -return nil diff --git a/dist/pesde/luau/logger/LICENSE.md b/dist/pesde/luau/logger/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/logger/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/logger/pesde.toml b/dist/pesde/luau/logger/pesde.toml deleted file mode 100644 index fcf24d8d..00000000 --- a/dist/pesde/luau/logger/pesde.toml +++ /dev/null @@ -1,30 +0,0 @@ -authors = ["Fire "] -description = "Logging for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", - "runtime.luau", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/logger" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", - "runtime.luau", - "runtime.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/logger/runtime.luau b/dist/pesde/luau/logger/runtime.luau deleted file mode 100644 index 0345a532..00000000 --- a/dist/pesde/luau/logger/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/luau/logger/src/allow-web-links.luau b/dist/pesde/luau/logger/src/allow-web-links.luau deleted file mode 100644 index dcd0bb82..00000000 --- a/dist/pesde/luau/logger/src/allow-web-links.luau +++ /dev/null @@ -1,5 +0,0 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks diff --git a/dist/pesde/luau/logger/src/create.luau b/dist/pesde/luau/logger/src/create.luau deleted file mode 100644 index 943aab25..00000000 --- a/dist/pesde/luau/logger/src/create.luau +++ /dev/null @@ -1,32 +0,0 @@ -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(label: string, errorInfoUrl: string?, templates: T): types.Logger - local self = {} :: types.Logger - self.type = "Logger" - - label = `[{label}] ` - errorInfoUrl = if allowWebLinks then errorInfoUrl else nil - - function self:warn(log) - warn(label .. formatLog(self, log, errorInfoUrl)) - end - - function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) - end - - function self:fatalError(log) - error(label .. formatLog(self, log, errorInfoUrl)) - end - - setmetatable(self :: any, { __index = templates }) - return self -end - -return create diff --git a/dist/pesde/luau/logger/src/format-log.luau b/dist/pesde/luau/logger/src/format-log.luau deleted file mode 100644 index 3eeda21b..00000000 --- a/dist/pesde/luau/logger/src/format-log.luau +++ /dev/null @@ -1,43 +0,0 @@ -local types = require("./types") - -local function formatLog(self: types.Logger, 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 - formattedTemplate = string.gsub(formattedTemplate, "ERROR_MESSAGE", error.message) - end - - local id: string? - - -- TODO: find a better way to do ts while still being ergonomic - for templateKey, template in (self :: any) :: { [string]: string } do - if template == log.template then - id = templateKey - break - end - end - - if id then - formattedTemplate ..= `\nID: {id}` - end - - if errorInfoUrl then - formattedTemplate ..= `\nLearn more: {errorInfoUrl}` - if id then - formattedTemplate ..= `#{string.lower(id)}` - end - end - - if trace then - formattedTemplate ..= `\n---- Stack trace ----\n{trace}` - end - - -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") -end - -return formatLog diff --git a/dist/pesde/luau/logger/src/index.d.ts b/dist/pesde/luau/logger/src/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/dist/pesde/luau/logger/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/dist/pesde/luau/logger/src/init.luau b/dist/pesde/luau/logger/src/init.luau deleted file mode 100644 index 52760a5d..00000000 --- a/dist/pesde/luau/logger/src/init.luau +++ /dev/null @@ -1,18 +0,0 @@ -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 = types.Logger -export type Log = types.Log -export type Error = types.Error - -return table.freeze({ - create = create, - formatLog = formatLog, - parseError = parseError, - allowWebLinks = allowWebLinks, - standardErrorInfoUrl = standardErrorInfoUrl, -}) diff --git a/dist/pesde/luau/logger/src/parse-error.luau b/dist/pesde/luau/logger/src/parse-error.luau deleted file mode 100644 index e43fe53d..00000000 --- a/dist/pesde/luau/logger/src/parse-error.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/dist/pesde/luau/logger/src/standard-error-info-url.luau b/dist/pesde/luau/logger/src/standard-error-info-url.luau deleted file mode 100644 index 345faf36..00000000 --- a/dist/pesde/luau/logger/src/standard-error-info-url.luau +++ /dev/null @@ -1,5 +0,0 @@ -local function standardErrorInfoUrl(label: string): string - return `https://prvdmwrong.luau.page/api-reference/{label}/errors` -end - -return standardErrorInfoUrl diff --git a/dist/pesde/luau/logger/src/types.luau b/dist/pesde/luau/logger/src/types.luau deleted file mode 100644 index d1699037..00000000 --- a/dist/pesde/luau/logger/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -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 & { - type: "Logger", - print: (self: Logger, props: Log) -> (), - warn: (self: Logger, props: Log) -> (), - error: (self: Logger, props: Log) -> (), - fatalError: (self: Logger, props: Log) -> never, -} - -return nil diff --git a/dist/pesde/luau/providers/LICENSE.md b/dist/pesde/luau/providers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/providers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/providers/dependencies.luau b/dist/pesde/luau/providers/dependencies.luau deleted file mode 100644 index 61b0667d..00000000 --- a/dist/pesde/luau/providers/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/luau/providers/lifecycles.luau b/dist/pesde/luau/providers/lifecycles.luau deleted file mode 100644 index a79c5172..00000000 --- a/dist/pesde/luau/providers/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/luau/providers/logger.luau b/dist/pesde/luau/providers/logger.luau deleted file mode 100644 index 527ed682..00000000 --- a/dist/pesde/luau/providers/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./luau_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/luau/providers/pesde.toml b/dist/pesde/luau/providers/pesde.toml deleted file mode 100644 index c2fc7605..00000000 --- a/dist/pesde/luau/providers/pesde.toml +++ /dev/null @@ -1,51 +0,0 @@ -authors = ["Fire "] -description = "Provider creation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/providers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/providers/runtime.luau b/dist/pesde/luau/providers/runtime.luau deleted file mode 100644 index 0345a532..00000000 --- a/dist/pesde/luau/providers/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/luau/providers/src/create.luau b/dist/pesde/luau/providers/src/create.luau deleted file mode 100644 index 016b8a6d..00000000 --- a/dist/pesde/luau/providers/src/create.luau +++ /dev/null @@ -1,30 +0,0 @@ -local nameOf = require("./name-of") -local providerClasses = require("./provider-classes") -local types = require("./types") - -local function createProvider(self: Self): types.Provider - local provider: types.Provider = self :: any - - if provider.__index == nil then - provider.__index = provider - end - - if provider.__tostring == nil then - provider.__tostring = nameOf - end - - if provider.new == nil then - function provider.new(dependencies) - local self: types.Provider = setmetatable({}, provider) :: any - if provider.constructor then - return provider.constructor(self, dependencies) or self - end - return self - end - end - - providerClasses[provider] = true - return provider -end - -return createProvider diff --git a/dist/pesde/luau/providers/src/index.d.ts b/dist/pesde/luau/providers/src/index.d.ts deleted file mode 100644 index 2ab36e15..00000000 --- a/dist/pesde/luau/providers/src/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "../dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/dist/pesde/luau/providers/src/init.luau b/dist/pesde/luau/providers/src/init.luau deleted file mode 100644 index d678d850..00000000 --- a/dist/pesde/luau/providers/src/init.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 = types.Provider - -local providers = table.freeze({ - create = create, - nameOf = nameOf, - _ = table.freeze({ - providerClasses = providerClasses, - }), -}) - -return providers diff --git a/dist/pesde/luau/providers/src/name-of.luau b/dist/pesde/luau/providers/src/name-of.luau deleted file mode 100644 index 3f86ceec..00000000 --- a/dist/pesde/luau/providers/src/name-of.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -local function nameOf(provider: types.Provider) - return provider.name or "Provider" -end - -return nameOf diff --git a/dist/pesde/luau/providers/src/provider-classes.luau b/dist/pesde/luau/providers/src/provider-classes.luau deleted file mode 100644 index cc57922f..00000000 --- a/dist/pesde/luau/providers/src/provider-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local providerClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return providerClasses diff --git a/dist/pesde/luau/providers/src/types.luau b/dist/pesde/luau/providers/src/types.luau deleted file mode 100644 index 4f4d4dc9..00000000 --- a/dist/pesde/luau/providers/src/types.luau +++ /dev/null @@ -1,12 +0,0 @@ -local dependencies = require("../dependencies") - -export type Provider = dependencies.Dependency, - __tostring: (self: Provider) -> string, - name: string?, - constructor: ((self: Provider, dependencies: Dependencies) -> ())?, - start: (self: Provider) -> ()?, - destroy: (self: Provider) -> ()?, -}, Dependencies> - -return nil diff --git a/dist/pesde/luau/prvdmwrong/LICENSE.md b/dist/pesde/luau/prvdmwrong/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/prvdmwrong/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/prvdmwrong/dependencies.luau b/dist/pesde/luau/prvdmwrong/dependencies.luau deleted file mode 100644 index 61b0667d..00000000 --- a/dist/pesde/luau/prvdmwrong/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/luau/prvdmwrong/lifecycles.luau b/dist/pesde/luau/prvdmwrong/lifecycles.luau deleted file mode 100644 index a79c5172..00000000 --- a/dist/pesde/luau/prvdmwrong/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/luau/prvdmwrong/pesde.toml b/dist/pesde/luau/prvdmwrong/pesde.toml deleted file mode 100644 index c24ca094..00000000 --- a/dist/pesde/luau/prvdmwrong/pesde.toml +++ /dev/null @@ -1,51 +0,0 @@ -authors = ["Fire "] -description = "Entry point to Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/prvdmwrong" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/prvdmwrong/providers.luau b/dist/pesde/luau/prvdmwrong/providers.luau deleted file mode 100644 index 46125aaa..00000000 --- a/dist/pesde/luau/prvdmwrong/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/luau/prvdmwrong/roots.luau b/dist/pesde/luau/prvdmwrong/roots.luau deleted file mode 100644 index 33a0058a..00000000 --- a/dist/pesde/luau/prvdmwrong/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./luau_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/luau/prvdmwrong/src/index.d.ts b/dist/pesde/luau/prvdmwrong/src/index.d.ts deleted file mode 100644 index 2058129c..00000000 --- a/dist/pesde/luau/prvdmwrong/src/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "../dependencies"; -import lifecycles from "../lifecycles"; -import providers from "../providers"; -import roots from "../roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/dist/pesde/luau/prvdmwrong/src/init.luau b/dist/pesde/luau/prvdmwrong/src/init.luau deleted file mode 100644 index 413e2258..00000000 --- a/dist/pesde/luau/prvdmwrong/src/init.luau +++ /dev/null @@ -1,44 +0,0 @@ -local dependencies = require("./dependencies") -local lifecycles = require("./lifecycles") -local providers = require("./providers") -local roots = require("./roots") - -export type Provider = providers.Provider -export type Lifecycle = lifecycles.Lifecycle -export type Root = roots.Root -export type StartedRoot = roots.StartedRoot - -local prvd = { - provider = providers.create, - root = roots.create, - depend = dependencies.depend, - nameOf = providers.nameOf, - - lifecycle = lifecycles.create, - fireConcurrent = lifecycles.handlers.fireConcurrent, - fireSequential = lifecycles.handlers.fireSequential, - - hooks = table.freeze({ - onProviderUsed = roots.hooks.onProviderUsed, - onLifecycleUsed = roots.hooks.onLifecycleUsed, - onRootConstructing = roots.hooks.onRootConstructing, - onRootUsed = roots.hooks.onRootUsed, - onRootStarted = roots.hooks.onRootStarted, - onRootFinished = roots.hooks.onRootFinished, - onRootDestroyed = roots.hooks.onRootDestroyed, - - onLifecycleConstructed = lifecycles.hooks.onLifecycleConstructed, - onLifecycleDestroyed = lifecycles.hooks.onLifecycleDestroyed, - onLifecycleRegistered = lifecycles.hooks.onLifecycleRegistered, - onLifecycleUnregistered = lifecycles.hooks.onLifecycleUnregistered, - }), -} - -local mt = {} - -function mt.__call(_, provider: Self): providers.Provider - return providers.create(provider) :: any -end - -table.freeze(mt) -return setmetatable(prvd, mt) diff --git a/dist/pesde/luau/rbx-components/LICENSE.md b/dist/pesde/luau/rbx-components/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/rbx-components/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/rbx-components/dependencies.luau b/dist/pesde/luau/rbx-components/dependencies.luau deleted file mode 100644 index 61b0667d..00000000 --- a/dist/pesde/luau/rbx-components/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/luau/rbx-components/logger.luau b/dist/pesde/luau/rbx-components/logger.luau deleted file mode 100644 index 527ed682..00000000 --- a/dist/pesde/luau/rbx-components/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./luau_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/luau/rbx-components/pesde.toml b/dist/pesde/luau/rbx-components/pesde.toml deleted file mode 100644 index 3891a15e..00000000 --- a/dist/pesde/luau/rbx-components/pesde.toml +++ /dev/null @@ -1,51 +0,0 @@ -authors = ["Fire "] -description = "Component functionality for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/rbx_components" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/rbx-components/providers.luau b/dist/pesde/luau/rbx-components/providers.luau deleted file mode 100644 index 46125aaa..00000000 --- a/dist/pesde/luau/rbx-components/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/luau/rbx-components/roots.luau b/dist/pesde/luau/rbx-components/roots.luau deleted file mode 100644 index 33a0058a..00000000 --- a/dist/pesde/luau/rbx-components/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./luau_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/luau/rbx-components/src/component-classes.luau b/dist/pesde/luau/rbx-components/src/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/dist/pesde/luau/rbx-components/src/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/dist/pesde/luau/rbx-components/src/component-provider.luau b/dist/pesde/luau/rbx-components/src/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/dist/pesde/luau/rbx-components/src/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/dist/pesde/luau/rbx-components/src/create.luau b/dist/pesde/luau/rbx-components/src/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/dist/pesde/luau/rbx-components/src/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/dist/pesde/luau/rbx-components/src/extend-root/create-component-class-provider.luau b/dist/pesde/luau/rbx-components/src/extend-root/create-component-class-provider.luau deleted file mode 100644 index 9d5ae999..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/create-component-class-provider.luau +++ /dev/null @@ -1,31 +0,0 @@ -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.dependencies = table.freeze({ - componentProvider = ComponentProvider, -}) - -ComponentClassProvider._components = {} :: { types.AnyComponent } - -function ComponentClassProvider.constructor( - self: ComponentClassProvider, - dependencies: typeof(ComponentClassProvider.dependencies) -) - for _, class in self._components do - dependencies.componentProvider:addComponentClass(class) - end -end - -export type ComponentClassProvider = typeof(ComponentClassProvider) - -local function createComponentClassProvider(components: { types.AnyComponent }) - local provider = table.clone(ComponentClassProvider) - provider._components = components - return providers.create(provider) -end - -return createComponentClassProvider diff --git a/dist/pesde/luau/rbx-components/src/extend-root/init.luau b/dist/pesde/luau/rbx-components/src/extend-root/init.luau deleted file mode 100644 index 6e9f0578..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/init.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 = require("@self/use-components") -local useModuleAsComponent = require("@self/use-module-as-component") -local useModulesAsComponents = require("@self/use-modules-as-components") - -local function extendRoot(root: types.RootPrivate): types.Root - if root._hasComponentExtensions then - return logger:fatalError({ template = logger.alreadyExtendedRoot }) - end - - root._hasComponentExtensions = true - root._classes = {} - - root:useProvider(ComponentProvider) - root:useProvider(createComponentClassProvider(root._classes)) - - root.useComponent = useComponent :: any - root.useComponents = useComponents :: any - root.useModuleAsComponent = useModuleAsComponent :: any - root.useModulesAsComponents = useModulesAsComponents :: any - - return root -end - -return extendRoot :: (root: roots.Root) -> types.Root diff --git a/dist/pesde/luau/rbx-components/src/extend-root/use-component.luau b/dist/pesde/luau/rbx-components/src/extend-root/use-component.luau deleted file mode 100644 index b0bd8d1f..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/use-component.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function useComponent(root: types.RootPrivate, component: types.AnyComponent) - table.insert(root._classes, component) - return root -end - -return useComponent diff --git a/dist/pesde/luau/rbx-components/src/extend-root/use-components.luau b/dist/pesde/luau/rbx-components/src/extend-root/use-components.luau deleted file mode 100644 index 809a4006..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/use-components.luau +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/dist/pesde/luau/rbx-components/src/extend-root/use-module-as-component.luau b/dist/pesde/luau/rbx-components/src/extend-root/use-module-as-component.luau deleted file mode 100644 index 46724fe7..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/use-module-as-component.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 useModuleAsComponent diff --git a/dist/pesde/luau/rbx-components/src/extend-root/use-modules-as-components.luau b/dist/pesde/luau/rbx-components/src/extend-root/use-modules-as-components.luau deleted file mode 100644 index bababafa..00000000 --- a/dist/pesde/luau/rbx-components/src/extend-root/use-modules-as-components.luau +++ /dev/null @@ -1,28 +0,0 @@ -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") then - continue - end - - if predicate and not predicate(module) then - continue - end - - local required = (require)(module) - if componentClasses[required] then - table.insert(root, required) - end - end - return root -end - -return useModulesAsComponents diff --git a/dist/pesde/luau/rbx-components/src/init.luau b/dist/pesde/luau/rbx-components/src/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/dist/pesde/luau/rbx-components/src/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/dist/pesde/luau/rbx-components/src/logger.luau b/dist/pesde/luau/rbx-components/src/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/dist/pesde/luau/rbx-components/src/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/dist/pesde/luau/rbx-components/src/types.luau b/dist/pesde/luau/rbx-components/src/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/dist/pesde/luau/rbx-components/src/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/dist/pesde/luau/roots/LICENSE.md b/dist/pesde/luau/roots/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/roots/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/roots/dependencies.luau b/dist/pesde/luau/roots/dependencies.luau deleted file mode 100644 index 61b0667d..00000000 --- a/dist/pesde/luau/roots/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/luau/roots/lifecycles.luau b/dist/pesde/luau/roots/lifecycles.luau deleted file mode 100644 index a79c5172..00000000 --- a/dist/pesde/luau/roots/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/luau/roots/logger.luau b/dist/pesde/luau/roots/logger.luau deleted file mode 100644 index 527ed682..00000000 --- a/dist/pesde/luau/roots/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./luau_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/luau/roots/pesde.toml b/dist/pesde/luau/roots/pesde.toml deleted file mode 100644 index f79259d3..00000000 --- a/dist/pesde/luau/roots/pesde.toml +++ /dev/null @@ -1,58 +0,0 @@ -authors = ["Fire "] -description = "Roots implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/roots" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -environment = "luau" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/luau/roots/providers.luau b/dist/pesde/luau/roots/providers.luau deleted file mode 100644 index 46125aaa..00000000 --- a/dist/pesde/luau/roots/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/luau/roots/runtime.luau b/dist/pesde/luau/roots/runtime.luau deleted file mode 100644 index 0345a532..00000000 --- a/dist/pesde/luau/roots/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./luau_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/luau/roots/src/create.luau b/dist/pesde/luau/roots/src/create.luau deleted file mode 100644 index 26c14f4e..00000000 --- a/dist/pesde/luau/roots/src/create.luau +++ /dev/null @@ -1,47 +0,0 @@ -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-modules") -local useProvider = require("./methods/use-provider") -local useProviders = require("./methods/use-providers") -local useRoot = require("./methods/use-root") -local useRoots = require("./methods/use-roots") -local willFinish = require("./methods/will-finish") -local willStart = require("./methods/will-start") - -local function create(): types.Root - local self: types.Self = { - type = "Root", - - start = start, - - useProvider = useProvider, - useProviders = useProviders, - useModule = useModule, - useModules = useModules, - useRoot = useRoot, - useRoots = useRoots, - destroy = destroy, - - willStart = willStart, - willFinish = willFinish, - - _destroyed = false, - _rootProviders = {}, - _rootLifecycles = {}, - _subRoots = {}, - _start = lifecycles.create("start", lifecycles.handlers.fireConcurrent), - _finish = lifecycles.create("destroy", lifecycles.handlers.fireSequential), - } :: any - - for _, callback in rootConstructing.callbacks do - callback(self) - end - - return self -end - -return create diff --git a/dist/pesde/luau/roots/src/hooks/lifecycle-used.luau b/dist/pesde/luau/roots/src/hooks/lifecycle-used.luau deleted file mode 100644 index bd29276a..00000000 --- a/dist/pesde/luau/roots/src/hooks/lifecycle-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUsed = onLifecycleUsed, -}) diff --git a/dist/pesde/luau/roots/src/hooks/provider-used.luau b/dist/pesde/luau/roots/src/hooks/provider-used.luau deleted file mode 100644 index dac2573c..00000000 --- a/dist/pesde/luau/roots/src/hooks/provider-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -local providers = require("../../providers") -local types = require("../types") - -local callbacks: { (root: types.Self, provider: providers.Provider) -> () } = {} - -local function onProviderUsed(listener: (root: types.Root, provider: providers.Provider) -> ()): () -> () - table.insert(callbacks, listener) - return function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onProviderUsed = onProviderUsed, -}) diff --git a/dist/pesde/luau/roots/src/hooks/root-constructing.luau b/dist/pesde/luau/roots/src/hooks/root-constructing.luau deleted file mode 100644 index 5fb8b819..00000000 --- a/dist/pesde/luau/roots/src/hooks/root-constructing.luau +++ /dev/null @@ -1,15 +0,0 @@ -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({ - callbacks = callbacks, - onRootConstructing = onRootConstructing, -}) diff --git a/dist/pesde/luau/roots/src/hooks/root-destroyed.luau b/dist/pesde/luau/roots/src/hooks/root-destroyed.luau deleted file mode 100644 index 10b79b54..00000000 --- a/dist/pesde/luau/roots/src/hooks/root-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootDestroyed = onRootDestroyed, -}) diff --git a/dist/pesde/luau/roots/src/hooks/root-finished.luau b/dist/pesde/luau/roots/src/hooks/root-finished.luau deleted file mode 100644 index d3519cea..00000000 --- a/dist/pesde/luau/roots/src/hooks/root-finished.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootFinished = onRootFinished, -}) diff --git a/dist/pesde/luau/roots/src/hooks/root-started.luau b/dist/pesde/luau/roots/src/hooks/root-started.luau deleted file mode 100644 index 2ae6f90c..00000000 --- a/dist/pesde/luau/roots/src/hooks/root-started.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootStarted = onRootStarted, -}) diff --git a/dist/pesde/luau/roots/src/hooks/root-used.luau b/dist/pesde/luau/roots/src/hooks/root-used.luau deleted file mode 100644 index 71f172cc..00000000 --- a/dist/pesde/luau/roots/src/hooks/root-used.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 -end - -return table.freeze({ - callbacks = callbacks, - onRootUsed = onRootUsed, -}) diff --git a/dist/pesde/luau/roots/src/index.d.ts b/dist/pesde/luau/roots/src/index.d.ts deleted file mode 100644 index d8e100c5..00000000 --- a/dist/pesde/luau/roots/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/dist/pesde/luau/roots/src/init.luau b/dist/pesde/luau/roots/src/init.luau deleted file mode 100644 index f6aa7495..00000000 --- a/dist/pesde/luau/roots/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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/hooks/root-finished") -local rootStarted = require("@self/hooks/root-started") -local rootUsed = require("@self/hooks/root-used") -local types = require("@self/types") - -export type Root = types.Root -export type StartedRoot = types.StartedRoot - -local roots = table.freeze({ - create = create, - hooks = table.freeze({ - onLifecycleUsed = lifecycleUsed.onLifecycleUsed, - onProviderUsed = providerUsed.onProviderUsed, - onRootUsed = rootUsed.onRootUsed, - - onRootConstructing = rootConstructing.onRootConstructing, - onRootStarted = rootStarted.onRootStarted, - onRootFinished = rootFinished.onRootFinished, - onRootDestroyed = rootDestroyed.onRootDestroyed, - }), -}) - -return roots diff --git a/dist/pesde/luau/roots/src/logger.luau b/dist/pesde/luau/roots/src/logger.luau deleted file mode 100644 index 92e611ef..00000000 --- a/dist/pesde/luau/roots/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", -}) diff --git a/dist/pesde/luau/roots/src/methods/destroy.luau b/dist/pesde/luau/roots/src/methods/destroy.luau deleted file mode 100644 index 0c62a935..00000000 --- a/dist/pesde/luau/roots/src/methods/destroy.luau +++ /dev/null @@ -1,16 +0,0 @@ -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._subRoots) - root._start:clear() - root._finish:clear() -end - -return destroy diff --git a/dist/pesde/luau/roots/src/methods/start.luau b/dist/pesde/luau/roots/src/methods/start.luau deleted file mode 100644 index 3f24dac5..00000000 --- a/dist/pesde/luau/roots/src/methods/start.luau +++ /dev/null @@ -1,102 +0,0 @@ -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 = require("../types") - -local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) - local lifecycleMethod = (provider :: any)[lifecycle.method] - if typeof(lifecycleMethod) == "function" then - -- local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES - - -- if isProfiling then - -- lifecycle:register(function(...) - -- debug.profilebegin(memoryCategory) - -- debug.setmemorycategory(memoryCategory) - -- lifecycleMethod(provider, ...) - -- debug.resetmemorycategory() - -- debug.profileend() - -- end) - -- else - lifecycle:register(function(...) - lifecycleMethod(provider, ...) - end) - -- end - end -end - -local function nameOf(provider: providers.Provider, extension: string?): string - return if extension then `{tostring(provider)}.{extension}` else tostring(provider) -end - -local function start(root: types.Self): types.StartedRoot - local processed = dependencies.processDependencies(root._rootProviders) - local sortedProviders = processed.sortedDependencies :: { providers.Provider } - local processedLifecycles = processed.lifecycles - table.move(root._rootLifecycles, 1, #root._rootLifecycles, #processedLifecycles + 1, processedLifecycles) - - dependencies.sortByPriority(sortedProviders) - - local constructedProviders = {} - for _, provider in sortedProviders do - local providerDependencies = (provider :: any).dependencies - if typeof(providerDependencies) == "table" then - providerDependencies = table.clone(providerDependencies) - for key, value in providerDependencies do - providerDependencies[key] = constructedProviders[value] - end - end - - local constructed = provider.new(providerDependencies) - constructedProviders[provider] = constructed - bindLifecycle(root._start, constructed) - bindLifecycle(root._finish, constructed) - - for _, lifecycle in processedLifecycles do - bindLifecycle(lifecycle, constructed) - end - end - - local subRoots: { types.StartedRoot } = {} - for root in root._subRoots do - table.insert(subRoots, root:start()) - end - - root._start:fire() - - local startedRoot = {} :: types.StartedRoot - startedRoot.type = "StartedRoot" - - local didFinish = false - - function startedRoot:finish() - if didFinish then - return logger:fatalError({ template = logger.alreadyFinished }) - end - - didFinish = true - root._finish:fire() - - -- NOTE(znotfireman): Assume the user cleans up their own lifecycles - root._start:clear() - root._finish:clear() - - for _, subRoot in subRoots do - subRoot:finish() - end - - for _, hook in rootFinished do - hook(root) - end - end - - for _, hook in rootStarted do - hook(root) - end - - return startedRoot -end - -return start diff --git a/dist/pesde/luau/roots/src/methods/use-lifecycle.luau b/dist/pesde/luau/roots/src/methods/use-lifecycle.luau deleted file mode 100644 index 862c2d07..00000000 --- a/dist/pesde/luau/roots/src/methods/use-lifecycle.luau +++ /dev/null @@ -1,14 +0,0 @@ -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.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - return root -end - -return useLifecycle diff --git a/dist/pesde/luau/roots/src/methods/use-lifecycles.luau b/dist/pesde/luau/roots/src/methods/use-lifecycles.luau deleted file mode 100644 index 3f12341f..00000000 --- a/dist/pesde/luau/roots/src/methods/use-lifecycles.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 _, lifecycle in lifecycles do - table.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - end - return root -end - -return useLifecycles diff --git a/dist/pesde/luau/roots/src/methods/use-module.luau b/dist/pesde/luau/roots/src/methods/use-module.luau deleted file mode 100644 index a96b3d17..00000000 --- a/dist/pesde/luau/roots/src/methods/use-module.luau +++ /dev/null @@ -1,23 +0,0 @@ -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, module: ModuleScript) - local moduleExport = (require)(module) - - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - - return root -end - -return useModule diff --git a/dist/pesde/luau/roots/src/methods/use-modules.luau b/dist/pesde/luau/roots/src/methods/use-modules.luau deleted file mode 100644 index 8354a9d0..00000000 --- a/dist/pesde/luau/roots/src/methods/use-modules.luau +++ /dev/null @@ -1,28 +0,0 @@ -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, modules: { Instance }, predicate: ((module: ModuleScript) -> boolean)?) - for _, module in modules do - if not module:IsA("ModuleScript") or predicate and not predicate(module) then - continue - end - - local moduleExport = (require)(module) - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - end - - return root -end - -return useModules diff --git a/dist/pesde/luau/roots/src/methods/use-provider.luau b/dist/pesde/luau/roots/src/methods/use-provider.luau deleted file mode 100644 index 277d8049..00000000 --- a/dist/pesde/luau/roots/src/methods/use-provider.luau +++ /dev/null @@ -1,14 +0,0 @@ -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) - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - return root -end - -return useProvider diff --git a/dist/pesde/luau/roots/src/methods/use-providers.luau b/dist/pesde/luau/roots/src/methods/use-providers.luau deleted file mode 100644 index 1489c3a3..00000000 --- a/dist/pesde/luau/roots/src/methods/use-providers.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 }) - for _, provider in providers do - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - end - return root -end - -return useProviders diff --git a/dist/pesde/luau/roots/src/methods/use-root.luau b/dist/pesde/luau/roots/src/methods/use-root.luau deleted file mode 100644 index efc4ad1e..00000000 --- a/dist/pesde/luau/roots/src/methods/use-root.luau +++ /dev/null @@ -1,13 +0,0 @@ -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) - return root -end - -return useRoot diff --git a/dist/pesde/luau/roots/src/methods/use-roots.luau b/dist/pesde/luau/roots/src/methods/use-roots.luau deleted file mode 100644 index 7b5b9dda..00000000 --- a/dist/pesde/luau/roots/src/methods/use-roots.luau +++ /dev/null @@ -1,15 +0,0 @@ -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.spawnCallbacks(rootUsed, root, subRoot) - end - return root -end - -return useRoots diff --git a/dist/pesde/luau/roots/src/methods/will-finish.luau b/dist/pesde/luau/roots/src/methods/will-finish.luau deleted file mode 100644 index 893088f4..00000000 --- a/dist/pesde/luau/roots/src/methods/will-finish.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willFinish(root: types.Self, callback: () -> ()) - root._finish:register(callback) - return root -end - -return willFinish diff --git a/dist/pesde/luau/roots/src/methods/will-start.luau b/dist/pesde/luau/roots/src/methods/will-start.luau deleted file mode 100644 index 7c3d88c3..00000000 --- a/dist/pesde/luau/roots/src/methods/will-start.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willStart(root: types.Self, callback: () -> ()) - root._start:register(callback) - return root -end - -return willStart diff --git a/dist/pesde/luau/roots/src/types.luau b/dist/pesde/luau/roots/src/types.luau deleted file mode 100644 index 104143c4..00000000 --- a/dist/pesde/luau/roots/src/types.luau +++ /dev/null @@ -1,40 +0,0 @@ -local lifecycles = require("../lifecycles") -local providers = require("../providers") - -type Set = { [T]: true } - -export type Root = { - type: "Root", - - start: (root: Root) -> StartedRoot, - - useModule: (root: Root, module: ModuleScript) -> Root, - useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useRoot: (root: Root, root: Root) -> Root, - useRoots: (root: Root, roots: { Root }) -> Root, - useProvider: (root: Root, provider: providers.Provider) -> Root, - useProviders: (root: Root, providers: { providers.Provider }) -> Root, - useLifecycle: (root: Root, lifecycle: lifecycles.Lifecycle) -> Root, - useLifecycles: (root: Root, lifecycles: { lifecycles.Lifecycle }) -> Root, - destroy: (root: Root) -> (), - - willStart: (callback: () -> ()) -> Root, - willFinish: (callback: () -> ()) -> Root, -} - -export type StartedRoot = { - type: "StartedRoot", - - finish: (root: StartedRoot) -> (), -} - -export type Self = Root & { - _destroyed: boolean, - _rootProviders: Set>, - _rootLifecycles: { lifecycles.Lifecycle }, - _subRoots: Set, - _start: lifecycles.Lifecycle<()>, - _finish: lifecycles.Lifecycle<()>, -} - -return nil diff --git a/dist/pesde/luau/runtime/LICENSE.md b/dist/pesde/luau/runtime/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/runtime/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/runtime/pesde.toml b/dist/pesde/luau/runtime/pesde.toml deleted file mode 100644 index dd2cf1bf..00000000 --- a/dist/pesde/luau/runtime/pesde.toml +++ /dev/null @@ -1,21 +0,0 @@ -authors = ["Fire "] -description = "Runtime agnostic libraries for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/runtime" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "luau" -lib = "src/init.luau" -[dependencies] diff --git a/dist/pesde/luau/runtime/src/batteries/threadpool.luau b/dist/pesde/luau/runtime/src/batteries/threadpool.luau deleted file mode 100644 index 6caf08b4..00000000 --- a/dist/pesde/luau/runtime/src/batteries/threadpool.luau +++ /dev/null @@ -1,38 +0,0 @@ -local task = require("../libs/task") - -local freeThreads: { thread } = {} - -local function run(f: (T...) -> (), thread: thread, ...) - f(...) - table.insert(freeThreads, thread) -end - -local function yielder() - while true do - run(coroutine.yield()) - end -end - -local function spawn(f: (T...) -> (), ...: T...) - local thread - if #freeThreads > 0 then - thread = freeThreads[#freeThreads] - freeThreads[#freeThreads] = nil - else - thread = coroutine.create(yielder) - coroutine.resume(thread) - end - - task.spawn(thread, f, thread, ...) -end - -local function spawnCallbacks(callbacks: { (Args...) -> () }, ...: Args...) - for _, callback in callbacks do - spawn(callback, ...) - end -end - -return table.freeze({ - spawn = spawn, - spawnCallbacks = spawnCallbacks, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/init.luau b/dist/pesde/luau/runtime/src/implementations/init.luau deleted file mode 100644 index 28dbe015..00000000 --- a/dist/pesde/luau/runtime/src/implementations/init.luau +++ /dev/null @@ -1,56 +0,0 @@ -local types = require("@self/../types") - -type Implementation = { 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/lune"), - lute = require("@self/lute"), - seal = require("@self/seal"), - zune = require("@self/zune"), -}) - -local currentRuntime: types.Runtime = nil -do - for _, runtime in supportedRuntimes :: { [string]: types.Runtime } do - local isRuntime = runtime.is() - if isRuntime then - local currentRuntimePriority = currentRuntime and currentRuntime.priority or 0 - local runtimePriority = runtime.priority or 0 - if currentRuntimePriority <= runtimePriority then - currentRuntime = runtime - end - end - end - assert(currentRuntime, "No supported runtime") -end - -local currentRuntimeName: RuntimeName = currentRuntime.name :: any - -local function notImplemented(functionName: string) - return function() - error(`'{functionName}' is not implemented by runtime '{currentRuntimeName}'`, 2) - end -end - -local function implementFunction(label: string, implementations: { [types.Runtime]: Implementation? }): T - local implementation = implementations[currentRuntime] - if implementation then - if implementation.new then - return implementation.new() - elseif implementation.implementation then - return implementation.implementation - end - end - return notImplemented(label) :: any -end - -return table.freeze({ - supportedRuntimes = supportedRuntimes, - currentRuntime = currentRuntime, - currentRuntimeName = currentRuntimeName, - implementFunction = implementFunction, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/init.spec.luau b/dist/pesde/luau/runtime/src/implementations/init.spec.luau deleted file mode 100644 index 3ce91cbb..00000000 --- a/dist/pesde/luau/runtime/src/implementations/init.spec.luau +++ /dev/null @@ -1,81 +0,0 @@ -local implementations = require("@self/../implementations") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("currentRuntime", function() - test("detects lune runtime", function() - expect(implementations.currentRuntimeName).is("lune") - expect(implementations.currentRuntime).is(implementations.supportedRuntimes.lune) - end) - end) - - describe("implementFunction", function() - test("implements for lune runtime", function() - local lune = function() end - local luau = function() end - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - implementation = lune, - }, - [implementations.supportedRuntimes.luau] = { - implementation = luau, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - end) - - test("constructs for lune runtime", function() - local lune = function() end - local luau = function() end - - local constructedLune = false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - new = function() - constructedLune = true - return lune - end, - }, - [implementations.supportedRuntimes.luau] = { - new = function() - return luau - end, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - expect(constructedLune).is_true() - end) - - test("defaults to not implemented function", function() - local constructSuccess, runSuccess = false, false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.roblox] = { - new = function() - constructSuccess = true - return function() - runSuccess = true - end - end, - }, - }) - - expect(constructSuccess).is(false) - expect(implementation).is_a("function") - expect(implementation).fails_with("'implementation' is not implemented by runtime 'lune'") - expect(runSuccess).is(false) - end) - end) -end diff --git a/dist/pesde/luau/runtime/src/implementations/luau.luau b/dist/pesde/luau/runtime/src/implementations/luau.luau deleted file mode 100644 index c67e52f4..00000000 --- a/dist/pesde/luau/runtime/src/implementations/luau.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "luau", - priority = -1, - is = function() - return true - end, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/lune.luau b/dist/pesde/luau/runtime/src/implementations/lune.luau deleted file mode 100644 index f49834eb..00000000 --- a/dist/pesde/luau/runtime/src/implementations/lune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/lute.luau b/dist/pesde/luau/runtime/src/implementations/lute.luau deleted file mode 100644 index 7b6abc58..00000000 --- a/dist/pesde/luau/runtime/src/implementations/lute.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "lute", - is = function() - return false - end, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/roblox.luau b/dist/pesde/luau/runtime/src/implementations/roblox.luau deleted file mode 100644 index 91a780e2..00000000 --- a/dist/pesde/luau/runtime/src/implementations/roblox.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "roblox", - is = function() - -- wtf - return not not (_VERSION == "Luau" and game and workspace) - end, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/seal.luau b/dist/pesde/luau/runtime/src/implementations/seal.luau deleted file mode 100644 index 0a72684c..00000000 --- a/dist/pesde/luau/runtime/src/implementations/seal.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "seal", - is = function() - return false - end, -}) diff --git a/dist/pesde/luau/runtime/src/implementations/zune.luau b/dist/pesde/luau/runtime/src/implementations/zune.luau deleted file mode 100644 index 48243e05..00000000 --- a/dist/pesde/luau/runtime/src/implementations/zune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/luau/runtime/src/index.d.ts b/dist/pesde/luau/runtime/src/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/dist/pesde/luau/runtime/src/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/dist/pesde/luau/runtime/src/init.luau b/dist/pesde/luau/runtime/src/init.luau deleted file mode 100644 index 26bdeee0..00000000 --- a/dist/pesde/luau/runtime/src/init.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - - task = task, - warn = warn, - - threadpool = threadpool, -}) diff --git a/dist/pesde/luau/runtime/src/libs/task.luau b/dist/pesde/luau/runtime/src/libs/task.luau deleted file mode 100644 index 28c1ac9e..00000000 --- a/dist/pesde/luau/runtime/src/libs/task.luau +++ /dev/null @@ -1,157 +0,0 @@ -local implementations = require("../implementations") - -export type TaskLib = { - cancel: (thread) -> (), - defer: (functionOrThread: thread | (T...) -> (), T...) -> thread, - delay: (duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread, - spawn: (functionOrThread: thread | (T...) -> (), T...) -> thread, - wait: (duration: number?) -> number, -} - -local supportedRuntimes = implementations.supportedRuntimes -local implementFunction = implementations.implementFunction - -local function defaultSpawn(functionOrThread: thread | (T...) -> (), ...: T...): thread - if type(functionOrThread) == "thread" then - coroutine.resume(functionOrThread, ...) - return functionOrThread - else - local thread = coroutine.create(functionOrThread) - coroutine.resume(thread, ...) - return thread - end -end - -local function defaultWait(seconds: number?) - local startTime = os.clock() - local endTime = startTime + (seconds or 1) - local clockTime: number - repeat - clockTime = os.clock() - until clockTime >= endTime - return clockTime - startTime -end - -local task: TaskLib = table.freeze({ - cancel = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.cancel - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").cancel - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").cancel - end, - }, - [supportedRuntimes.luau] = { - implementation = function(thread) - if not coroutine.close(thread) then - error(debug.traceback(thread, "Could not cancel thread")) - end - end, - }, - }), - defer = implementFunction("task.defer", { - [supportedRuntimes.roblox] = { - new = function() - return task.defer :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").defer - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").defer - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - delay = implementFunction("task.delay", { - [supportedRuntimes.roblox] = { - new = function() - return task.delay :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").delay - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").delay - end, - }, - [supportedRuntimes.luau] = { - implementation = function(duration: number, functionOrThread: thread | (T...) -> (), ...: T...): thread - return defaultSpawn( - if typeof(functionOrThread) == "function" - then function(duration, functionOrThread, ...) - defaultWait(duration) - functionOrThread(...) - end - else function(duration, functionOrThread, ...) - defaultWait(duration) - coroutine.resume(...) - end, - duration, - functionOrThread, - ... - ) - end, - }, - }), - spawn = implementFunction("task.spawn", { - [supportedRuntimes.roblox] = { - new = function() - return task.spawn :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").spawn - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").spawn - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - wait = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.wait - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").wait - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").wait - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultWait, - }, - }), -}) - -return task diff --git a/dist/pesde/luau/runtime/src/libs/task.spec.luau b/dist/pesde/luau/runtime/src/libs/task.spec.luau deleted file mode 100644 index 0918e87f..00000000 --- a/dist/pesde/luau/runtime/src/libs/task.spec.luau +++ /dev/null @@ -1,62 +0,0 @@ -local luneTask = require("@lune/task") -local task = require("./task") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - --- FIXME: can't async stuff lol -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("task", function() - test("spawn", function() - expect(task.spawn).is(luneTask.spawn) - local spawned = false - - task.spawn(function() - spawned = true - end) - - expect(spawned).is_true() - end) - - test("defer", function() - expect(task.defer).is(luneTask.defer) - - -- local spawned = false - - -- task.defer(function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - end) - - test("delay", function() - expect(task.delay).is(luneTask.delay) - -- local spawned = false - - -- task.delay(0.25, function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - - -- local startTime = os.clock() - -- repeat - -- until os.clock() - startTime > 0.5 - - -- print(spawned) - - -- expect(spawned).is_true() - end) - - test("wait", function() - expect(task.wait).is(luneTask.wait) - end) - - test("cancel", function() - expect(task.cancel).is(luneTask.cancel) - end) - end) -end diff --git a/dist/pesde/luau/runtime/src/libs/warn.luau b/dist/pesde/luau/runtime/src/libs/warn.luau deleted file mode 100644 index 6a4837ac..00000000 --- a/dist/pesde/luau/runtime/src/libs/warn.luau +++ /dev/null @@ -1,27 +0,0 @@ -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(index, ...))) - end - return table.concat(stringified, " ") -end - -local warn: (T...) -> () = implementFunction("warn", { - [supportedRuntimes.roblox] = { - new = function() - return warn - end, - }, - [supportedRuntimes.luau] = { - implementation = function(...: T...) - print(`\27[0;33m{tostringTuple(...)}\27[0m`) - end, - }, -}) - -return warn diff --git a/dist/pesde/luau/runtime/src/types.luau b/dist/pesde/luau/runtime/src/types.luau deleted file mode 100644 index ca050fce..00000000 --- a/dist/pesde/luau/runtime/src/types.luau +++ /dev/null @@ -1,13 +0,0 @@ -export type Runtime = { - name: string, - priority: number?, - is: () -> boolean, -} - -local function Runtime(x: Runtime) - return table.freeze(x) -end - -return table.freeze({ - Runtime = Runtime, -}) diff --git a/dist/pesde/luau/typecheckers/LICENSE.md b/dist/pesde/luau/typecheckers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/luau/typecheckers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/luau/typecheckers/pesde.toml b/dist/pesde/luau/typecheckers/pesde.toml deleted file mode 100644 index b8c44395..00000000 --- a/dist/pesde/luau/typecheckers/pesde.toml +++ /dev/null @@ -1,21 +0,0 @@ -authors = ["Fire "] -description = "Typechecking primitives and compatibility for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/typecheckers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "luau" -lib = "src/init.luau" -[dependencies] diff --git a/dist/pesde/luau/typecheckers/src/init.luau b/dist/pesde/luau/typecheckers/src/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/dist/pesde/lune/dependencies/LICENSE.md b/dist/pesde/lune/dependencies/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/dependencies/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/dependencies/lifecycles.luau b/dist/pesde/lune/dependencies/lifecycles.luau deleted file mode 100644 index 49a51bfa..00000000 --- a/dist/pesde/lune/dependencies/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/lune/dependencies/logger.luau b/dist/pesde/lune/dependencies/logger.luau deleted file mode 100644 index ddbd462d..00000000 --- a/dist/pesde/lune/dependencies/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./lune_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/lune/dependencies/pesde.toml b/dist/pesde/lune/dependencies/pesde.toml deleted file mode 100644 index effecf44..00000000 --- a/dist/pesde/lune/dependencies/pesde.toml +++ /dev/null @@ -1,33 +0,0 @@ -authors = ["Fire "] -description = "Dependency resolution logic for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/dependencies" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "lifecycles.luau", - "logger.luau", - "lifecycles.luau", - "logger.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/dependencies/src/depend.luau b/dist/pesde/lune/dependencies/src/depend.luau deleted file mode 100644 index 55230b4e..00000000 --- a/dist/pesde/lune/dependencies/src/depend.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 locked.", - __index = useBeforeConstructed, - __newindex = useBeforeConstructed, -} - -function unresolvedMt:__tostring() - return "UnresolvedDependency" -end - --- Wtf luau -local function depend(dependency: types.Dependency): typeof(({} :: types.Dependency).new( - (nil :: any) :: Dependencies, - ... -)) - -- Return a mock value that will be resolved during dependency resolution. - return setmetatable({ - type = "UnresolvedDependency", - dependency = dependency, - }, unresolvedMt) :: any -end - -return depend diff --git a/dist/pesde/lune/dependencies/src/index.d.ts b/dist/pesde/lune/dependencies/src/index.d.ts deleted file mode 100644 index a5bddcde..00000000 --- a/dist/pesde/lune/dependencies/src/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Lifecycle } from "../lifecycles"; - -declare namespace dependencies { - export type Dependency = Self & { - dependencies: Dependencies, - priority?: number, - new(dependencies: Dependencies, ...args: NewArgs): Dependency; - }; - - interface ProccessDependencyResult { - sortedDependencies: Dependency[]; - lifecycles: Lifecycle[]; - } - - export type SubdependenciesOf = T extends { dependencies: infer Dependencies } - ? Dependencies - : never; - - export function depend InstanceType>(dependency: T): InstanceType; - export function processDependencies(dependencies: Set>): ProccessDependencyResult; - export function sortByPriority(dependencies: Dependency[]): void; -} - -export = dependencies; -export as namespace dependencies; diff --git a/dist/pesde/lune/dependencies/src/init.luau b/dist/pesde/lune/dependencies/src/init.luau deleted file mode 100644 index e6b27b24..00000000 --- a/dist/pesde/lune/dependencies/src/init.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 = types.Dependency - -return table.freeze({ - depend = depend, - processDependencies = processDependencies, - sortByPriority = sortByPriority, -}) diff --git a/dist/pesde/lune/dependencies/src/logger.luau b/dist/pesde/lune/dependencies/src/logger.luau deleted file mode 100644 index 22f3b307..00000000 --- a/dist/pesde/lune/dependencies/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", - alreadyFinished = "Root has already finished.", -}) diff --git a/dist/pesde/lune/dependencies/src/process-dependencies.luau b/dist/pesde/lune/dependencies/src/process-dependencies.luau deleted file mode 100644 index 20820a35..00000000 --- a/dist/pesde/lune/dependencies/src/process-dependencies.luau +++ /dev/null @@ -1,57 +0,0 @@ -local lifecycles = require("../lifecycles") -local types = require("./types") - -export type ProccessDependencyResult = { - sortedDependencies: { types.Dependency }, - lifecycles: { lifecycles.Lifecycle }, -} - -type Set = { [T]: true } - -local function processDependencies(dependencies: Set>): ProccessDependencyResult - local sortedDependencies = {} - local lifecycles = {} - - -- TODO: optimize ts - local function visitDependency(dependency: types.Dependency) - -- print("Visiting dependency", dependency) - - for key, value in dependency :: any do - if key == "dependencies" then - -- print("Checking [prvd.dependencies]") - if typeof(value) == "table" then - for key, value in value do - -- print("Checking key", key, "value", value) - if typeof(value) == "table" and value.type == "UnresolvedDependency" then - local unresolved: types.UnresolvedDependency = value - -- print("Got unresolved dependency", unresolved.dependency, "visiting") - visitDependency(unresolved.dependency) - end - end - end - - continue - end - - if typeof(value) == "table" and value.type == "Lifecycle" and not table.find(lifecycles, value) then - table.insert(lifecycles, value) - end - end - - if dependencies[dependency] and not table.find(sortedDependencies, dependency) then - -- print("Pushing to sort") - table.insert(sortedDependencies, dependency) - end - end - - for dependency in dependencies do - visitDependency(dependency) - end - - return { - sortedDependencies = sortedDependencies, - lifecycles = lifecycles, - } -end - -return processDependencies diff --git a/dist/pesde/lune/dependencies/src/process-dependencies.spec.luau b/dist/pesde/lune/dependencies/src/process-dependencies.spec.luau deleted file mode 100644 index 0fcfcac8..00000000 --- a/dist/pesde/lune/dependencies/src/process-dependencies.spec.luau +++ /dev/null @@ -1,67 +0,0 @@ -local depend = require("./depend") -local processDependencies = require("./process-dependencies") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -local function nickname(name: string) - return function(tbl: T): T - return setmetatable(tbl :: any, { - __tostring = function() - return name - end, - }) - end -end - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("processDependencies", function() - test("sortedDependencies", function() - local first = nickname("first")({}) - - local second = nickname("second")({ - dependencies = { - toFirst = depend(first :: any), - toFirstAgain = depend(first :: any), - }, - }) - - local third = nickname("third")({ - dependencies = { - toSecond = depend(second :: any), - }, - }) - - local fourth = nickname("fourth")({ - dependencies = { - toFirst = depend(first :: any), - toSecond = depend(second :: any), - toThird = depend(third :: any), - }, - }) - - local processed = processDependencies({ - [first] = true, - [second] = true, - [third] = true, - [fourth] = true, - } :: any) - - expect(typeof(processed)).is("table") - expect(processed).has_key("sortedDependencies") - expect(typeof(processed.sortedDependencies)).is("table") - - local sortedDependencies = processed.sortedDependencies - - expect(typeof(sortedDependencies)).is("table") - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - expect(sortedDependencies[4]).is(fourth) - end) - - test("lifecycles", function() end) - end) -end diff --git a/dist/pesde/lune/dependencies/src/sort-by-priority.luau b/dist/pesde/lune/dependencies/src/sort-by-priority.luau deleted file mode 100644 index 638468ab..00000000 --- a/dist/pesde/lune/dependencies/src/sort-by-priority.luau +++ /dev/null @@ -1,14 +0,0 @@ -local types = require("./types") - -local function sortByPriority(dependencies: { types.Dependency }) - 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) - local rightIndex = table.find(dependencies, right) - return leftIndex < rightIndex - end) -end - -return sortByPriority diff --git a/dist/pesde/lune/dependencies/src/sort-by-priority.spec.luau b/dist/pesde/lune/dependencies/src/sort-by-priority.spec.luau deleted file mode 100644 index eeb34933..00000000 --- a/dist/pesde/lune/dependencies/src/sort-by-priority.spec.luau +++ /dev/null @@ -1,52 +0,0 @@ -local sortByPriority = require("./sort-by-priority") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("sortByPriority", function() - test("dependencies", function() - local first = {} - - local second = { - toFirst = first, - } - - local third = { - toSecond = second, - } - - local sortedDependencies = { - first, - second, - third, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - end) - - test("priority", function() - local low = {} - - local high = { - priority = 500, - } - - local sortedDependencies = { - low, - high, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(high) - expect(sortedDependencies[2]).is(low) - end) - end) -end diff --git a/dist/pesde/lune/dependencies/src/types.luau b/dist/pesde/lune/dependencies/src/types.luau deleted file mode 100644 index 2b1c72aa..00000000 --- a/dist/pesde/lune/dependencies/src/types.luau +++ /dev/null @@ -1,14 +0,0 @@ -export type Dependency = Self & { - dependencies: Dependencies, - priority: number?, - new: (dependencies: Dependencies, NewArgs...) -> Dependency, -} - -export type UnresolvedDependency = { - type: "UnresolvedDependency", - dependency: Dependency, -} - -export type dependencies = { __prvdmwrong_dependencies: never } - -return nil diff --git a/dist/pesde/lune/lifecycles/LICENSE.md b/dist/pesde/lune/lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/lifecycles/logger.luau b/dist/pesde/lune/lifecycles/logger.luau deleted file mode 100644 index ddbd462d..00000000 --- a/dist/pesde/lune/lifecycles/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./lune_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/lune/lifecycles/pesde.toml b/dist/pesde/lune/lifecycles/pesde.toml deleted file mode 100644 index aff7cd1e..00000000 --- a/dist/pesde/lune/lifecycles/pesde.toml +++ /dev/null @@ -1,33 +0,0 @@ -authors = ["Fire "] -description = "Provider method lifecycles implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/lifecycles" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "runtime.luau", - "logger.luau", - "runtime.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/lifecycles/runtime.luau b/dist/pesde/lune/lifecycles/runtime.luau deleted file mode 100644 index 8e63a7a0..00000000 --- a/dist/pesde/lune/lifecycles/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/lune/lifecycles/src/create.luau b/dist/pesde/lune/lifecycles/src/create.luau deleted file mode 100644 index 6cdd2891..00000000 --- a/dist/pesde/lune/lifecycles/src/create.luau +++ /dev/null @@ -1,45 +0,0 @@ -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") -local onUnregistered = require("./methods/on-unregistered") -local register = require("./methods/register") -local types = require("./types") -local unregister = require("./methods/unregister") - -local function create( - method: string, - onFire: (lifecycle: types.Lifecycle, Args...) -> () -): types.Lifecycle - local self: types.Self = { - _isDestroyed = false, - _selfRegistered = {}, - _selfUnregistered = {}, - - type = "Lifecycle", - callbacks = {}, - - fire = onFire, - method = method, - register = register, - unregister = unregister, - clear = clear, - onRegistered = onRegistered, - onUnregistered = onUnregistered, - await = await, - destroy = destroy, - } :: any - - methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) - - for _, onLifecycleConstructed in lifecycleConstructed.callbacks do - onLifecycleConstructed(self :: types.Lifecycle) - end - - return self -end - -return create diff --git a/dist/pesde/lune/lifecycles/src/handlers/fire-concurrent.luau b/dist/pesde/lune/lifecycles/src/handlers/fire-concurrent.luau deleted file mode 100644 index f279b888..00000000 --- a/dist/pesde/lune/lifecycles/src/handlers/fire-concurrent.luau +++ /dev/null @@ -1,10 +0,0 @@ -local runtime = require("../../runtime") -local types = require("../types") - -local function fireConcurrent(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - runtime.threadpool.spawn(callback, ...) - end -end - -return fireConcurrent diff --git a/dist/pesde/lune/lifecycles/src/handlers/fire-sequential.luau b/dist/pesde/lune/lifecycles/src/handlers/fire-sequential.luau deleted file mode 100644 index 80911ad9..00000000 --- a/dist/pesde/lune/lifecycles/src/handlers/fire-sequential.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -local function fireSequential(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - callback(...) - end -end - -return fireSequential diff --git a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-constructed.luau b/dist/pesde/lune/lifecycles/src/hooks/lifecycle-constructed.luau deleted file mode 100644 index 8ea4d81b..00000000 --- a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-constructed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleConstructed = onLifecycleConstructed, -}) diff --git a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-destroyed.luau b/dist/pesde/lune/lifecycles/src/hooks/lifecycle-destroyed.luau deleted file mode 100644 index 47abcfab..00000000 --- a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleDestroyed = onLifecycleDestroyed, -}) diff --git a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-registered.luau b/dist/pesde/lune/lifecycles/src/hooks/lifecycle-registered.luau deleted file mode 100644 index fab588a3..00000000 --- a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-registered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleRegistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleRegistered = onLifecycleRegistered, -}) diff --git a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-unregistered.luau b/dist/pesde/lune/lifecycles/src/hooks/lifecycle-unregistered.luau deleted file mode 100644 index 0ec81756..00000000 --- a/dist/pesde/lune/lifecycles/src/hooks/lifecycle-unregistered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleUnregistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUnregistered = onLifecycleUnregistered, -}) diff --git a/dist/pesde/lune/lifecycles/src/index.d.ts b/dist/pesde/lune/lifecycles/src/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/dist/pesde/lune/lifecycles/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/dist/pesde/lune/lifecycles/src/init.luau b/dist/pesde/lune/lifecycles/src/init.luau deleted file mode 100644 index dbec091b..00000000 --- a/dist/pesde/lune/lifecycles/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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 lifecycleRegistered = require("@self/hooks/lifecycle-registered") -local lifecycleUnregistered = require("@self/hooks/lifecycle-unregistered") -local methodToLifecycles = require("@self/method-to-lifecycles") -local types = require("@self/types") - -export type Lifecycle = types.Lifecycle - -return table.freeze({ - create = create, - handlers = table.freeze({ - fireConcurrent = fireConcurrent, - fireSequential = fireSequential, - }), - hooks = table.freeze({ - onLifecycleRegistered = lifecycleRegistered.onLifecycleRegistered, - onLifecycleUnregistered = lifecycleUnregistered.onLifecycleUnregistered, - onLifecycleConstructed = lifecycleConstructed.onLifecycleConstructed, - onLifecycleDestroyed = lifecycleDestroyed.onLifecycleDestroyed, - }), - _ = table.freeze({ - methodToLifecycles = methodToLifecycles, - }), -}) diff --git a/dist/pesde/lune/lifecycles/src/logger.luau b/dist/pesde/lune/lifecycles/src/logger.luau deleted file mode 100644 index 3ae7c27e..00000000 --- a/dist/pesde/lune/lifecycles/src/logger.luau +++ /dev/null @@ -1,6 +0,0 @@ -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.", -}) diff --git a/dist/pesde/lune/lifecycles/src/method-to-lifecycles.luau b/dist/pesde/lune/lifecycles/src/method-to-lifecycles.luau deleted file mode 100644 index 386a8756..00000000 --- a/dist/pesde/lune/lifecycles/src/method-to-lifecycles.luau +++ /dev/null @@ -1,5 +0,0 @@ -local types = require("./types") - -local methodToLifecycles: { [string]: { types.Lifecycle } } = {} - -return methodToLifecycles diff --git a/dist/pesde/lune/lifecycles/src/methods/await.luau b/dist/pesde/lune/lifecycles/src/methods/await.luau deleted file mode 100644 index ed8299d6..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/await.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function await(lifecycle: types.Self): Args... - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local currentThread = coroutine.running() - local function callback(...: Args...) - lifecycle:unregister(callback) - coroutine.resume(currentThread, ...) - end - lifecycle:register(callback) - return coroutine.yield() -end - -return await diff --git a/dist/pesde/lune/lifecycles/src/methods/destroy.luau b/dist/pesde/lune/lifecycles/src/methods/destroy.luau deleted file mode 100644 index d9d5d6cc..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/destroy.luau +++ /dev/null @@ -1,18 +0,0 @@ -local lifecycleDestroyed = require("../hooks/lifecycle-destroyed") -local logger = require("../logger") -local methodToLifecycles = require("../method-to-lifecycles") -local types = require("../types") - -local function destroy(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.alreadyDestroyed }) - end - table.remove(methodToLifecycles[lifecycle.method], table.find(methodToLifecycles[lifecycle.method], lifecycle)) - table.clear(lifecycle.callbacks) - for _, callback in lifecycleDestroyed.callbacks do - callback(lifecycle) - end - lifecycle._isDestroyed = true -end - -return destroy diff --git a/dist/pesde/lune/lifecycles/src/methods/on-registered.luau b/dist/pesde/lune/lifecycles/src/methods/on-registered.luau deleted file mode 100644 index 7ddb009a..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/on-registered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onRegistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end - table.insert(lifecycle._selfRegistered, listener) - return function() - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end -end - -return onRegistered diff --git a/dist/pesde/lune/lifecycles/src/methods/on-unregistered.luau b/dist/pesde/lune/lifecycles/src/methods/on-unregistered.luau deleted file mode 100644 index 842040ec..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/on-unregistered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onUnregistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end - table.insert(lifecycle._selfUnregistered, listener) - return function() - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end -end - -return onUnregistered diff --git a/dist/pesde/lune/lifecycles/src/methods/register.luau b/dist/pesde/lune/lifecycles/src/methods/register.luau deleted file mode 100644 index 3fd74d56..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/register.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function register(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle.callbacks, table.find(lifecycle.callbacks, callback)) - end - table.insert(lifecycle.callbacks, callback) - threadpool.spawnCallbacks(lifecycle._selfRegistered, callback) -end - -return register diff --git a/dist/pesde/lune/lifecycles/src/methods/unregister-all.luau b/dist/pesde/lune/lifecycles/src/methods/unregister-all.luau deleted file mode 100644 index 5e6235af..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/unregister-all.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function clear(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - for _, callback in lifecycle.callbacks do - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end - table.clear(lifecycle.callbacks) -end - -return clear diff --git a/dist/pesde/lune/lifecycles/src/methods/unregister.luau b/dist/pesde/lune/lifecycles/src/methods/unregister.luau deleted file mode 100644 index 0ca7223f..00000000 --- a/dist/pesde/lune/lifecycles/src/methods/unregister.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function unregister(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local index = table.find(lifecycle.callbacks, callback) - if index then - table.remove(lifecycle.callbacks, index) - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end -end - -return unregister diff --git a/dist/pesde/lune/lifecycles/src/types.luau b/dist/pesde/lune/lifecycles/src/types.luau deleted file mode 100644 index f2931b52..00000000 --- a/dist/pesde/lune/lifecycles/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -export type Lifecycle = { - type: "Lifecycle", - - callbacks: { (Args...) -> () }, - method: string, - - register: (self: Lifecycle, callback: (Args...) -> ()) -> (), - fire: (self: Lifecycle, Args...) -> (), - unregister: (self: Lifecycle, callback: (Args...) -> ()) -> (), - clear: (self: Lifecycle) -> (), - onRegistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - onUnregistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - await: (self: Lifecycle) -> Args..., - destroy: (self: Lifecycle) -> (), -} - -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - -return nil diff --git a/dist/pesde/lune/logger/LICENSE.md b/dist/pesde/lune/logger/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/logger/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/logger/pesde.toml b/dist/pesde/lune/logger/pesde.toml deleted file mode 100644 index 1044b58b..00000000 --- a/dist/pesde/lune/logger/pesde.toml +++ /dev/null @@ -1,28 +0,0 @@ -authors = ["Fire "] -description = "Logging for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/logger" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", - "runtime.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/logger/runtime.luau b/dist/pesde/lune/logger/runtime.luau deleted file mode 100644 index 8e63a7a0..00000000 --- a/dist/pesde/lune/logger/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/lune/logger/src/allow-web-links.luau b/dist/pesde/lune/logger/src/allow-web-links.luau deleted file mode 100644 index dcd0bb82..00000000 --- a/dist/pesde/lune/logger/src/allow-web-links.luau +++ /dev/null @@ -1,5 +0,0 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks diff --git a/dist/pesde/lune/logger/src/create.luau b/dist/pesde/lune/logger/src/create.luau deleted file mode 100644 index 943aab25..00000000 --- a/dist/pesde/lune/logger/src/create.luau +++ /dev/null @@ -1,32 +0,0 @@ -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(label: string, errorInfoUrl: string?, templates: T): types.Logger - local self = {} :: types.Logger - self.type = "Logger" - - label = `[{label}] ` - errorInfoUrl = if allowWebLinks then errorInfoUrl else nil - - function self:warn(log) - warn(label .. formatLog(self, log, errorInfoUrl)) - end - - function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) - end - - function self:fatalError(log) - error(label .. formatLog(self, log, errorInfoUrl)) - end - - setmetatable(self :: any, { __index = templates }) - return self -end - -return create diff --git a/dist/pesde/lune/logger/src/format-log.luau b/dist/pesde/lune/logger/src/format-log.luau deleted file mode 100644 index 3eeda21b..00000000 --- a/dist/pesde/lune/logger/src/format-log.luau +++ /dev/null @@ -1,43 +0,0 @@ -local types = require("./types") - -local function formatLog(self: types.Logger, 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 - formattedTemplate = string.gsub(formattedTemplate, "ERROR_MESSAGE", error.message) - end - - local id: string? - - -- TODO: find a better way to do ts while still being ergonomic - for templateKey, template in (self :: any) :: { [string]: string } do - if template == log.template then - id = templateKey - break - end - end - - if id then - formattedTemplate ..= `\nID: {id}` - end - - if errorInfoUrl then - formattedTemplate ..= `\nLearn more: {errorInfoUrl}` - if id then - formattedTemplate ..= `#{string.lower(id)}` - end - end - - if trace then - formattedTemplate ..= `\n---- Stack trace ----\n{trace}` - end - - -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") -end - -return formatLog diff --git a/dist/pesde/lune/logger/src/index.d.ts b/dist/pesde/lune/logger/src/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/dist/pesde/lune/logger/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/dist/pesde/lune/logger/src/init.luau b/dist/pesde/lune/logger/src/init.luau deleted file mode 100644 index 52760a5d..00000000 --- a/dist/pesde/lune/logger/src/init.luau +++ /dev/null @@ -1,18 +0,0 @@ -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 = types.Logger -export type Log = types.Log -export type Error = types.Error - -return table.freeze({ - create = create, - formatLog = formatLog, - parseError = parseError, - allowWebLinks = allowWebLinks, - standardErrorInfoUrl = standardErrorInfoUrl, -}) diff --git a/dist/pesde/lune/logger/src/parse-error.luau b/dist/pesde/lune/logger/src/parse-error.luau deleted file mode 100644 index e43fe53d..00000000 --- a/dist/pesde/lune/logger/src/parse-error.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/dist/pesde/lune/logger/src/standard-error-info-url.luau b/dist/pesde/lune/logger/src/standard-error-info-url.luau deleted file mode 100644 index 345faf36..00000000 --- a/dist/pesde/lune/logger/src/standard-error-info-url.luau +++ /dev/null @@ -1,5 +0,0 @@ -local function standardErrorInfoUrl(label: string): string - return `https://prvdmwrong.luau.page/api-reference/{label}/errors` -end - -return standardErrorInfoUrl diff --git a/dist/pesde/lune/logger/src/types.luau b/dist/pesde/lune/logger/src/types.luau deleted file mode 100644 index d1699037..00000000 --- a/dist/pesde/lune/logger/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -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 & { - type: "Logger", - print: (self: Logger, props: Log) -> (), - warn: (self: Logger, props: Log) -> (), - error: (self: Logger, props: Log) -> (), - fatalError: (self: Logger, props: Log) -> never, -} - -return nil diff --git a/dist/pesde/lune/providers/LICENSE.md b/dist/pesde/lune/providers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/providers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/providers/dependencies.luau b/dist/pesde/lune/providers/dependencies.luau deleted file mode 100644 index e232e1f0..00000000 --- a/dist/pesde/lune/providers/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/lune/providers/lifecycles.luau b/dist/pesde/lune/providers/lifecycles.luau deleted file mode 100644 index 49a51bfa..00000000 --- a/dist/pesde/lune/providers/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/lune/providers/logger.luau b/dist/pesde/lune/providers/logger.luau deleted file mode 100644 index ddbd462d..00000000 --- a/dist/pesde/lune/providers/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./lune_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/lune/providers/pesde.toml b/dist/pesde/lune/providers/pesde.toml deleted file mode 100644 index 935d5c92..00000000 --- a/dist/pesde/lune/providers/pesde.toml +++ /dev/null @@ -1,43 +0,0 @@ -authors = ["Fire "] -description = "Provider creation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/providers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/providers/runtime.luau b/dist/pesde/lune/providers/runtime.luau deleted file mode 100644 index 8e63a7a0..00000000 --- a/dist/pesde/lune/providers/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/lune/providers/src/create.luau b/dist/pesde/lune/providers/src/create.luau deleted file mode 100644 index 016b8a6d..00000000 --- a/dist/pesde/lune/providers/src/create.luau +++ /dev/null @@ -1,30 +0,0 @@ -local nameOf = require("./name-of") -local providerClasses = require("./provider-classes") -local types = require("./types") - -local function createProvider(self: Self): types.Provider - local provider: types.Provider = self :: any - - if provider.__index == nil then - provider.__index = provider - end - - if provider.__tostring == nil then - provider.__tostring = nameOf - end - - if provider.new == nil then - function provider.new(dependencies) - local self: types.Provider = setmetatable({}, provider) :: any - if provider.constructor then - return provider.constructor(self, dependencies) or self - end - return self - end - end - - providerClasses[provider] = true - return provider -end - -return createProvider diff --git a/dist/pesde/lune/providers/src/index.d.ts b/dist/pesde/lune/providers/src/index.d.ts deleted file mode 100644 index 2ab36e15..00000000 --- a/dist/pesde/lune/providers/src/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "../dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/dist/pesde/lune/providers/src/init.luau b/dist/pesde/lune/providers/src/init.luau deleted file mode 100644 index d678d850..00000000 --- a/dist/pesde/lune/providers/src/init.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 = types.Provider - -local providers = table.freeze({ - create = create, - nameOf = nameOf, - _ = table.freeze({ - providerClasses = providerClasses, - }), -}) - -return providers diff --git a/dist/pesde/lune/providers/src/name-of.luau b/dist/pesde/lune/providers/src/name-of.luau deleted file mode 100644 index 3f86ceec..00000000 --- a/dist/pesde/lune/providers/src/name-of.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -local function nameOf(provider: types.Provider) - return provider.name or "Provider" -end - -return nameOf diff --git a/dist/pesde/lune/providers/src/provider-classes.luau b/dist/pesde/lune/providers/src/provider-classes.luau deleted file mode 100644 index cc57922f..00000000 --- a/dist/pesde/lune/providers/src/provider-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local providerClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return providerClasses diff --git a/dist/pesde/lune/providers/src/types.luau b/dist/pesde/lune/providers/src/types.luau deleted file mode 100644 index 4f4d4dc9..00000000 --- a/dist/pesde/lune/providers/src/types.luau +++ /dev/null @@ -1,12 +0,0 @@ -local dependencies = require("../dependencies") - -export type Provider = dependencies.Dependency, - __tostring: (self: Provider) -> string, - name: string?, - constructor: ((self: Provider, dependencies: Dependencies) -> ())?, - start: (self: Provider) -> ()?, - destroy: (self: Provider) -> ()?, -}, Dependencies> - -return nil diff --git a/dist/pesde/lune/prvdmwrong/LICENSE.md b/dist/pesde/lune/prvdmwrong/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/prvdmwrong/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/prvdmwrong/dependencies.luau b/dist/pesde/lune/prvdmwrong/dependencies.luau deleted file mode 100644 index e232e1f0..00000000 --- a/dist/pesde/lune/prvdmwrong/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/lune/prvdmwrong/lifecycles.luau b/dist/pesde/lune/prvdmwrong/lifecycles.luau deleted file mode 100644 index 49a51bfa..00000000 --- a/dist/pesde/lune/prvdmwrong/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/lune/prvdmwrong/pesde.toml b/dist/pesde/lune/prvdmwrong/pesde.toml deleted file mode 100644 index bbfecebb..00000000 --- a/dist/pesde/lune/prvdmwrong/pesde.toml +++ /dev/null @@ -1,43 +0,0 @@ -authors = ["Fire "] -description = "Entry point to Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/prvdmwrong" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/prvdmwrong/providers.luau b/dist/pesde/lune/prvdmwrong/providers.luau deleted file mode 100644 index 5539dc07..00000000 --- a/dist/pesde/lune/prvdmwrong/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/lune/prvdmwrong/roots.luau b/dist/pesde/lune/prvdmwrong/roots.luau deleted file mode 100644 index 76ed284a..00000000 --- a/dist/pesde/lune/prvdmwrong/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./lune_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/lune/prvdmwrong/src/index.d.ts b/dist/pesde/lune/prvdmwrong/src/index.d.ts deleted file mode 100644 index 2058129c..00000000 --- a/dist/pesde/lune/prvdmwrong/src/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "../dependencies"; -import lifecycles from "../lifecycles"; -import providers from "../providers"; -import roots from "../roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/dist/pesde/lune/prvdmwrong/src/init.luau b/dist/pesde/lune/prvdmwrong/src/init.luau deleted file mode 100644 index 413e2258..00000000 --- a/dist/pesde/lune/prvdmwrong/src/init.luau +++ /dev/null @@ -1,44 +0,0 @@ -local dependencies = require("./dependencies") -local lifecycles = require("./lifecycles") -local providers = require("./providers") -local roots = require("./roots") - -export type Provider = providers.Provider -export type Lifecycle = lifecycles.Lifecycle -export type Root = roots.Root -export type StartedRoot = roots.StartedRoot - -local prvd = { - provider = providers.create, - root = roots.create, - depend = dependencies.depend, - nameOf = providers.nameOf, - - lifecycle = lifecycles.create, - fireConcurrent = lifecycles.handlers.fireConcurrent, - fireSequential = lifecycles.handlers.fireSequential, - - hooks = table.freeze({ - onProviderUsed = roots.hooks.onProviderUsed, - onLifecycleUsed = roots.hooks.onLifecycleUsed, - onRootConstructing = roots.hooks.onRootConstructing, - onRootUsed = roots.hooks.onRootUsed, - onRootStarted = roots.hooks.onRootStarted, - onRootFinished = roots.hooks.onRootFinished, - onRootDestroyed = roots.hooks.onRootDestroyed, - - onLifecycleConstructed = lifecycles.hooks.onLifecycleConstructed, - onLifecycleDestroyed = lifecycles.hooks.onLifecycleDestroyed, - onLifecycleRegistered = lifecycles.hooks.onLifecycleRegistered, - onLifecycleUnregistered = lifecycles.hooks.onLifecycleUnregistered, - }), -} - -local mt = {} - -function mt.__call(_, provider: Self): providers.Provider - return providers.create(provider) :: any -end - -table.freeze(mt) -return setmetatable(prvd, mt) diff --git a/dist/pesde/lune/rbx-components/LICENSE.md b/dist/pesde/lune/rbx-components/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/rbx-components/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/rbx-components/dependencies.luau b/dist/pesde/lune/rbx-components/dependencies.luau deleted file mode 100644 index e232e1f0..00000000 --- a/dist/pesde/lune/rbx-components/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/lune/rbx-components/logger.luau b/dist/pesde/lune/rbx-components/logger.luau deleted file mode 100644 index ddbd462d..00000000 --- a/dist/pesde/lune/rbx-components/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./lune_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/lune/rbx-components/pesde.toml b/dist/pesde/lune/rbx-components/pesde.toml deleted file mode 100644 index c7f1dcf0..00000000 --- a/dist/pesde/lune/rbx-components/pesde.toml +++ /dev/null @@ -1,43 +0,0 @@ -authors = ["Fire "] -description = "Component functionality for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/rbx_components" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/rbx-components/providers.luau b/dist/pesde/lune/rbx-components/providers.luau deleted file mode 100644 index 5539dc07..00000000 --- a/dist/pesde/lune/rbx-components/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/lune/rbx-components/roots.luau b/dist/pesde/lune/rbx-components/roots.luau deleted file mode 100644 index 76ed284a..00000000 --- a/dist/pesde/lune/rbx-components/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./lune_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/lune/rbx-components/src/component-classes.luau b/dist/pesde/lune/rbx-components/src/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/dist/pesde/lune/rbx-components/src/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/dist/pesde/lune/rbx-components/src/component-provider.luau b/dist/pesde/lune/rbx-components/src/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/dist/pesde/lune/rbx-components/src/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/dist/pesde/lune/rbx-components/src/create.luau b/dist/pesde/lune/rbx-components/src/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/dist/pesde/lune/rbx-components/src/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/dist/pesde/lune/rbx-components/src/extend-root/create-component-class-provider.luau b/dist/pesde/lune/rbx-components/src/extend-root/create-component-class-provider.luau deleted file mode 100644 index 9d5ae999..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/create-component-class-provider.luau +++ /dev/null @@ -1,31 +0,0 @@ -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.dependencies = table.freeze({ - componentProvider = ComponentProvider, -}) - -ComponentClassProvider._components = {} :: { types.AnyComponent } - -function ComponentClassProvider.constructor( - self: ComponentClassProvider, - dependencies: typeof(ComponentClassProvider.dependencies) -) - for _, class in self._components do - dependencies.componentProvider:addComponentClass(class) - end -end - -export type ComponentClassProvider = typeof(ComponentClassProvider) - -local function createComponentClassProvider(components: { types.AnyComponent }) - local provider = table.clone(ComponentClassProvider) - provider._components = components - return providers.create(provider) -end - -return createComponentClassProvider diff --git a/dist/pesde/lune/rbx-components/src/extend-root/init.luau b/dist/pesde/lune/rbx-components/src/extend-root/init.luau deleted file mode 100644 index 6e9f0578..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/init.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 = require("@self/use-components") -local useModuleAsComponent = require("@self/use-module-as-component") -local useModulesAsComponents = require("@self/use-modules-as-components") - -local function extendRoot(root: types.RootPrivate): types.Root - if root._hasComponentExtensions then - return logger:fatalError({ template = logger.alreadyExtendedRoot }) - end - - root._hasComponentExtensions = true - root._classes = {} - - root:useProvider(ComponentProvider) - root:useProvider(createComponentClassProvider(root._classes)) - - root.useComponent = useComponent :: any - root.useComponents = useComponents :: any - root.useModuleAsComponent = useModuleAsComponent :: any - root.useModulesAsComponents = useModulesAsComponents :: any - - return root -end - -return extendRoot :: (root: roots.Root) -> types.Root diff --git a/dist/pesde/lune/rbx-components/src/extend-root/use-component.luau b/dist/pesde/lune/rbx-components/src/extend-root/use-component.luau deleted file mode 100644 index b0bd8d1f..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/use-component.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function useComponent(root: types.RootPrivate, component: types.AnyComponent) - table.insert(root._classes, component) - return root -end - -return useComponent diff --git a/dist/pesde/lune/rbx-components/src/extend-root/use-components.luau b/dist/pesde/lune/rbx-components/src/extend-root/use-components.luau deleted file mode 100644 index 809a4006..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/use-components.luau +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/dist/pesde/lune/rbx-components/src/extend-root/use-module-as-component.luau b/dist/pesde/lune/rbx-components/src/extend-root/use-module-as-component.luau deleted file mode 100644 index 46724fe7..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/use-module-as-component.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 useModuleAsComponent diff --git a/dist/pesde/lune/rbx-components/src/extend-root/use-modules-as-components.luau b/dist/pesde/lune/rbx-components/src/extend-root/use-modules-as-components.luau deleted file mode 100644 index bababafa..00000000 --- a/dist/pesde/lune/rbx-components/src/extend-root/use-modules-as-components.luau +++ /dev/null @@ -1,28 +0,0 @@ -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") then - continue - end - - if predicate and not predicate(module) then - continue - end - - local required = (require)(module) - if componentClasses[required] then - table.insert(root, required) - end - end - return root -end - -return useModulesAsComponents diff --git a/dist/pesde/lune/rbx-components/src/init.luau b/dist/pesde/lune/rbx-components/src/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/dist/pesde/lune/rbx-components/src/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/dist/pesde/lune/rbx-components/src/logger.luau b/dist/pesde/lune/rbx-components/src/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/dist/pesde/lune/rbx-components/src/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/dist/pesde/lune/rbx-components/src/types.luau b/dist/pesde/lune/rbx-components/src/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/dist/pesde/lune/rbx-components/src/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/dist/pesde/lune/roots/LICENSE.md b/dist/pesde/lune/roots/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/roots/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/roots/dependencies.luau b/dist/pesde/lune/roots/dependencies.luau deleted file mode 100644 index e232e1f0..00000000 --- a/dist/pesde/lune/roots/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/lune/roots/lifecycles.luau b/dist/pesde/lune/roots/lifecycles.luau deleted file mode 100644 index 49a51bfa..00000000 --- a/dist/pesde/lune/roots/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/lune/roots/logger.luau b/dist/pesde/lune/roots/logger.luau deleted file mode 100644 index ddbd462d..00000000 --- a/dist/pesde/lune/roots/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./lune_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/lune/roots/pesde.toml b/dist/pesde/lune/roots/pesde.toml deleted file mode 100644 index fa2c83c7..00000000 --- a/dist/pesde/lune/roots/pesde.toml +++ /dev/null @@ -1,48 +0,0 @@ -authors = ["Fire "] -description = "Roots implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/roots" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -environment = "lune" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } diff --git a/dist/pesde/lune/roots/providers.luau b/dist/pesde/lune/roots/providers.luau deleted file mode 100644 index 5539dc07..00000000 --- a/dist/pesde/lune/roots/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/lune/roots/runtime.luau b/dist/pesde/lune/roots/runtime.luau deleted file mode 100644 index 8e63a7a0..00000000 --- a/dist/pesde/lune/roots/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./lune_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/lune/roots/src/create.luau b/dist/pesde/lune/roots/src/create.luau deleted file mode 100644 index 26c14f4e..00000000 --- a/dist/pesde/lune/roots/src/create.luau +++ /dev/null @@ -1,47 +0,0 @@ -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-modules") -local useProvider = require("./methods/use-provider") -local useProviders = require("./methods/use-providers") -local useRoot = require("./methods/use-root") -local useRoots = require("./methods/use-roots") -local willFinish = require("./methods/will-finish") -local willStart = require("./methods/will-start") - -local function create(): types.Root - local self: types.Self = { - type = "Root", - - start = start, - - useProvider = useProvider, - useProviders = useProviders, - useModule = useModule, - useModules = useModules, - useRoot = useRoot, - useRoots = useRoots, - destroy = destroy, - - willStart = willStart, - willFinish = willFinish, - - _destroyed = false, - _rootProviders = {}, - _rootLifecycles = {}, - _subRoots = {}, - _start = lifecycles.create("start", lifecycles.handlers.fireConcurrent), - _finish = lifecycles.create("destroy", lifecycles.handlers.fireSequential), - } :: any - - for _, callback in rootConstructing.callbacks do - callback(self) - end - - return self -end - -return create diff --git a/dist/pesde/lune/roots/src/hooks/lifecycle-used.luau b/dist/pesde/lune/roots/src/hooks/lifecycle-used.luau deleted file mode 100644 index bd29276a..00000000 --- a/dist/pesde/lune/roots/src/hooks/lifecycle-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUsed = onLifecycleUsed, -}) diff --git a/dist/pesde/lune/roots/src/hooks/provider-used.luau b/dist/pesde/lune/roots/src/hooks/provider-used.luau deleted file mode 100644 index dac2573c..00000000 --- a/dist/pesde/lune/roots/src/hooks/provider-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -local providers = require("../../providers") -local types = require("../types") - -local callbacks: { (root: types.Self, provider: providers.Provider) -> () } = {} - -local function onProviderUsed(listener: (root: types.Root, provider: providers.Provider) -> ()): () -> () - table.insert(callbacks, listener) - return function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onProviderUsed = onProviderUsed, -}) diff --git a/dist/pesde/lune/roots/src/hooks/root-constructing.luau b/dist/pesde/lune/roots/src/hooks/root-constructing.luau deleted file mode 100644 index 5fb8b819..00000000 --- a/dist/pesde/lune/roots/src/hooks/root-constructing.luau +++ /dev/null @@ -1,15 +0,0 @@ -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({ - callbacks = callbacks, - onRootConstructing = onRootConstructing, -}) diff --git a/dist/pesde/lune/roots/src/hooks/root-destroyed.luau b/dist/pesde/lune/roots/src/hooks/root-destroyed.luau deleted file mode 100644 index 10b79b54..00000000 --- a/dist/pesde/lune/roots/src/hooks/root-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootDestroyed = onRootDestroyed, -}) diff --git a/dist/pesde/lune/roots/src/hooks/root-finished.luau b/dist/pesde/lune/roots/src/hooks/root-finished.luau deleted file mode 100644 index d3519cea..00000000 --- a/dist/pesde/lune/roots/src/hooks/root-finished.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootFinished = onRootFinished, -}) diff --git a/dist/pesde/lune/roots/src/hooks/root-started.luau b/dist/pesde/lune/roots/src/hooks/root-started.luau deleted file mode 100644 index 2ae6f90c..00000000 --- a/dist/pesde/lune/roots/src/hooks/root-started.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootStarted = onRootStarted, -}) diff --git a/dist/pesde/lune/roots/src/hooks/root-used.luau b/dist/pesde/lune/roots/src/hooks/root-used.luau deleted file mode 100644 index 71f172cc..00000000 --- a/dist/pesde/lune/roots/src/hooks/root-used.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 -end - -return table.freeze({ - callbacks = callbacks, - onRootUsed = onRootUsed, -}) diff --git a/dist/pesde/lune/roots/src/index.d.ts b/dist/pesde/lune/roots/src/index.d.ts deleted file mode 100644 index d8e100c5..00000000 --- a/dist/pesde/lune/roots/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/dist/pesde/lune/roots/src/init.luau b/dist/pesde/lune/roots/src/init.luau deleted file mode 100644 index f6aa7495..00000000 --- a/dist/pesde/lune/roots/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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/hooks/root-finished") -local rootStarted = require("@self/hooks/root-started") -local rootUsed = require("@self/hooks/root-used") -local types = require("@self/types") - -export type Root = types.Root -export type StartedRoot = types.StartedRoot - -local roots = table.freeze({ - create = create, - hooks = table.freeze({ - onLifecycleUsed = lifecycleUsed.onLifecycleUsed, - onProviderUsed = providerUsed.onProviderUsed, - onRootUsed = rootUsed.onRootUsed, - - onRootConstructing = rootConstructing.onRootConstructing, - onRootStarted = rootStarted.onRootStarted, - onRootFinished = rootFinished.onRootFinished, - onRootDestroyed = rootDestroyed.onRootDestroyed, - }), -}) - -return roots diff --git a/dist/pesde/lune/roots/src/logger.luau b/dist/pesde/lune/roots/src/logger.luau deleted file mode 100644 index 92e611ef..00000000 --- a/dist/pesde/lune/roots/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", -}) diff --git a/dist/pesde/lune/roots/src/methods/destroy.luau b/dist/pesde/lune/roots/src/methods/destroy.luau deleted file mode 100644 index 0c62a935..00000000 --- a/dist/pesde/lune/roots/src/methods/destroy.luau +++ /dev/null @@ -1,16 +0,0 @@ -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._subRoots) - root._start:clear() - root._finish:clear() -end - -return destroy diff --git a/dist/pesde/lune/roots/src/methods/start.luau b/dist/pesde/lune/roots/src/methods/start.luau deleted file mode 100644 index 3f24dac5..00000000 --- a/dist/pesde/lune/roots/src/methods/start.luau +++ /dev/null @@ -1,102 +0,0 @@ -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 = require("../types") - -local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) - local lifecycleMethod = (provider :: any)[lifecycle.method] - if typeof(lifecycleMethod) == "function" then - -- local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES - - -- if isProfiling then - -- lifecycle:register(function(...) - -- debug.profilebegin(memoryCategory) - -- debug.setmemorycategory(memoryCategory) - -- lifecycleMethod(provider, ...) - -- debug.resetmemorycategory() - -- debug.profileend() - -- end) - -- else - lifecycle:register(function(...) - lifecycleMethod(provider, ...) - end) - -- end - end -end - -local function nameOf(provider: providers.Provider, extension: string?): string - return if extension then `{tostring(provider)}.{extension}` else tostring(provider) -end - -local function start(root: types.Self): types.StartedRoot - local processed = dependencies.processDependencies(root._rootProviders) - local sortedProviders = processed.sortedDependencies :: { providers.Provider } - local processedLifecycles = processed.lifecycles - table.move(root._rootLifecycles, 1, #root._rootLifecycles, #processedLifecycles + 1, processedLifecycles) - - dependencies.sortByPriority(sortedProviders) - - local constructedProviders = {} - for _, provider in sortedProviders do - local providerDependencies = (provider :: any).dependencies - if typeof(providerDependencies) == "table" then - providerDependencies = table.clone(providerDependencies) - for key, value in providerDependencies do - providerDependencies[key] = constructedProviders[value] - end - end - - local constructed = provider.new(providerDependencies) - constructedProviders[provider] = constructed - bindLifecycle(root._start, constructed) - bindLifecycle(root._finish, constructed) - - for _, lifecycle in processedLifecycles do - bindLifecycle(lifecycle, constructed) - end - end - - local subRoots: { types.StartedRoot } = {} - for root in root._subRoots do - table.insert(subRoots, root:start()) - end - - root._start:fire() - - local startedRoot = {} :: types.StartedRoot - startedRoot.type = "StartedRoot" - - local didFinish = false - - function startedRoot:finish() - if didFinish then - return logger:fatalError({ template = logger.alreadyFinished }) - end - - didFinish = true - root._finish:fire() - - -- NOTE(znotfireman): Assume the user cleans up their own lifecycles - root._start:clear() - root._finish:clear() - - for _, subRoot in subRoots do - subRoot:finish() - end - - for _, hook in rootFinished do - hook(root) - end - end - - for _, hook in rootStarted do - hook(root) - end - - return startedRoot -end - -return start diff --git a/dist/pesde/lune/roots/src/methods/use-lifecycle.luau b/dist/pesde/lune/roots/src/methods/use-lifecycle.luau deleted file mode 100644 index 862c2d07..00000000 --- a/dist/pesde/lune/roots/src/methods/use-lifecycle.luau +++ /dev/null @@ -1,14 +0,0 @@ -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.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - return root -end - -return useLifecycle diff --git a/dist/pesde/lune/roots/src/methods/use-lifecycles.luau b/dist/pesde/lune/roots/src/methods/use-lifecycles.luau deleted file mode 100644 index 3f12341f..00000000 --- a/dist/pesde/lune/roots/src/methods/use-lifecycles.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 _, lifecycle in lifecycles do - table.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - end - return root -end - -return useLifecycles diff --git a/dist/pesde/lune/roots/src/methods/use-module.luau b/dist/pesde/lune/roots/src/methods/use-module.luau deleted file mode 100644 index a96b3d17..00000000 --- a/dist/pesde/lune/roots/src/methods/use-module.luau +++ /dev/null @@ -1,23 +0,0 @@ -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, module: ModuleScript) - local moduleExport = (require)(module) - - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - - return root -end - -return useModule diff --git a/dist/pesde/lune/roots/src/methods/use-modules.luau b/dist/pesde/lune/roots/src/methods/use-modules.luau deleted file mode 100644 index 8354a9d0..00000000 --- a/dist/pesde/lune/roots/src/methods/use-modules.luau +++ /dev/null @@ -1,28 +0,0 @@ -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, modules: { Instance }, predicate: ((module: ModuleScript) -> boolean)?) - for _, module in modules do - if not module:IsA("ModuleScript") or predicate and not predicate(module) then - continue - end - - local moduleExport = (require)(module) - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - end - - return root -end - -return useModules diff --git a/dist/pesde/lune/roots/src/methods/use-provider.luau b/dist/pesde/lune/roots/src/methods/use-provider.luau deleted file mode 100644 index 277d8049..00000000 --- a/dist/pesde/lune/roots/src/methods/use-provider.luau +++ /dev/null @@ -1,14 +0,0 @@ -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) - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - return root -end - -return useProvider diff --git a/dist/pesde/lune/roots/src/methods/use-providers.luau b/dist/pesde/lune/roots/src/methods/use-providers.luau deleted file mode 100644 index 1489c3a3..00000000 --- a/dist/pesde/lune/roots/src/methods/use-providers.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 }) - for _, provider in providers do - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - end - return root -end - -return useProviders diff --git a/dist/pesde/lune/roots/src/methods/use-root.luau b/dist/pesde/lune/roots/src/methods/use-root.luau deleted file mode 100644 index efc4ad1e..00000000 --- a/dist/pesde/lune/roots/src/methods/use-root.luau +++ /dev/null @@ -1,13 +0,0 @@ -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) - return root -end - -return useRoot diff --git a/dist/pesde/lune/roots/src/methods/use-roots.luau b/dist/pesde/lune/roots/src/methods/use-roots.luau deleted file mode 100644 index 7b5b9dda..00000000 --- a/dist/pesde/lune/roots/src/methods/use-roots.luau +++ /dev/null @@ -1,15 +0,0 @@ -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.spawnCallbacks(rootUsed, root, subRoot) - end - return root -end - -return useRoots diff --git a/dist/pesde/lune/roots/src/methods/will-finish.luau b/dist/pesde/lune/roots/src/methods/will-finish.luau deleted file mode 100644 index 893088f4..00000000 --- a/dist/pesde/lune/roots/src/methods/will-finish.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willFinish(root: types.Self, callback: () -> ()) - root._finish:register(callback) - return root -end - -return willFinish diff --git a/dist/pesde/lune/roots/src/methods/will-start.luau b/dist/pesde/lune/roots/src/methods/will-start.luau deleted file mode 100644 index 7c3d88c3..00000000 --- a/dist/pesde/lune/roots/src/methods/will-start.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willStart(root: types.Self, callback: () -> ()) - root._start:register(callback) - return root -end - -return willStart diff --git a/dist/pesde/lune/roots/src/types.luau b/dist/pesde/lune/roots/src/types.luau deleted file mode 100644 index 104143c4..00000000 --- a/dist/pesde/lune/roots/src/types.luau +++ /dev/null @@ -1,40 +0,0 @@ -local lifecycles = require("../lifecycles") -local providers = require("../providers") - -type Set = { [T]: true } - -export type Root = { - type: "Root", - - start: (root: Root) -> StartedRoot, - - useModule: (root: Root, module: ModuleScript) -> Root, - useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useRoot: (root: Root, root: Root) -> Root, - useRoots: (root: Root, roots: { Root }) -> Root, - useProvider: (root: Root, provider: providers.Provider) -> Root, - useProviders: (root: Root, providers: { providers.Provider }) -> Root, - useLifecycle: (root: Root, lifecycle: lifecycles.Lifecycle) -> Root, - useLifecycles: (root: Root, lifecycles: { lifecycles.Lifecycle }) -> Root, - destroy: (root: Root) -> (), - - willStart: (callback: () -> ()) -> Root, - willFinish: (callback: () -> ()) -> Root, -} - -export type StartedRoot = { - type: "StartedRoot", - - finish: (root: StartedRoot) -> (), -} - -export type Self = Root & { - _destroyed: boolean, - _rootProviders: Set>, - _rootLifecycles: { lifecycles.Lifecycle }, - _subRoots: Set, - _start: lifecycles.Lifecycle<()>, - _finish: lifecycles.Lifecycle<()>, -} - -return nil diff --git a/dist/pesde/lune/runtime/LICENSE.md b/dist/pesde/lune/runtime/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/runtime/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/runtime/pesde.toml b/dist/pesde/lune/runtime/pesde.toml deleted file mode 100644 index 6ec5bb70..00000000 --- a/dist/pesde/lune/runtime/pesde.toml +++ /dev/null @@ -1,21 +0,0 @@ -authors = ["Fire "] -description = "Runtime agnostic libraries for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/runtime" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "lune" -lib = "src/init.luau" -[dependencies] diff --git a/dist/pesde/lune/runtime/src/batteries/threadpool.luau b/dist/pesde/lune/runtime/src/batteries/threadpool.luau deleted file mode 100644 index 6caf08b4..00000000 --- a/dist/pesde/lune/runtime/src/batteries/threadpool.luau +++ /dev/null @@ -1,38 +0,0 @@ -local task = require("../libs/task") - -local freeThreads: { thread } = {} - -local function run(f: (T...) -> (), thread: thread, ...) - f(...) - table.insert(freeThreads, thread) -end - -local function yielder() - while true do - run(coroutine.yield()) - end -end - -local function spawn(f: (T...) -> (), ...: T...) - local thread - if #freeThreads > 0 then - thread = freeThreads[#freeThreads] - freeThreads[#freeThreads] = nil - else - thread = coroutine.create(yielder) - coroutine.resume(thread) - end - - task.spawn(thread, f, thread, ...) -end - -local function spawnCallbacks(callbacks: { (Args...) -> () }, ...: Args...) - for _, callback in callbacks do - spawn(callback, ...) - end -end - -return table.freeze({ - spawn = spawn, - spawnCallbacks = spawnCallbacks, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/init.luau b/dist/pesde/lune/runtime/src/implementations/init.luau deleted file mode 100644 index 28dbe015..00000000 --- a/dist/pesde/lune/runtime/src/implementations/init.luau +++ /dev/null @@ -1,56 +0,0 @@ -local types = require("@self/../types") - -type Implementation = { 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/lune"), - lute = require("@self/lute"), - seal = require("@self/seal"), - zune = require("@self/zune"), -}) - -local currentRuntime: types.Runtime = nil -do - for _, runtime in supportedRuntimes :: { [string]: types.Runtime } do - local isRuntime = runtime.is() - if isRuntime then - local currentRuntimePriority = currentRuntime and currentRuntime.priority or 0 - local runtimePriority = runtime.priority or 0 - if currentRuntimePriority <= runtimePriority then - currentRuntime = runtime - end - end - end - assert(currentRuntime, "No supported runtime") -end - -local currentRuntimeName: RuntimeName = currentRuntime.name :: any - -local function notImplemented(functionName: string) - return function() - error(`'{functionName}' is not implemented by runtime '{currentRuntimeName}'`, 2) - end -end - -local function implementFunction(label: string, implementations: { [types.Runtime]: Implementation? }): T - local implementation = implementations[currentRuntime] - if implementation then - if implementation.new then - return implementation.new() - elseif implementation.implementation then - return implementation.implementation - end - end - return notImplemented(label) :: any -end - -return table.freeze({ - supportedRuntimes = supportedRuntimes, - currentRuntime = currentRuntime, - currentRuntimeName = currentRuntimeName, - implementFunction = implementFunction, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/init.spec.luau b/dist/pesde/lune/runtime/src/implementations/init.spec.luau deleted file mode 100644 index 3ce91cbb..00000000 --- a/dist/pesde/lune/runtime/src/implementations/init.spec.luau +++ /dev/null @@ -1,81 +0,0 @@ -local implementations = require("@self/../implementations") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("currentRuntime", function() - test("detects lune runtime", function() - expect(implementations.currentRuntimeName).is("lune") - expect(implementations.currentRuntime).is(implementations.supportedRuntimes.lune) - end) - end) - - describe("implementFunction", function() - test("implements for lune runtime", function() - local lune = function() end - local luau = function() end - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - implementation = lune, - }, - [implementations.supportedRuntimes.luau] = { - implementation = luau, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - end) - - test("constructs for lune runtime", function() - local lune = function() end - local luau = function() end - - local constructedLune = false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - new = function() - constructedLune = true - return lune - end, - }, - [implementations.supportedRuntimes.luau] = { - new = function() - return luau - end, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - expect(constructedLune).is_true() - end) - - test("defaults to not implemented function", function() - local constructSuccess, runSuccess = false, false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.roblox] = { - new = function() - constructSuccess = true - return function() - runSuccess = true - end - end, - }, - }) - - expect(constructSuccess).is(false) - expect(implementation).is_a("function") - expect(implementation).fails_with("'implementation' is not implemented by runtime 'lune'") - expect(runSuccess).is(false) - end) - end) -end diff --git a/dist/pesde/lune/runtime/src/implementations/luau.luau b/dist/pesde/lune/runtime/src/implementations/luau.luau deleted file mode 100644 index c67e52f4..00000000 --- a/dist/pesde/lune/runtime/src/implementations/luau.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "luau", - priority = -1, - is = function() - return true - end, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/lune.luau b/dist/pesde/lune/runtime/src/implementations/lune.luau deleted file mode 100644 index f49834eb..00000000 --- a/dist/pesde/lune/runtime/src/implementations/lune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/lute.luau b/dist/pesde/lune/runtime/src/implementations/lute.luau deleted file mode 100644 index 7b6abc58..00000000 --- a/dist/pesde/lune/runtime/src/implementations/lute.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "lute", - is = function() - return false - end, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/roblox.luau b/dist/pesde/lune/runtime/src/implementations/roblox.luau deleted file mode 100644 index 91a780e2..00000000 --- a/dist/pesde/lune/runtime/src/implementations/roblox.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "roblox", - is = function() - -- wtf - return not not (_VERSION == "Luau" and game and workspace) - end, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/seal.luau b/dist/pesde/lune/runtime/src/implementations/seal.luau deleted file mode 100644 index 0a72684c..00000000 --- a/dist/pesde/lune/runtime/src/implementations/seal.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "seal", - is = function() - return false - end, -}) diff --git a/dist/pesde/lune/runtime/src/implementations/zune.luau b/dist/pesde/lune/runtime/src/implementations/zune.luau deleted file mode 100644 index 48243e05..00000000 --- a/dist/pesde/lune/runtime/src/implementations/zune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/lune/runtime/src/index.d.ts b/dist/pesde/lune/runtime/src/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/dist/pesde/lune/runtime/src/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/dist/pesde/lune/runtime/src/init.luau b/dist/pesde/lune/runtime/src/init.luau deleted file mode 100644 index 26bdeee0..00000000 --- a/dist/pesde/lune/runtime/src/init.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - - task = task, - warn = warn, - - threadpool = threadpool, -}) diff --git a/dist/pesde/lune/runtime/src/libs/task.luau b/dist/pesde/lune/runtime/src/libs/task.luau deleted file mode 100644 index 28c1ac9e..00000000 --- a/dist/pesde/lune/runtime/src/libs/task.luau +++ /dev/null @@ -1,157 +0,0 @@ -local implementations = require("../implementations") - -export type TaskLib = { - cancel: (thread) -> (), - defer: (functionOrThread: thread | (T...) -> (), T...) -> thread, - delay: (duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread, - spawn: (functionOrThread: thread | (T...) -> (), T...) -> thread, - wait: (duration: number?) -> number, -} - -local supportedRuntimes = implementations.supportedRuntimes -local implementFunction = implementations.implementFunction - -local function defaultSpawn(functionOrThread: thread | (T...) -> (), ...: T...): thread - if type(functionOrThread) == "thread" then - coroutine.resume(functionOrThread, ...) - return functionOrThread - else - local thread = coroutine.create(functionOrThread) - coroutine.resume(thread, ...) - return thread - end -end - -local function defaultWait(seconds: number?) - local startTime = os.clock() - local endTime = startTime + (seconds or 1) - local clockTime: number - repeat - clockTime = os.clock() - until clockTime >= endTime - return clockTime - startTime -end - -local task: TaskLib = table.freeze({ - cancel = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.cancel - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").cancel - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").cancel - end, - }, - [supportedRuntimes.luau] = { - implementation = function(thread) - if not coroutine.close(thread) then - error(debug.traceback(thread, "Could not cancel thread")) - end - end, - }, - }), - defer = implementFunction("task.defer", { - [supportedRuntimes.roblox] = { - new = function() - return task.defer :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").defer - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").defer - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - delay = implementFunction("task.delay", { - [supportedRuntimes.roblox] = { - new = function() - return task.delay :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").delay - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").delay - end, - }, - [supportedRuntimes.luau] = { - implementation = function(duration: number, functionOrThread: thread | (T...) -> (), ...: T...): thread - return defaultSpawn( - if typeof(functionOrThread) == "function" - then function(duration, functionOrThread, ...) - defaultWait(duration) - functionOrThread(...) - end - else function(duration, functionOrThread, ...) - defaultWait(duration) - coroutine.resume(...) - end, - duration, - functionOrThread, - ... - ) - end, - }, - }), - spawn = implementFunction("task.spawn", { - [supportedRuntimes.roblox] = { - new = function() - return task.spawn :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").spawn - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").spawn - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - wait = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.wait - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").wait - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").wait - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultWait, - }, - }), -}) - -return task diff --git a/dist/pesde/lune/runtime/src/libs/task.spec.luau b/dist/pesde/lune/runtime/src/libs/task.spec.luau deleted file mode 100644 index 0918e87f..00000000 --- a/dist/pesde/lune/runtime/src/libs/task.spec.luau +++ /dev/null @@ -1,62 +0,0 @@ -local luneTask = require("@lune/task") -local task = require("./task") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - --- FIXME: can't async stuff lol -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("task", function() - test("spawn", function() - expect(task.spawn).is(luneTask.spawn) - local spawned = false - - task.spawn(function() - spawned = true - end) - - expect(spawned).is_true() - end) - - test("defer", function() - expect(task.defer).is(luneTask.defer) - - -- local spawned = false - - -- task.defer(function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - end) - - test("delay", function() - expect(task.delay).is(luneTask.delay) - -- local spawned = false - - -- task.delay(0.25, function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - - -- local startTime = os.clock() - -- repeat - -- until os.clock() - startTime > 0.5 - - -- print(spawned) - - -- expect(spawned).is_true() - end) - - test("wait", function() - expect(task.wait).is(luneTask.wait) - end) - - test("cancel", function() - expect(task.cancel).is(luneTask.cancel) - end) - end) -end diff --git a/dist/pesde/lune/runtime/src/libs/warn.luau b/dist/pesde/lune/runtime/src/libs/warn.luau deleted file mode 100644 index 6a4837ac..00000000 --- a/dist/pesde/lune/runtime/src/libs/warn.luau +++ /dev/null @@ -1,27 +0,0 @@ -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(index, ...))) - end - return table.concat(stringified, " ") -end - -local warn: (T...) -> () = implementFunction("warn", { - [supportedRuntimes.roblox] = { - new = function() - return warn - end, - }, - [supportedRuntimes.luau] = { - implementation = function(...: T...) - print(`\27[0;33m{tostringTuple(...)}\27[0m`) - end, - }, -}) - -return warn diff --git a/dist/pesde/lune/runtime/src/types.luau b/dist/pesde/lune/runtime/src/types.luau deleted file mode 100644 index ca050fce..00000000 --- a/dist/pesde/lune/runtime/src/types.luau +++ /dev/null @@ -1,13 +0,0 @@ -export type Runtime = { - name: string, - priority: number?, - is: () -> boolean, -} - -local function Runtime(x: Runtime) - return table.freeze(x) -end - -return table.freeze({ - Runtime = Runtime, -}) diff --git a/dist/pesde/lune/typecheckers/LICENSE.md b/dist/pesde/lune/typecheckers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/lune/typecheckers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/lune/typecheckers/pesde.toml b/dist/pesde/lune/typecheckers/pesde.toml deleted file mode 100644 index 0386d30a..00000000 --- a/dist/pesde/lune/typecheckers/pesde.toml +++ /dev/null @@ -1,21 +0,0 @@ -authors = ["Fire "] -description = "Typechecking primitives and compatibility for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/typecheckers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "lune" -lib = "src/init.luau" -[dependencies] diff --git a/dist/pesde/lune/typecheckers/src/init.luau b/dist/pesde/lune/typecheckers/src/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/dist/pesde/roblox/dependencies/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/dependencies/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/dependencies/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/dependencies/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/dependencies/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/dependencies/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/dependencies/LICENSE.md b/dist/pesde/roblox/dependencies/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/dependencies/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/dependencies/lifecycles.luau b/dist/pesde/roblox/dependencies/lifecycles.luau deleted file mode 100644 index 41d507c6..00000000 --- a/dist/pesde/roblox/dependencies/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/roblox/dependencies/logger.luau b/dist/pesde/roblox/dependencies/logger.luau deleted file mode 100644 index 7f5c3021..00000000 --- a/dist/pesde/roblox/dependencies/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/roblox/dependencies/pesde.toml b/dist/pesde/roblox/dependencies/pesde.toml deleted file mode 100644 index 696e9c1e..00000000 --- a/dist/pesde/roblox/dependencies/pesde.toml +++ /dev/null @@ -1,38 +0,0 @@ -authors = ["Fire "] -description = "Dependency resolution logic for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "lifecycles.luau", - "logger.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/dependencies" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "lifecycles.luau", - "logger.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/dependencies/src/depend.luau b/dist/pesde/roblox/dependencies/src/depend.luau deleted file mode 100644 index 55230b4e..00000000 --- a/dist/pesde/roblox/dependencies/src/depend.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 locked.", - __index = useBeforeConstructed, - __newindex = useBeforeConstructed, -} - -function unresolvedMt:__tostring() - return "UnresolvedDependency" -end - --- Wtf luau -local function depend(dependency: types.Dependency): typeof(({} :: types.Dependency).new( - (nil :: any) :: Dependencies, - ... -)) - -- Return a mock value that will be resolved during dependency resolution. - return setmetatable({ - type = "UnresolvedDependency", - dependency = dependency, - }, unresolvedMt) :: any -end - -return depend diff --git a/dist/pesde/roblox/dependencies/src/index.d.ts b/dist/pesde/roblox/dependencies/src/index.d.ts deleted file mode 100644 index a5bddcde..00000000 --- a/dist/pesde/roblox/dependencies/src/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Lifecycle } from "../lifecycles"; - -declare namespace dependencies { - export type Dependency = Self & { - dependencies: Dependencies, - priority?: number, - new(dependencies: Dependencies, ...args: NewArgs): Dependency; - }; - - interface ProccessDependencyResult { - sortedDependencies: Dependency[]; - lifecycles: Lifecycle[]; - } - - export type SubdependenciesOf = T extends { dependencies: infer Dependencies } - ? Dependencies - : never; - - export function depend InstanceType>(dependency: T): InstanceType; - export function processDependencies(dependencies: Set>): ProccessDependencyResult; - export function sortByPriority(dependencies: Dependency[]): void; -} - -export = dependencies; -export as namespace dependencies; diff --git a/dist/pesde/roblox/dependencies/src/init.luau b/dist/pesde/roblox/dependencies/src/init.luau deleted file mode 100644 index e6b27b24..00000000 --- a/dist/pesde/roblox/dependencies/src/init.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 = types.Dependency - -return table.freeze({ - depend = depend, - processDependencies = processDependencies, - sortByPriority = sortByPriority, -}) diff --git a/dist/pesde/roblox/dependencies/src/logger.luau b/dist/pesde/roblox/dependencies/src/logger.luau deleted file mode 100644 index 22f3b307..00000000 --- a/dist/pesde/roblox/dependencies/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", - alreadyFinished = "Root has already finished.", -}) diff --git a/dist/pesde/roblox/dependencies/src/process-dependencies.luau b/dist/pesde/roblox/dependencies/src/process-dependencies.luau deleted file mode 100644 index 20820a35..00000000 --- a/dist/pesde/roblox/dependencies/src/process-dependencies.luau +++ /dev/null @@ -1,57 +0,0 @@ -local lifecycles = require("../lifecycles") -local types = require("./types") - -export type ProccessDependencyResult = { - sortedDependencies: { types.Dependency }, - lifecycles: { lifecycles.Lifecycle }, -} - -type Set = { [T]: true } - -local function processDependencies(dependencies: Set>): ProccessDependencyResult - local sortedDependencies = {} - local lifecycles = {} - - -- TODO: optimize ts - local function visitDependency(dependency: types.Dependency) - -- print("Visiting dependency", dependency) - - for key, value in dependency :: any do - if key == "dependencies" then - -- print("Checking [prvd.dependencies]") - if typeof(value) == "table" then - for key, value in value do - -- print("Checking key", key, "value", value) - if typeof(value) == "table" and value.type == "UnresolvedDependency" then - local unresolved: types.UnresolvedDependency = value - -- print("Got unresolved dependency", unresolved.dependency, "visiting") - visitDependency(unresolved.dependency) - end - end - end - - continue - end - - if typeof(value) == "table" and value.type == "Lifecycle" and not table.find(lifecycles, value) then - table.insert(lifecycles, value) - end - end - - if dependencies[dependency] and not table.find(sortedDependencies, dependency) then - -- print("Pushing to sort") - table.insert(sortedDependencies, dependency) - end - end - - for dependency in dependencies do - visitDependency(dependency) - end - - return { - sortedDependencies = sortedDependencies, - lifecycles = lifecycles, - } -end - -return processDependencies diff --git a/dist/pesde/roblox/dependencies/src/process-dependencies.spec.luau b/dist/pesde/roblox/dependencies/src/process-dependencies.spec.luau deleted file mode 100644 index 0fcfcac8..00000000 --- a/dist/pesde/roblox/dependencies/src/process-dependencies.spec.luau +++ /dev/null @@ -1,67 +0,0 @@ -local depend = require("./depend") -local processDependencies = require("./process-dependencies") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -local function nickname(name: string) - return function(tbl: T): T - return setmetatable(tbl :: any, { - __tostring = function() - return name - end, - }) - end -end - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("processDependencies", function() - test("sortedDependencies", function() - local first = nickname("first")({}) - - local second = nickname("second")({ - dependencies = { - toFirst = depend(first :: any), - toFirstAgain = depend(first :: any), - }, - }) - - local third = nickname("third")({ - dependencies = { - toSecond = depend(second :: any), - }, - }) - - local fourth = nickname("fourth")({ - dependencies = { - toFirst = depend(first :: any), - toSecond = depend(second :: any), - toThird = depend(third :: any), - }, - }) - - local processed = processDependencies({ - [first] = true, - [second] = true, - [third] = true, - [fourth] = true, - } :: any) - - expect(typeof(processed)).is("table") - expect(processed).has_key("sortedDependencies") - expect(typeof(processed.sortedDependencies)).is("table") - - local sortedDependencies = processed.sortedDependencies - - expect(typeof(sortedDependencies)).is("table") - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - expect(sortedDependencies[4]).is(fourth) - end) - - test("lifecycles", function() end) - end) -end diff --git a/dist/pesde/roblox/dependencies/src/sort-by-priority.luau b/dist/pesde/roblox/dependencies/src/sort-by-priority.luau deleted file mode 100644 index 638468ab..00000000 --- a/dist/pesde/roblox/dependencies/src/sort-by-priority.luau +++ /dev/null @@ -1,14 +0,0 @@ -local types = require("./types") - -local function sortByPriority(dependencies: { types.Dependency }) - 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) - local rightIndex = table.find(dependencies, right) - return leftIndex < rightIndex - end) -end - -return sortByPriority diff --git a/dist/pesde/roblox/dependencies/src/sort-by-priority.spec.luau b/dist/pesde/roblox/dependencies/src/sort-by-priority.spec.luau deleted file mode 100644 index eeb34933..00000000 --- a/dist/pesde/roblox/dependencies/src/sort-by-priority.spec.luau +++ /dev/null @@ -1,52 +0,0 @@ -local sortByPriority = require("./sort-by-priority") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("sortByPriority", function() - test("dependencies", function() - local first = {} - - local second = { - toFirst = first, - } - - local third = { - toSecond = second, - } - - local sortedDependencies = { - first, - second, - third, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - end) - - test("priority", function() - local low = {} - - local high = { - priority = 500, - } - - local sortedDependencies = { - low, - high, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(high) - expect(sortedDependencies[2]).is(low) - end) - end) -end diff --git a/dist/pesde/roblox/dependencies/src/types.luau b/dist/pesde/roblox/dependencies/src/types.luau deleted file mode 100644 index 2b1c72aa..00000000 --- a/dist/pesde/roblox/dependencies/src/types.luau +++ /dev/null @@ -1,14 +0,0 @@ -export type Dependency = Self & { - dependencies: Dependencies, - priority: number?, - new: (dependencies: Dependencies, NewArgs...) -> Dependency, -} - -export type UnresolvedDependency = { - type: "UnresolvedDependency", - dependency: Dependency, -} - -export type dependencies = { __prvdmwrong_dependencies: never } - -return nil diff --git a/dist/pesde/roblox/lifecycles/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/lifecycles/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/lifecycles/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/lifecycles/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/lifecycles/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/lifecycles/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/lifecycles/LICENSE.md b/dist/pesde/roblox/lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/lifecycles/logger.luau b/dist/pesde/roblox/lifecycles/logger.luau deleted file mode 100644 index 7f5c3021..00000000 --- a/dist/pesde/roblox/lifecycles/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/roblox/lifecycles/pesde.toml b/dist/pesde/roblox/lifecycles/pesde.toml deleted file mode 100644 index 1c949f70..00000000 --- a/dist/pesde/roblox/lifecycles/pesde.toml +++ /dev/null @@ -1,38 +0,0 @@ -authors = ["Fire "] -description = "Provider method lifecycles implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/lifecycles" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "runtime.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/lifecycles/runtime.luau b/dist/pesde/roblox/lifecycles/runtime.luau deleted file mode 100644 index 7530eb0a..00000000 --- a/dist/pesde/roblox/lifecycles/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/roblox/lifecycles/src/create.luau b/dist/pesde/roblox/lifecycles/src/create.luau deleted file mode 100644 index 6cdd2891..00000000 --- a/dist/pesde/roblox/lifecycles/src/create.luau +++ /dev/null @@ -1,45 +0,0 @@ -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") -local onUnregistered = require("./methods/on-unregistered") -local register = require("./methods/register") -local types = require("./types") -local unregister = require("./methods/unregister") - -local function create( - method: string, - onFire: (lifecycle: types.Lifecycle, Args...) -> () -): types.Lifecycle - local self: types.Self = { - _isDestroyed = false, - _selfRegistered = {}, - _selfUnregistered = {}, - - type = "Lifecycle", - callbacks = {}, - - fire = onFire, - method = method, - register = register, - unregister = unregister, - clear = clear, - onRegistered = onRegistered, - onUnregistered = onUnregistered, - await = await, - destroy = destroy, - } :: any - - methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) - - for _, onLifecycleConstructed in lifecycleConstructed.callbacks do - onLifecycleConstructed(self :: types.Lifecycle) - end - - return self -end - -return create diff --git a/dist/pesde/roblox/lifecycles/src/handlers/fire-concurrent.luau b/dist/pesde/roblox/lifecycles/src/handlers/fire-concurrent.luau deleted file mode 100644 index f279b888..00000000 --- a/dist/pesde/roblox/lifecycles/src/handlers/fire-concurrent.luau +++ /dev/null @@ -1,10 +0,0 @@ -local runtime = require("../../runtime") -local types = require("../types") - -local function fireConcurrent(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - runtime.threadpool.spawn(callback, ...) - end -end - -return fireConcurrent diff --git a/dist/pesde/roblox/lifecycles/src/handlers/fire-sequential.luau b/dist/pesde/roblox/lifecycles/src/handlers/fire-sequential.luau deleted file mode 100644 index 80911ad9..00000000 --- a/dist/pesde/roblox/lifecycles/src/handlers/fire-sequential.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -local function fireSequential(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - callback(...) - end -end - -return fireSequential diff --git a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-constructed.luau b/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-constructed.luau deleted file mode 100644 index 8ea4d81b..00000000 --- a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-constructed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleConstructed = onLifecycleConstructed, -}) diff --git a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-destroyed.luau b/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-destroyed.luau deleted file mode 100644 index 47abcfab..00000000 --- a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleDestroyed = onLifecycleDestroyed, -}) diff --git a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-registered.luau b/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-registered.luau deleted file mode 100644 index fab588a3..00000000 --- a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-registered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleRegistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleRegistered = onLifecycleRegistered, -}) diff --git a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-unregistered.luau b/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-unregistered.luau deleted file mode 100644 index 0ec81756..00000000 --- a/dist/pesde/roblox/lifecycles/src/hooks/lifecycle-unregistered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleUnregistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUnregistered = onLifecycleUnregistered, -}) diff --git a/dist/pesde/roblox/lifecycles/src/index.d.ts b/dist/pesde/roblox/lifecycles/src/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/dist/pesde/roblox/lifecycles/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/dist/pesde/roblox/lifecycles/src/init.luau b/dist/pesde/roblox/lifecycles/src/init.luau deleted file mode 100644 index dbec091b..00000000 --- a/dist/pesde/roblox/lifecycles/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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 lifecycleRegistered = require("@self/hooks/lifecycle-registered") -local lifecycleUnregistered = require("@self/hooks/lifecycle-unregistered") -local methodToLifecycles = require("@self/method-to-lifecycles") -local types = require("@self/types") - -export type Lifecycle = types.Lifecycle - -return table.freeze({ - create = create, - handlers = table.freeze({ - fireConcurrent = fireConcurrent, - fireSequential = fireSequential, - }), - hooks = table.freeze({ - onLifecycleRegistered = lifecycleRegistered.onLifecycleRegistered, - onLifecycleUnregistered = lifecycleUnregistered.onLifecycleUnregistered, - onLifecycleConstructed = lifecycleConstructed.onLifecycleConstructed, - onLifecycleDestroyed = lifecycleDestroyed.onLifecycleDestroyed, - }), - _ = table.freeze({ - methodToLifecycles = methodToLifecycles, - }), -}) diff --git a/dist/pesde/roblox/lifecycles/src/logger.luau b/dist/pesde/roblox/lifecycles/src/logger.luau deleted file mode 100644 index 3ae7c27e..00000000 --- a/dist/pesde/roblox/lifecycles/src/logger.luau +++ /dev/null @@ -1,6 +0,0 @@ -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.", -}) diff --git a/dist/pesde/roblox/lifecycles/src/method-to-lifecycles.luau b/dist/pesde/roblox/lifecycles/src/method-to-lifecycles.luau deleted file mode 100644 index 386a8756..00000000 --- a/dist/pesde/roblox/lifecycles/src/method-to-lifecycles.luau +++ /dev/null @@ -1,5 +0,0 @@ -local types = require("./types") - -local methodToLifecycles: { [string]: { types.Lifecycle } } = {} - -return methodToLifecycles diff --git a/dist/pesde/roblox/lifecycles/src/methods/await.luau b/dist/pesde/roblox/lifecycles/src/methods/await.luau deleted file mode 100644 index ed8299d6..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/await.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function await(lifecycle: types.Self): Args... - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local currentThread = coroutine.running() - local function callback(...: Args...) - lifecycle:unregister(callback) - coroutine.resume(currentThread, ...) - end - lifecycle:register(callback) - return coroutine.yield() -end - -return await diff --git a/dist/pesde/roblox/lifecycles/src/methods/destroy.luau b/dist/pesde/roblox/lifecycles/src/methods/destroy.luau deleted file mode 100644 index d9d5d6cc..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/destroy.luau +++ /dev/null @@ -1,18 +0,0 @@ -local lifecycleDestroyed = require("../hooks/lifecycle-destroyed") -local logger = require("../logger") -local methodToLifecycles = require("../method-to-lifecycles") -local types = require("../types") - -local function destroy(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.alreadyDestroyed }) - end - table.remove(methodToLifecycles[lifecycle.method], table.find(methodToLifecycles[lifecycle.method], lifecycle)) - table.clear(lifecycle.callbacks) - for _, callback in lifecycleDestroyed.callbacks do - callback(lifecycle) - end - lifecycle._isDestroyed = true -end - -return destroy diff --git a/dist/pesde/roblox/lifecycles/src/methods/on-registered.luau b/dist/pesde/roblox/lifecycles/src/methods/on-registered.luau deleted file mode 100644 index 7ddb009a..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/on-registered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onRegistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end - table.insert(lifecycle._selfRegistered, listener) - return function() - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end -end - -return onRegistered diff --git a/dist/pesde/roblox/lifecycles/src/methods/on-unregistered.luau b/dist/pesde/roblox/lifecycles/src/methods/on-unregistered.luau deleted file mode 100644 index 842040ec..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/on-unregistered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onUnregistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end - table.insert(lifecycle._selfUnregistered, listener) - return function() - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end -end - -return onUnregistered diff --git a/dist/pesde/roblox/lifecycles/src/methods/register.luau b/dist/pesde/roblox/lifecycles/src/methods/register.luau deleted file mode 100644 index 3fd74d56..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/register.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function register(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle.callbacks, table.find(lifecycle.callbacks, callback)) - end - table.insert(lifecycle.callbacks, callback) - threadpool.spawnCallbacks(lifecycle._selfRegistered, callback) -end - -return register diff --git a/dist/pesde/roblox/lifecycles/src/methods/unregister-all.luau b/dist/pesde/roblox/lifecycles/src/methods/unregister-all.luau deleted file mode 100644 index 5e6235af..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/unregister-all.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function clear(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - for _, callback in lifecycle.callbacks do - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end - table.clear(lifecycle.callbacks) -end - -return clear diff --git a/dist/pesde/roblox/lifecycles/src/methods/unregister.luau b/dist/pesde/roblox/lifecycles/src/methods/unregister.luau deleted file mode 100644 index 0ca7223f..00000000 --- a/dist/pesde/roblox/lifecycles/src/methods/unregister.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function unregister(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local index = table.find(lifecycle.callbacks, callback) - if index then - table.remove(lifecycle.callbacks, index) - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end -end - -return unregister diff --git a/dist/pesde/roblox/lifecycles/src/types.luau b/dist/pesde/roblox/lifecycles/src/types.luau deleted file mode 100644 index f2931b52..00000000 --- a/dist/pesde/roblox/lifecycles/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -export type Lifecycle = { - type: "Lifecycle", - - callbacks: { (Args...) -> () }, - method: string, - - register: (self: Lifecycle, callback: (Args...) -> ()) -> (), - fire: (self: Lifecycle, Args...) -> (), - unregister: (self: Lifecycle, callback: (Args...) -> ()) -> (), - clear: (self: Lifecycle) -> (), - onRegistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - onUnregistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - await: (self: Lifecycle) -> Args..., - destroy: (self: Lifecycle) -> (), -} - -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - -return nil diff --git a/dist/pesde/roblox/logger/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/logger/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/logger/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/logger/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/logger/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/logger/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/logger/LICENSE.md b/dist/pesde/roblox/logger/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/logger/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/logger/pesde.toml b/dist/pesde/roblox/logger/pesde.toml deleted file mode 100644 index 12da700e..00000000 --- a/dist/pesde/roblox/logger/pesde.toml +++ /dev/null @@ -1,35 +0,0 @@ -authors = ["Fire "] -description = "Logging for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/logger" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/logger/runtime.luau b/dist/pesde/roblox/logger/runtime.luau deleted file mode 100644 index 7530eb0a..00000000 --- a/dist/pesde/roblox/logger/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/roblox/logger/src/allow-web-links.luau b/dist/pesde/roblox/logger/src/allow-web-links.luau deleted file mode 100644 index dcd0bb82..00000000 --- a/dist/pesde/roblox/logger/src/allow-web-links.luau +++ /dev/null @@ -1,5 +0,0 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks diff --git a/dist/pesde/roblox/logger/src/create.luau b/dist/pesde/roblox/logger/src/create.luau deleted file mode 100644 index 943aab25..00000000 --- a/dist/pesde/roblox/logger/src/create.luau +++ /dev/null @@ -1,32 +0,0 @@ -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(label: string, errorInfoUrl: string?, templates: T): types.Logger - local self = {} :: types.Logger - self.type = "Logger" - - label = `[{label}] ` - errorInfoUrl = if allowWebLinks then errorInfoUrl else nil - - function self:warn(log) - warn(label .. formatLog(self, log, errorInfoUrl)) - end - - function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) - end - - function self:fatalError(log) - error(label .. formatLog(self, log, errorInfoUrl)) - end - - setmetatable(self :: any, { __index = templates }) - return self -end - -return create diff --git a/dist/pesde/roblox/logger/src/format-log.luau b/dist/pesde/roblox/logger/src/format-log.luau deleted file mode 100644 index 3eeda21b..00000000 --- a/dist/pesde/roblox/logger/src/format-log.luau +++ /dev/null @@ -1,43 +0,0 @@ -local types = require("./types") - -local function formatLog(self: types.Logger, 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 - formattedTemplate = string.gsub(formattedTemplate, "ERROR_MESSAGE", error.message) - end - - local id: string? - - -- TODO: find a better way to do ts while still being ergonomic - for templateKey, template in (self :: any) :: { [string]: string } do - if template == log.template then - id = templateKey - break - end - end - - if id then - formattedTemplate ..= `\nID: {id}` - end - - if errorInfoUrl then - formattedTemplate ..= `\nLearn more: {errorInfoUrl}` - if id then - formattedTemplate ..= `#{string.lower(id)}` - end - end - - if trace then - formattedTemplate ..= `\n---- Stack trace ----\n{trace}` - end - - -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") -end - -return formatLog diff --git a/dist/pesde/roblox/logger/src/index.d.ts b/dist/pesde/roblox/logger/src/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/dist/pesde/roblox/logger/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/dist/pesde/roblox/logger/src/init.luau b/dist/pesde/roblox/logger/src/init.luau deleted file mode 100644 index 52760a5d..00000000 --- a/dist/pesde/roblox/logger/src/init.luau +++ /dev/null @@ -1,18 +0,0 @@ -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 = types.Logger -export type Log = types.Log -export type Error = types.Error - -return table.freeze({ - create = create, - formatLog = formatLog, - parseError = parseError, - allowWebLinks = allowWebLinks, - standardErrorInfoUrl = standardErrorInfoUrl, -}) diff --git a/dist/pesde/roblox/logger/src/parse-error.luau b/dist/pesde/roblox/logger/src/parse-error.luau deleted file mode 100644 index e43fe53d..00000000 --- a/dist/pesde/roblox/logger/src/parse-error.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/dist/pesde/roblox/logger/src/standard-error-info-url.luau b/dist/pesde/roblox/logger/src/standard-error-info-url.luau deleted file mode 100644 index 345faf36..00000000 --- a/dist/pesde/roblox/logger/src/standard-error-info-url.luau +++ /dev/null @@ -1,5 +0,0 @@ -local function standardErrorInfoUrl(label: string): string - return `https://prvdmwrong.luau.page/api-reference/{label}/errors` -end - -return standardErrorInfoUrl diff --git a/dist/pesde/roblox/logger/src/types.luau b/dist/pesde/roblox/logger/src/types.luau deleted file mode 100644 index d1699037..00000000 --- a/dist/pesde/roblox/logger/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -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 & { - type: "Logger", - print: (self: Logger, props: Log) -> (), - warn: (self: Logger, props: Log) -> (), - error: (self: Logger, props: Log) -> (), - fatalError: (self: Logger, props: Log) -> never, -} - -return nil diff --git a/dist/pesde/roblox/providers/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/providers/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/providers/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/providers/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/providers/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/providers/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/providers/LICENSE.md b/dist/pesde/roblox/providers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/providers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/providers/dependencies.luau b/dist/pesde/roblox/providers/dependencies.luau deleted file mode 100644 index 8613b470..00000000 --- a/dist/pesde/roblox/providers/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/roblox/providers/lifecycles.luau b/dist/pesde/roblox/providers/lifecycles.luau deleted file mode 100644 index 41d507c6..00000000 --- a/dist/pesde/roblox/providers/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/roblox/providers/logger.luau b/dist/pesde/roblox/providers/logger.luau deleted file mode 100644 index 7f5c3021..00000000 --- a/dist/pesde/roblox/providers/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/roblox/providers/pesde.toml b/dist/pesde/roblox/providers/pesde.toml deleted file mode 100644 index 2c228e8b..00000000 --- a/dist/pesde/roblox/providers/pesde.toml +++ /dev/null @@ -1,44 +0,0 @@ -authors = ["Fire "] -description = "Provider creation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/providers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "runtime.luau", - "logger.luau", - "lifecycles.luau", - "dependencies.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/providers/runtime.luau b/dist/pesde/roblox/providers/runtime.luau deleted file mode 100644 index 7530eb0a..00000000 --- a/dist/pesde/roblox/providers/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/roblox/providers/src/create.luau b/dist/pesde/roblox/providers/src/create.luau deleted file mode 100644 index 016b8a6d..00000000 --- a/dist/pesde/roblox/providers/src/create.luau +++ /dev/null @@ -1,30 +0,0 @@ -local nameOf = require("./name-of") -local providerClasses = require("./provider-classes") -local types = require("./types") - -local function createProvider(self: Self): types.Provider - local provider: types.Provider = self :: any - - if provider.__index == nil then - provider.__index = provider - end - - if provider.__tostring == nil then - provider.__tostring = nameOf - end - - if provider.new == nil then - function provider.new(dependencies) - local self: types.Provider = setmetatable({}, provider) :: any - if provider.constructor then - return provider.constructor(self, dependencies) or self - end - return self - end - end - - providerClasses[provider] = true - return provider -end - -return createProvider diff --git a/dist/pesde/roblox/providers/src/index.d.ts b/dist/pesde/roblox/providers/src/index.d.ts deleted file mode 100644 index 2ab36e15..00000000 --- a/dist/pesde/roblox/providers/src/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "../dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/dist/pesde/roblox/providers/src/init.luau b/dist/pesde/roblox/providers/src/init.luau deleted file mode 100644 index d678d850..00000000 --- a/dist/pesde/roblox/providers/src/init.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 = types.Provider - -local providers = table.freeze({ - create = create, - nameOf = nameOf, - _ = table.freeze({ - providerClasses = providerClasses, - }), -}) - -return providers diff --git a/dist/pesde/roblox/providers/src/name-of.luau b/dist/pesde/roblox/providers/src/name-of.luau deleted file mode 100644 index 3f86ceec..00000000 --- a/dist/pesde/roblox/providers/src/name-of.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -local function nameOf(provider: types.Provider) - return provider.name or "Provider" -end - -return nameOf diff --git a/dist/pesde/roblox/providers/src/provider-classes.luau b/dist/pesde/roblox/providers/src/provider-classes.luau deleted file mode 100644 index cc57922f..00000000 --- a/dist/pesde/roblox/providers/src/provider-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local providerClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return providerClasses diff --git a/dist/pesde/roblox/providers/src/types.luau b/dist/pesde/roblox/providers/src/types.luau deleted file mode 100644 index 4f4d4dc9..00000000 --- a/dist/pesde/roblox/providers/src/types.luau +++ /dev/null @@ -1,12 +0,0 @@ -local dependencies = require("../dependencies") - -export type Provider = dependencies.Dependency, - __tostring: (self: Provider) -> string, - name: string?, - constructor: ((self: Provider, dependencies: Dependencies) -> ())?, - start: (self: Provider) -> ()?, - destroy: (self: Provider) -> ()?, -}, Dependencies> - -return nil diff --git a/dist/pesde/roblox/prvdmwrong/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/prvdmwrong/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/prvdmwrong/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/prvdmwrong/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/prvdmwrong/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/prvdmwrong/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/prvdmwrong/LICENSE.md b/dist/pesde/roblox/prvdmwrong/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/prvdmwrong/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/prvdmwrong/dependencies.luau b/dist/pesde/roblox/prvdmwrong/dependencies.luau deleted file mode 100644 index 8613b470..00000000 --- a/dist/pesde/roblox/prvdmwrong/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/roblox/prvdmwrong/lifecycles.luau b/dist/pesde/roblox/prvdmwrong/lifecycles.luau deleted file mode 100644 index 41d507c6..00000000 --- a/dist/pesde/roblox/prvdmwrong/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/roblox/prvdmwrong/pesde.toml b/dist/pesde/roblox/prvdmwrong/pesde.toml deleted file mode 100644 index 065c5392..00000000 --- a/dist/pesde/roblox/prvdmwrong/pesde.toml +++ /dev/null @@ -1,44 +0,0 @@ -authors = ["Fire "] -description = "Entry point to Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/prvdmwrong" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "dependencies.luau", - "roots.luau", - "lifecycles.luau", - "providers.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/prvdmwrong/providers.luau b/dist/pesde/roblox/prvdmwrong/providers.luau deleted file mode 100644 index bdf28037..00000000 --- a/dist/pesde/roblox/prvdmwrong/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/roblox/prvdmwrong/roots.luau b/dist/pesde/roblox/prvdmwrong/roots.luau deleted file mode 100644 index 29353bdf..00000000 --- a/dist/pesde/roblox/prvdmwrong/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/roblox/prvdmwrong/src/index.d.ts b/dist/pesde/roblox/prvdmwrong/src/index.d.ts deleted file mode 100644 index 2058129c..00000000 --- a/dist/pesde/roblox/prvdmwrong/src/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "../dependencies"; -import lifecycles from "../lifecycles"; -import providers from "../providers"; -import roots from "../roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/dist/pesde/roblox/prvdmwrong/src/init.luau b/dist/pesde/roblox/prvdmwrong/src/init.luau deleted file mode 100644 index 413e2258..00000000 --- a/dist/pesde/roblox/prvdmwrong/src/init.luau +++ /dev/null @@ -1,44 +0,0 @@ -local dependencies = require("./dependencies") -local lifecycles = require("./lifecycles") -local providers = require("./providers") -local roots = require("./roots") - -export type Provider = providers.Provider -export type Lifecycle = lifecycles.Lifecycle -export type Root = roots.Root -export type StartedRoot = roots.StartedRoot - -local prvd = { - provider = providers.create, - root = roots.create, - depend = dependencies.depend, - nameOf = providers.nameOf, - - lifecycle = lifecycles.create, - fireConcurrent = lifecycles.handlers.fireConcurrent, - fireSequential = lifecycles.handlers.fireSequential, - - hooks = table.freeze({ - onProviderUsed = roots.hooks.onProviderUsed, - onLifecycleUsed = roots.hooks.onLifecycleUsed, - onRootConstructing = roots.hooks.onRootConstructing, - onRootUsed = roots.hooks.onRootUsed, - onRootStarted = roots.hooks.onRootStarted, - onRootFinished = roots.hooks.onRootFinished, - onRootDestroyed = roots.hooks.onRootDestroyed, - - onLifecycleConstructed = lifecycles.hooks.onLifecycleConstructed, - onLifecycleDestroyed = lifecycles.hooks.onLifecycleDestroyed, - onLifecycleRegistered = lifecycles.hooks.onLifecycleRegistered, - onLifecycleUnregistered = lifecycles.hooks.onLifecycleUnregistered, - }), -} - -local mt = {} - -function mt.__call(_, provider: Self): providers.Provider - return providers.create(provider) :: any -end - -table.freeze(mt) -return setmetatable(prvd, mt) diff --git a/dist/pesde/roblox/rbx-components/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/rbx-components/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/rbx-components/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/rbx-components/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/rbx-components/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/rbx-components/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/rbx-components/LICENSE.md b/dist/pesde/roblox/rbx-components/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/rbx-components/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/rbx-components/dependencies.luau b/dist/pesde/roblox/rbx-components/dependencies.luau deleted file mode 100644 index 8613b470..00000000 --- a/dist/pesde/roblox/rbx-components/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/roblox/rbx-components/logger.luau b/dist/pesde/roblox/rbx-components/logger.luau deleted file mode 100644 index 7f5c3021..00000000 --- a/dist/pesde/roblox/rbx-components/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/roblox/rbx-components/pesde.toml b/dist/pesde/roblox/rbx-components/pesde.toml deleted file mode 100644 index a481f22b..00000000 --- a/dist/pesde/roblox/rbx-components/pesde.toml +++ /dev/null @@ -1,44 +0,0 @@ -authors = ["Fire "] -description = "Component functionality for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/rbx_components" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "roots.luau", - "providers.luau", - "dependencies.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -roots = { workspace = "prvdmwrong/roots", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/rbx-components/providers.luau b/dist/pesde/roblox/rbx-components/providers.luau deleted file mode 100644 index bdf28037..00000000 --- a/dist/pesde/roblox/rbx-components/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/roblox/rbx-components/roots.luau b/dist/pesde/roblox/rbx-components/roots.luau deleted file mode 100644 index 29353bdf..00000000 --- a/dist/pesde/roblox/rbx-components/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/pesde/roblox/rbx-components/src/component-classes.luau b/dist/pesde/roblox/rbx-components/src/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/dist/pesde/roblox/rbx-components/src/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/dist/pesde/roblox/rbx-components/src/component-provider.luau b/dist/pesde/roblox/rbx-components/src/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/dist/pesde/roblox/rbx-components/src/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/dist/pesde/roblox/rbx-components/src/create.luau b/dist/pesde/roblox/rbx-components/src/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/dist/pesde/roblox/rbx-components/src/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/create-component-class-provider.luau b/dist/pesde/roblox/rbx-components/src/extend-root/create-component-class-provider.luau deleted file mode 100644 index 9d5ae999..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/create-component-class-provider.luau +++ /dev/null @@ -1,31 +0,0 @@ -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.dependencies = table.freeze({ - componentProvider = ComponentProvider, -}) - -ComponentClassProvider._components = {} :: { types.AnyComponent } - -function ComponentClassProvider.constructor( - self: ComponentClassProvider, - dependencies: typeof(ComponentClassProvider.dependencies) -) - for _, class in self._components do - dependencies.componentProvider:addComponentClass(class) - end -end - -export type ComponentClassProvider = typeof(ComponentClassProvider) - -local function createComponentClassProvider(components: { types.AnyComponent }) - local provider = table.clone(ComponentClassProvider) - provider._components = components - return providers.create(provider) -end - -return createComponentClassProvider diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/init.luau b/dist/pesde/roblox/rbx-components/src/extend-root/init.luau deleted file mode 100644 index 6e9f0578..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/init.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 = require("@self/use-components") -local useModuleAsComponent = require("@self/use-module-as-component") -local useModulesAsComponents = require("@self/use-modules-as-components") - -local function extendRoot(root: types.RootPrivate): types.Root - if root._hasComponentExtensions then - return logger:fatalError({ template = logger.alreadyExtendedRoot }) - end - - root._hasComponentExtensions = true - root._classes = {} - - root:useProvider(ComponentProvider) - root:useProvider(createComponentClassProvider(root._classes)) - - root.useComponent = useComponent :: any - root.useComponents = useComponents :: any - root.useModuleAsComponent = useModuleAsComponent :: any - root.useModulesAsComponents = useModulesAsComponents :: any - - return root -end - -return extendRoot :: (root: roots.Root) -> types.Root diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/use-component.luau b/dist/pesde/roblox/rbx-components/src/extend-root/use-component.luau deleted file mode 100644 index b0bd8d1f..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/use-component.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function useComponent(root: types.RootPrivate, component: types.AnyComponent) - table.insert(root._classes, component) - return root -end - -return useComponent diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/use-components.luau b/dist/pesde/roblox/rbx-components/src/extend-root/use-components.luau deleted file mode 100644 index 809a4006..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/use-components.luau +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/use-module-as-component.luau b/dist/pesde/roblox/rbx-components/src/extend-root/use-module-as-component.luau deleted file mode 100644 index 46724fe7..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/use-module-as-component.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 useModuleAsComponent diff --git a/dist/pesde/roblox/rbx-components/src/extend-root/use-modules-as-components.luau b/dist/pesde/roblox/rbx-components/src/extend-root/use-modules-as-components.luau deleted file mode 100644 index bababafa..00000000 --- a/dist/pesde/roblox/rbx-components/src/extend-root/use-modules-as-components.luau +++ /dev/null @@ -1,28 +0,0 @@ -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") then - continue - end - - if predicate and not predicate(module) then - continue - end - - local required = (require)(module) - if componentClasses[required] then - table.insert(root, required) - end - end - return root -end - -return useModulesAsComponents diff --git a/dist/pesde/roblox/rbx-components/src/init.luau b/dist/pesde/roblox/rbx-components/src/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/dist/pesde/roblox/rbx-components/src/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/dist/pesde/roblox/rbx-components/src/logger.luau b/dist/pesde/roblox/rbx-components/src/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/dist/pesde/roblox/rbx-components/src/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/dist/pesde/roblox/rbx-components/src/types.luau b/dist/pesde/roblox/rbx-components/src/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/dist/pesde/roblox/rbx-components/src/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/rbx-lifecycles/LICENSE.md b/dist/pesde/roblox/rbx-lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/rbx-lifecycles/pesde.toml b/dist/pesde/roblox/rbx-lifecycles/pesde.toml deleted file mode 100644 index 1a9be374..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/pesde.toml +++ /dev/null @@ -1,35 +0,0 @@ -authors = ["Fire "] -description = "Lifecycles implementations for Roblox" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "prvdmwrong.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/rbx_lifecycles" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "prvdmwrong.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -prvdmwrong = { workspace = "prvdmwrong/prvdmwrong", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/rbx-lifecycles/prvdmwrong.luau b/dist/pesde/roblox/rbx-lifecycles/prvdmwrong.luau deleted file mode 100644 index 96053434..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/prvdmwrong.luau +++ /dev/null @@ -1,6 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/prvdmwrong") -export type Root = DEPENDENCY.Root -export type Lifecycle = DEPENDENCY.Lifecycle -export type StartedRoot = DEPENDENCY.StartedRoot -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/roblox/rbx-lifecycles/src/index.d.ts b/dist/pesde/roblox/rbx-lifecycles/src/index.d.ts deleted file mode 100644 index 3ad36447..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/src/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace RbxLifecycles { - export const RbxLifecycles: Provider<{ - preSimulation: Lifecycle<[dt: number]>; - postSimulation: Lifecycle<[dt: number]>; - preAnimation: Lifecycle<[dt: number]>; - preRender: Lifecycle<[dt: number]>; - playerAdded: Lifecycle<[player: Player]>; - playerRemoving: Lifecycle<[player: Player]>; - }>; - - export interface PreSimulation { - preSimulation(dt: number): void; - } - - export interface PostSimulation { - postSimulation(dt: number): void; - } - - export interface PreAnimation { - preAnimation(dt: number): void; - } - - export interface PreRender { - preRender(dt: number): void; - } - - export interface PlayerAdded { - playerAdded(player: Player): void; - } - - export interface PlayerRemoving { - playerRemoving(player: Player): void; - } -} - -export = RbxLifecycles; -export as namespace RbxLifecycles; diff --git a/dist/pesde/roblox/rbx-lifecycles/src/init.luau b/dist/pesde/roblox/rbx-lifecycles/src/init.luau deleted file mode 100644 index c1243680..00000000 --- a/dist/pesde/roblox/rbx-lifecycles/src/init.luau +++ /dev/null @@ -1,67 +0,0 @@ -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 = prvd.lifecycle("preSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.postSimulation = prvd.lifecycle("postSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preAnimation = prvd.lifecycle("preAnimation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preRender = prvd.lifecycle("preRender", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerAdded = prvd.lifecycle("playerAdded", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerRemoving = prvd.lifecycle("playerRemoving", fireConcurrent) :: prvd.Lifecycle - -local function wrapLifecycle(lifecycle: prvd.Lifecycle<...unknown>) - return function(...: unknown) - lifecycle:fire(...) - end -end - -function RbxLifecycles.constructor(self: RbxLifecycles) - self.connections = {} :: { RBXScriptConnection } - - self:_addConnections( - RunService.PreSimulation:Connect(wrapLifecycle(RbxLifecycles.preSimulation :: any)), - RunService.PostSimulation:Connect(wrapLifecycle(RbxLifecycles.postSimulation :: any)), - RunService.PreAnimation:Connect(wrapLifecycle(RbxLifecycles.preAnimation :: any)) - ) - - if RunService:IsClient() then - self:_addConnections(RunService.PreRender:Connect(wrapLifecycle(RbxLifecycles.preRender :: any))) - end - - self:_addConnections( - Players.PlayerAdded:Connect(wrapLifecycle(RbxLifecycles.playerAdded :: any)), - Players.PlayerRemoving:Connect(wrapLifecycle(RbxLifecycles.playerRemoving :: any)) - ) -end - -function RbxLifecycles.finish(self: RbxLifecycles) - for _, connection in self.connections do - if connection.Connected then - connection:Disconnect() - end - end - table.clear(self.connections) -end - -function RbxLifecycles._addConnections(self: RbxLifecycles, ...: RBXScriptConnection) - for index = 1, select("#", ...) do - table.insert(self.connections, select(index, ...) :: any) - end -end - --- Needed so typescript can require the provider as: --- --- ```ts --- import { RbxLifecycles } from "@rbxts/rbx-lifecycles" --- ``` -RbxLifecycles.RbxLifecycles = RbxLifecycles - -export type RbxLifecycles = typeof(RbxLifecycles) -return prvd(RbxLifecycles) diff --git a/dist/pesde/roblox/roots/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/roots/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/roots/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/roots/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/roots/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/roots/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/roots/LICENSE.md b/dist/pesde/roblox/roots/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/roots/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/roots/dependencies.luau b/dist/pesde/roblox/roots/dependencies.luau deleted file mode 100644 index 8613b470..00000000 --- a/dist/pesde/roblox/roots/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/pesde/roblox/roots/lifecycles.luau b/dist/pesde/roblox/roots/lifecycles.luau deleted file mode 100644 index 41d507c6..00000000 --- a/dist/pesde/roblox/roots/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/pesde/roblox/roots/logger.luau b/dist/pesde/roblox/roots/logger.luau deleted file mode 100644 index 7f5c3021..00000000 --- a/dist/pesde/roblox/roots/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/pesde/roblox/roots/pesde.toml b/dist/pesde/roblox/roots/pesde.toml deleted file mode 100644 index d21822cd..00000000 --- a/dist/pesde/roblox/roots/pesde.toml +++ /dev/null @@ -1,47 +0,0 @@ -authors = ["Fire "] -description = "Roots implementation for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -license = "MPL-2.0" -name = "prvdmwrong/roots" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = [ - "src", - "logger.luau", - "dependencies.luau", - "runtime.luau", - "providers.luau", - "lifecycles.luau", -] -environment = "roblox" -lib = "src/init.luau" -[dependencies] -logger = { workspace = "prvdmwrong/logger", version = "0.2.0-rc.4" } -dependencies = { workspace = "prvdmwrong/dependencies", version = "0.2.0-rc.4" } -providers = { workspace = "prvdmwrong/providers", version = "0.2.0-rc.4" } -lifecycles = { workspace = "prvdmwrong/lifecycles", version = "0.2.0-rc.4" } -runtime = { workspace = "prvdmwrong/runtime", version = "0.2.0-rc.4" } - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/roots/providers.luau b/dist/pesde/roblox/roots/providers.luau deleted file mode 100644 index bdf28037..00000000 --- a/dist/pesde/roblox/roots/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/pesde/roblox/roots/runtime.luau b/dist/pesde/roblox/roots/runtime.luau deleted file mode 100644 index 7530eb0a..00000000 --- a/dist/pesde/roblox/roots/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./roblox_packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/pesde/roblox/roots/src/create.luau b/dist/pesde/roblox/roots/src/create.luau deleted file mode 100644 index 26c14f4e..00000000 --- a/dist/pesde/roblox/roots/src/create.luau +++ /dev/null @@ -1,47 +0,0 @@ -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-modules") -local useProvider = require("./methods/use-provider") -local useProviders = require("./methods/use-providers") -local useRoot = require("./methods/use-root") -local useRoots = require("./methods/use-roots") -local willFinish = require("./methods/will-finish") -local willStart = require("./methods/will-start") - -local function create(): types.Root - local self: types.Self = { - type = "Root", - - start = start, - - useProvider = useProvider, - useProviders = useProviders, - useModule = useModule, - useModules = useModules, - useRoot = useRoot, - useRoots = useRoots, - destroy = destroy, - - willStart = willStart, - willFinish = willFinish, - - _destroyed = false, - _rootProviders = {}, - _rootLifecycles = {}, - _subRoots = {}, - _start = lifecycles.create("start", lifecycles.handlers.fireConcurrent), - _finish = lifecycles.create("destroy", lifecycles.handlers.fireSequential), - } :: any - - for _, callback in rootConstructing.callbacks do - callback(self) - end - - return self -end - -return create diff --git a/dist/pesde/roblox/roots/src/hooks/lifecycle-used.luau b/dist/pesde/roblox/roots/src/hooks/lifecycle-used.luau deleted file mode 100644 index bd29276a..00000000 --- a/dist/pesde/roblox/roots/src/hooks/lifecycle-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUsed = onLifecycleUsed, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/provider-used.luau b/dist/pesde/roblox/roots/src/hooks/provider-used.luau deleted file mode 100644 index dac2573c..00000000 --- a/dist/pesde/roblox/roots/src/hooks/provider-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -local providers = require("../../providers") -local types = require("../types") - -local callbacks: { (root: types.Self, provider: providers.Provider) -> () } = {} - -local function onProviderUsed(listener: (root: types.Root, provider: providers.Provider) -> ()): () -> () - table.insert(callbacks, listener) - return function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onProviderUsed = onProviderUsed, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/root-constructing.luau b/dist/pesde/roblox/roots/src/hooks/root-constructing.luau deleted file mode 100644 index 5fb8b819..00000000 --- a/dist/pesde/roblox/roots/src/hooks/root-constructing.luau +++ /dev/null @@ -1,15 +0,0 @@ -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({ - callbacks = callbacks, - onRootConstructing = onRootConstructing, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/root-destroyed.luau b/dist/pesde/roblox/roots/src/hooks/root-destroyed.luau deleted file mode 100644 index 10b79b54..00000000 --- a/dist/pesde/roblox/roots/src/hooks/root-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootDestroyed = onRootDestroyed, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/root-finished.luau b/dist/pesde/roblox/roots/src/hooks/root-finished.luau deleted file mode 100644 index d3519cea..00000000 --- a/dist/pesde/roblox/roots/src/hooks/root-finished.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootFinished = onRootFinished, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/root-started.luau b/dist/pesde/roblox/roots/src/hooks/root-started.luau deleted file mode 100644 index 2ae6f90c..00000000 --- a/dist/pesde/roblox/roots/src/hooks/root-started.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootStarted = onRootStarted, -}) diff --git a/dist/pesde/roblox/roots/src/hooks/root-used.luau b/dist/pesde/roblox/roots/src/hooks/root-used.luau deleted file mode 100644 index 71f172cc..00000000 --- a/dist/pesde/roblox/roots/src/hooks/root-used.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 -end - -return table.freeze({ - callbacks = callbacks, - onRootUsed = onRootUsed, -}) diff --git a/dist/pesde/roblox/roots/src/index.d.ts b/dist/pesde/roblox/roots/src/index.d.ts deleted file mode 100644 index d8e100c5..00000000 --- a/dist/pesde/roblox/roots/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/dist/pesde/roblox/roots/src/init.luau b/dist/pesde/roblox/roots/src/init.luau deleted file mode 100644 index f6aa7495..00000000 --- a/dist/pesde/roblox/roots/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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/hooks/root-finished") -local rootStarted = require("@self/hooks/root-started") -local rootUsed = require("@self/hooks/root-used") -local types = require("@self/types") - -export type Root = types.Root -export type StartedRoot = types.StartedRoot - -local roots = table.freeze({ - create = create, - hooks = table.freeze({ - onLifecycleUsed = lifecycleUsed.onLifecycleUsed, - onProviderUsed = providerUsed.onProviderUsed, - onRootUsed = rootUsed.onRootUsed, - - onRootConstructing = rootConstructing.onRootConstructing, - onRootStarted = rootStarted.onRootStarted, - onRootFinished = rootFinished.onRootFinished, - onRootDestroyed = rootDestroyed.onRootDestroyed, - }), -}) - -return roots diff --git a/dist/pesde/roblox/roots/src/logger.luau b/dist/pesde/roblox/roots/src/logger.luau deleted file mode 100644 index 92e611ef..00000000 --- a/dist/pesde/roblox/roots/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", -}) diff --git a/dist/pesde/roblox/roots/src/methods/destroy.luau b/dist/pesde/roblox/roots/src/methods/destroy.luau deleted file mode 100644 index 0c62a935..00000000 --- a/dist/pesde/roblox/roots/src/methods/destroy.luau +++ /dev/null @@ -1,16 +0,0 @@ -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._subRoots) - root._start:clear() - root._finish:clear() -end - -return destroy diff --git a/dist/pesde/roblox/roots/src/methods/start.luau b/dist/pesde/roblox/roots/src/methods/start.luau deleted file mode 100644 index 3f24dac5..00000000 --- a/dist/pesde/roblox/roots/src/methods/start.luau +++ /dev/null @@ -1,102 +0,0 @@ -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 = require("../types") - -local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) - local lifecycleMethod = (provider :: any)[lifecycle.method] - if typeof(lifecycleMethod) == "function" then - -- local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES - - -- if isProfiling then - -- lifecycle:register(function(...) - -- debug.profilebegin(memoryCategory) - -- debug.setmemorycategory(memoryCategory) - -- lifecycleMethod(provider, ...) - -- debug.resetmemorycategory() - -- debug.profileend() - -- end) - -- else - lifecycle:register(function(...) - lifecycleMethod(provider, ...) - end) - -- end - end -end - -local function nameOf(provider: providers.Provider, extension: string?): string - return if extension then `{tostring(provider)}.{extension}` else tostring(provider) -end - -local function start(root: types.Self): types.StartedRoot - local processed = dependencies.processDependencies(root._rootProviders) - local sortedProviders = processed.sortedDependencies :: { providers.Provider } - local processedLifecycles = processed.lifecycles - table.move(root._rootLifecycles, 1, #root._rootLifecycles, #processedLifecycles + 1, processedLifecycles) - - dependencies.sortByPriority(sortedProviders) - - local constructedProviders = {} - for _, provider in sortedProviders do - local providerDependencies = (provider :: any).dependencies - if typeof(providerDependencies) == "table" then - providerDependencies = table.clone(providerDependencies) - for key, value in providerDependencies do - providerDependencies[key] = constructedProviders[value] - end - end - - local constructed = provider.new(providerDependencies) - constructedProviders[provider] = constructed - bindLifecycle(root._start, constructed) - bindLifecycle(root._finish, constructed) - - for _, lifecycle in processedLifecycles do - bindLifecycle(lifecycle, constructed) - end - end - - local subRoots: { types.StartedRoot } = {} - for root in root._subRoots do - table.insert(subRoots, root:start()) - end - - root._start:fire() - - local startedRoot = {} :: types.StartedRoot - startedRoot.type = "StartedRoot" - - local didFinish = false - - function startedRoot:finish() - if didFinish then - return logger:fatalError({ template = logger.alreadyFinished }) - end - - didFinish = true - root._finish:fire() - - -- NOTE(znotfireman): Assume the user cleans up their own lifecycles - root._start:clear() - root._finish:clear() - - for _, subRoot in subRoots do - subRoot:finish() - end - - for _, hook in rootFinished do - hook(root) - end - end - - for _, hook in rootStarted do - hook(root) - end - - return startedRoot -end - -return start diff --git a/dist/pesde/roblox/roots/src/methods/use-lifecycle.luau b/dist/pesde/roblox/roots/src/methods/use-lifecycle.luau deleted file mode 100644 index 862c2d07..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-lifecycle.luau +++ /dev/null @@ -1,14 +0,0 @@ -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.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - return root -end - -return useLifecycle diff --git a/dist/pesde/roblox/roots/src/methods/use-lifecycles.luau b/dist/pesde/roblox/roots/src/methods/use-lifecycles.luau deleted file mode 100644 index 3f12341f..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-lifecycles.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 _, lifecycle in lifecycles do - table.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - end - return root -end - -return useLifecycles diff --git a/dist/pesde/roblox/roots/src/methods/use-module.luau b/dist/pesde/roblox/roots/src/methods/use-module.luau deleted file mode 100644 index a96b3d17..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-module.luau +++ /dev/null @@ -1,23 +0,0 @@ -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, module: ModuleScript) - local moduleExport = (require)(module) - - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - - return root -end - -return useModule diff --git a/dist/pesde/roblox/roots/src/methods/use-modules.luau b/dist/pesde/roblox/roots/src/methods/use-modules.luau deleted file mode 100644 index 8354a9d0..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-modules.luau +++ /dev/null @@ -1,28 +0,0 @@ -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, modules: { Instance }, predicate: ((module: ModuleScript) -> boolean)?) - for _, module in modules do - if not module:IsA("ModuleScript") or predicate and not predicate(module) then - continue - end - - local moduleExport = (require)(module) - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - end - - return root -end - -return useModules diff --git a/dist/pesde/roblox/roots/src/methods/use-provider.luau b/dist/pesde/roblox/roots/src/methods/use-provider.luau deleted file mode 100644 index 277d8049..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-provider.luau +++ /dev/null @@ -1,14 +0,0 @@ -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) - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - return root -end - -return useProvider diff --git a/dist/pesde/roblox/roots/src/methods/use-providers.luau b/dist/pesde/roblox/roots/src/methods/use-providers.luau deleted file mode 100644 index 1489c3a3..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-providers.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 }) - for _, provider in providers do - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - end - return root -end - -return useProviders diff --git a/dist/pesde/roblox/roots/src/methods/use-root.luau b/dist/pesde/roblox/roots/src/methods/use-root.luau deleted file mode 100644 index efc4ad1e..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-root.luau +++ /dev/null @@ -1,13 +0,0 @@ -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) - return root -end - -return useRoot diff --git a/dist/pesde/roblox/roots/src/methods/use-roots.luau b/dist/pesde/roblox/roots/src/methods/use-roots.luau deleted file mode 100644 index 7b5b9dda..00000000 --- a/dist/pesde/roblox/roots/src/methods/use-roots.luau +++ /dev/null @@ -1,15 +0,0 @@ -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.spawnCallbacks(rootUsed, root, subRoot) - end - return root -end - -return useRoots diff --git a/dist/pesde/roblox/roots/src/methods/will-finish.luau b/dist/pesde/roblox/roots/src/methods/will-finish.luau deleted file mode 100644 index 893088f4..00000000 --- a/dist/pesde/roblox/roots/src/methods/will-finish.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willFinish(root: types.Self, callback: () -> ()) - root._finish:register(callback) - return root -end - -return willFinish diff --git a/dist/pesde/roblox/roots/src/methods/will-start.luau b/dist/pesde/roblox/roots/src/methods/will-start.luau deleted file mode 100644 index 7c3d88c3..00000000 --- a/dist/pesde/roblox/roots/src/methods/will-start.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willStart(root: types.Self, callback: () -> ()) - root._start:register(callback) - return root -end - -return willStart diff --git a/dist/pesde/roblox/roots/src/types.luau b/dist/pesde/roblox/roots/src/types.luau deleted file mode 100644 index 104143c4..00000000 --- a/dist/pesde/roblox/roots/src/types.luau +++ /dev/null @@ -1,40 +0,0 @@ -local lifecycles = require("../lifecycles") -local providers = require("../providers") - -type Set = { [T]: true } - -export type Root = { - type: "Root", - - start: (root: Root) -> StartedRoot, - - useModule: (root: Root, module: ModuleScript) -> Root, - useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useRoot: (root: Root, root: Root) -> Root, - useRoots: (root: Root, roots: { Root }) -> Root, - useProvider: (root: Root, provider: providers.Provider) -> Root, - useProviders: (root: Root, providers: { providers.Provider }) -> Root, - useLifecycle: (root: Root, lifecycle: lifecycles.Lifecycle) -> Root, - useLifecycles: (root: Root, lifecycles: { lifecycles.Lifecycle }) -> Root, - destroy: (root: Root) -> (), - - willStart: (callback: () -> ()) -> Root, - willFinish: (callback: () -> ()) -> Root, -} - -export type StartedRoot = { - type: "StartedRoot", - - finish: (root: StartedRoot) -> (), -} - -export type Self = Root & { - _destroyed: boolean, - _rootProviders: Set>, - _rootLifecycles: { lifecycles.Lifecycle }, - _subRoots: Set, - _start: lifecycles.Lifecycle<()>, - _finish: lifecycles.Lifecycle<()>, -} - -return nil diff --git a/dist/pesde/roblox/runtime/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/runtime/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/runtime/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/runtime/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/runtime/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/runtime/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/runtime/LICENSE.md b/dist/pesde/roblox/runtime/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/runtime/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/runtime/pesde.toml b/dist/pesde/roblox/runtime/pesde.toml deleted file mode 100644 index b4cfc6ad..00000000 --- a/dist/pesde/roblox/runtime/pesde.toml +++ /dev/null @@ -1,30 +0,0 @@ -authors = ["Fire "] -description = "Runtime agnostic libraries for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/runtime" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "roblox" -lib = "src/init.luau" -[dependencies] - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/runtime/src/batteries/threadpool.luau b/dist/pesde/roblox/runtime/src/batteries/threadpool.luau deleted file mode 100644 index 6caf08b4..00000000 --- a/dist/pesde/roblox/runtime/src/batteries/threadpool.luau +++ /dev/null @@ -1,38 +0,0 @@ -local task = require("../libs/task") - -local freeThreads: { thread } = {} - -local function run(f: (T...) -> (), thread: thread, ...) - f(...) - table.insert(freeThreads, thread) -end - -local function yielder() - while true do - run(coroutine.yield()) - end -end - -local function spawn(f: (T...) -> (), ...: T...) - local thread - if #freeThreads > 0 then - thread = freeThreads[#freeThreads] - freeThreads[#freeThreads] = nil - else - thread = coroutine.create(yielder) - coroutine.resume(thread) - end - - task.spawn(thread, f, thread, ...) -end - -local function spawnCallbacks(callbacks: { (Args...) -> () }, ...: Args...) - for _, callback in callbacks do - spawn(callback, ...) - end -end - -return table.freeze({ - spawn = spawn, - spawnCallbacks = spawnCallbacks, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/init.luau b/dist/pesde/roblox/runtime/src/implementations/init.luau deleted file mode 100644 index 28dbe015..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/init.luau +++ /dev/null @@ -1,56 +0,0 @@ -local types = require("@self/../types") - -type Implementation = { 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/lune"), - lute = require("@self/lute"), - seal = require("@self/seal"), - zune = require("@self/zune"), -}) - -local currentRuntime: types.Runtime = nil -do - for _, runtime in supportedRuntimes :: { [string]: types.Runtime } do - local isRuntime = runtime.is() - if isRuntime then - local currentRuntimePriority = currentRuntime and currentRuntime.priority or 0 - local runtimePriority = runtime.priority or 0 - if currentRuntimePriority <= runtimePriority then - currentRuntime = runtime - end - end - end - assert(currentRuntime, "No supported runtime") -end - -local currentRuntimeName: RuntimeName = currentRuntime.name :: any - -local function notImplemented(functionName: string) - return function() - error(`'{functionName}' is not implemented by runtime '{currentRuntimeName}'`, 2) - end -end - -local function implementFunction(label: string, implementations: { [types.Runtime]: Implementation? }): T - local implementation = implementations[currentRuntime] - if implementation then - if implementation.new then - return implementation.new() - elseif implementation.implementation then - return implementation.implementation - end - end - return notImplemented(label) :: any -end - -return table.freeze({ - supportedRuntimes = supportedRuntimes, - currentRuntime = currentRuntime, - currentRuntimeName = currentRuntimeName, - implementFunction = implementFunction, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/init.spec.luau b/dist/pesde/roblox/runtime/src/implementations/init.spec.luau deleted file mode 100644 index 3ce91cbb..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/init.spec.luau +++ /dev/null @@ -1,81 +0,0 @@ -local implementations = require("@self/../implementations") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("currentRuntime", function() - test("detects lune runtime", function() - expect(implementations.currentRuntimeName).is("lune") - expect(implementations.currentRuntime).is(implementations.supportedRuntimes.lune) - end) - end) - - describe("implementFunction", function() - test("implements for lune runtime", function() - local lune = function() end - local luau = function() end - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - implementation = lune, - }, - [implementations.supportedRuntimes.luau] = { - implementation = luau, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - end) - - test("constructs for lune runtime", function() - local lune = function() end - local luau = function() end - - local constructedLune = false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - new = function() - constructedLune = true - return lune - end, - }, - [implementations.supportedRuntimes.luau] = { - new = function() - return luau - end, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - expect(constructedLune).is_true() - end) - - test("defaults to not implemented function", function() - local constructSuccess, runSuccess = false, false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.roblox] = { - new = function() - constructSuccess = true - return function() - runSuccess = true - end - end, - }, - }) - - expect(constructSuccess).is(false) - expect(implementation).is_a("function") - expect(implementation).fails_with("'implementation' is not implemented by runtime 'lune'") - expect(runSuccess).is(false) - end) - end) -end diff --git a/dist/pesde/roblox/runtime/src/implementations/luau.luau b/dist/pesde/roblox/runtime/src/implementations/luau.luau deleted file mode 100644 index c67e52f4..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/luau.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "luau", - priority = -1, - is = function() - return true - end, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/lune.luau b/dist/pesde/roblox/runtime/src/implementations/lune.luau deleted file mode 100644 index f49834eb..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/lune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/lute.luau b/dist/pesde/roblox/runtime/src/implementations/lute.luau deleted file mode 100644 index 7b6abc58..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/lute.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "lute", - is = function() - return false - end, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/roblox.luau b/dist/pesde/roblox/runtime/src/implementations/roblox.luau deleted file mode 100644 index 91a780e2..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/roblox.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "roblox", - is = function() - -- wtf - return not not (_VERSION == "Luau" and game and workspace) - end, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/seal.luau b/dist/pesde/roblox/runtime/src/implementations/seal.luau deleted file mode 100644 index 0a72684c..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/seal.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "seal", - is = function() - return false - end, -}) diff --git a/dist/pesde/roblox/runtime/src/implementations/zune.luau b/dist/pesde/roblox/runtime/src/implementations/zune.luau deleted file mode 100644 index 48243e05..00000000 --- a/dist/pesde/roblox/runtime/src/implementations/zune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/pesde/roblox/runtime/src/index.d.ts b/dist/pesde/roblox/runtime/src/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/dist/pesde/roblox/runtime/src/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/dist/pesde/roblox/runtime/src/init.luau b/dist/pesde/roblox/runtime/src/init.luau deleted file mode 100644 index 26bdeee0..00000000 --- a/dist/pesde/roblox/runtime/src/init.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - - task = task, - warn = warn, - - threadpool = threadpool, -}) diff --git a/dist/pesde/roblox/runtime/src/libs/task.luau b/dist/pesde/roblox/runtime/src/libs/task.luau deleted file mode 100644 index 28c1ac9e..00000000 --- a/dist/pesde/roblox/runtime/src/libs/task.luau +++ /dev/null @@ -1,157 +0,0 @@ -local implementations = require("../implementations") - -export type TaskLib = { - cancel: (thread) -> (), - defer: (functionOrThread: thread | (T...) -> (), T...) -> thread, - delay: (duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread, - spawn: (functionOrThread: thread | (T...) -> (), T...) -> thread, - wait: (duration: number?) -> number, -} - -local supportedRuntimes = implementations.supportedRuntimes -local implementFunction = implementations.implementFunction - -local function defaultSpawn(functionOrThread: thread | (T...) -> (), ...: T...): thread - if type(functionOrThread) == "thread" then - coroutine.resume(functionOrThread, ...) - return functionOrThread - else - local thread = coroutine.create(functionOrThread) - coroutine.resume(thread, ...) - return thread - end -end - -local function defaultWait(seconds: number?) - local startTime = os.clock() - local endTime = startTime + (seconds or 1) - local clockTime: number - repeat - clockTime = os.clock() - until clockTime >= endTime - return clockTime - startTime -end - -local task: TaskLib = table.freeze({ - cancel = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.cancel - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").cancel - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").cancel - end, - }, - [supportedRuntimes.luau] = { - implementation = function(thread) - if not coroutine.close(thread) then - error(debug.traceback(thread, "Could not cancel thread")) - end - end, - }, - }), - defer = implementFunction("task.defer", { - [supportedRuntimes.roblox] = { - new = function() - return task.defer :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").defer - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").defer - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - delay = implementFunction("task.delay", { - [supportedRuntimes.roblox] = { - new = function() - return task.delay :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").delay - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").delay - end, - }, - [supportedRuntimes.luau] = { - implementation = function(duration: number, functionOrThread: thread | (T...) -> (), ...: T...): thread - return defaultSpawn( - if typeof(functionOrThread) == "function" - then function(duration, functionOrThread, ...) - defaultWait(duration) - functionOrThread(...) - end - else function(duration, functionOrThread, ...) - defaultWait(duration) - coroutine.resume(...) - end, - duration, - functionOrThread, - ... - ) - end, - }, - }), - spawn = implementFunction("task.spawn", { - [supportedRuntimes.roblox] = { - new = function() - return task.spawn :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").spawn - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").spawn - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - wait = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.wait - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").wait - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").wait - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultWait, - }, - }), -}) - -return task diff --git a/dist/pesde/roblox/runtime/src/libs/task.spec.luau b/dist/pesde/roblox/runtime/src/libs/task.spec.luau deleted file mode 100644 index 0918e87f..00000000 --- a/dist/pesde/roblox/runtime/src/libs/task.spec.luau +++ /dev/null @@ -1,62 +0,0 @@ -local luneTask = require("@lune/task") -local task = require("./task") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - --- FIXME: can't async stuff lol -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("task", function() - test("spawn", function() - expect(task.spawn).is(luneTask.spawn) - local spawned = false - - task.spawn(function() - spawned = true - end) - - expect(spawned).is_true() - end) - - test("defer", function() - expect(task.defer).is(luneTask.defer) - - -- local spawned = false - - -- task.defer(function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - end) - - test("delay", function() - expect(task.delay).is(luneTask.delay) - -- local spawned = false - - -- task.delay(0.25, function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - - -- local startTime = os.clock() - -- repeat - -- until os.clock() - startTime > 0.5 - - -- print(spawned) - - -- expect(spawned).is_true() - end) - - test("wait", function() - expect(task.wait).is(luneTask.wait) - end) - - test("cancel", function() - expect(task.cancel).is(luneTask.cancel) - end) - end) -end diff --git a/dist/pesde/roblox/runtime/src/libs/warn.luau b/dist/pesde/roblox/runtime/src/libs/warn.luau deleted file mode 100644 index 6a4837ac..00000000 --- a/dist/pesde/roblox/runtime/src/libs/warn.luau +++ /dev/null @@ -1,27 +0,0 @@ -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(index, ...))) - end - return table.concat(stringified, " ") -end - -local warn: (T...) -> () = implementFunction("warn", { - [supportedRuntimes.roblox] = { - new = function() - return warn - end, - }, - [supportedRuntimes.luau] = { - implementation = function(...: T...) - print(`\27[0;33m{tostringTuple(...)}\27[0m`) - end, - }, -}) - -return warn diff --git a/dist/pesde/roblox/runtime/src/types.luau b/dist/pesde/roblox/runtime/src/types.luau deleted file mode 100644 index ca050fce..00000000 --- a/dist/pesde/roblox/runtime/src/types.luau +++ /dev/null @@ -1,13 +0,0 @@ -export type Runtime = { - name: string, - priority: number?, - is: () -> boolean, -} - -local function Runtime(x: Runtime) - return table.freeze(x) -end - -return table.freeze({ - Runtime = Runtime, -}) diff --git a/dist/pesde/roblox/typecheckers/.pesde/scripts/roblox_sync_config_generator.luau b/dist/pesde/roblox/typecheckers/.pesde/scripts/roblox_sync_config_generator.luau deleted file mode 100644 index 8aa75020..00000000 --- a/dist/pesde/roblox/typecheckers/.pesde/scripts/roblox_sync_config_generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/roblox_sync_config_generator") diff --git a/dist/pesde/roblox/typecheckers/.pesde/scripts/sourcemap-generator.luau b/dist/pesde/roblox/typecheckers/.pesde/scripts/sourcemap-generator.luau deleted file mode 100644 index ba9144a3..00000000 --- a/dist/pesde/roblox/typecheckers/.pesde/scripts/sourcemap-generator.luau +++ /dev/null @@ -1 +0,0 @@ -return (require)("./../../lune_packages/.pesde/pesde+scripts_rojo/0.1.0/scripts_rojo/sourcemap_generator") diff --git a/dist/pesde/roblox/typecheckers/LICENSE.md b/dist/pesde/roblox/typecheckers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/pesde/roblox/typecheckers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/pesde/roblox/typecheckers/pesde.toml b/dist/pesde/roblox/typecheckers/pesde.toml deleted file mode 100644 index 83bc60a1..00000000 --- a/dist/pesde/roblox/typecheckers/pesde.toml +++ /dev/null @@ -1,30 +0,0 @@ -authors = ["Fire "] -description = "Typechecking primitives and compatibility for Prvd 'M Wrong" -includes = [ - "src/**/*.luau", - "LICENSE.md", - "README.md", - "pesde.toml", -] -license = "MPL-2.0" -name = "prvdmwrong/typecheckers" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[indices] -default = "https://github.com/pesde-pkg/index" - -[target] -build_files = ["src"] -environment = "roblox" -lib = "src/init.luau" -[dependencies] - - [scripts] - roblox_sync_config_generator = ".pesde/scripts/roblox_sync_config_generator.luau" - sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau" - - [dev_dependencies] - scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" } - rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" } - \ No newline at end of file diff --git a/dist/pesde/roblox/typecheckers/src/init.luau b/dist/pesde/roblox/typecheckers/src/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/dist/wally/dependencies/LICENSE.md b/dist/wally/dependencies/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/dependencies/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/dependencies/Wally.toml b/dist/wally/dependencies/Wally.toml deleted file mode 100644 index 88dc8fb1..00000000 --- a/dist/wally/dependencies/Wally.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -authors = ["Fire "] -description = "Dependency resolution logic for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/dependencies" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -lifecycles = "prvdmwrong/lifecycles@0.2.0-rc.4" -logger = "prvdmwrong/logger@0.2.0-rc.4" diff --git a/dist/wally/dependencies/lifecycles.luau b/dist/wally/dependencies/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/wally/dependencies/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/wally/dependencies/logger.luau b/dist/wally/dependencies/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/wally/dependencies/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/wally/dependencies/src/depend.luau b/dist/wally/dependencies/src/depend.luau deleted file mode 100644 index 55230b4e..00000000 --- a/dist/wally/dependencies/src/depend.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 locked.", - __index = useBeforeConstructed, - __newindex = useBeforeConstructed, -} - -function unresolvedMt:__tostring() - return "UnresolvedDependency" -end - --- Wtf luau -local function depend(dependency: types.Dependency): typeof(({} :: types.Dependency).new( - (nil :: any) :: Dependencies, - ... -)) - -- Return a mock value that will be resolved during dependency resolution. - return setmetatable({ - type = "UnresolvedDependency", - dependency = dependency, - }, unresolvedMt) :: any -end - -return depend diff --git a/dist/wally/dependencies/src/index.d.ts b/dist/wally/dependencies/src/index.d.ts deleted file mode 100644 index a5bddcde..00000000 --- a/dist/wally/dependencies/src/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Lifecycle } from "../lifecycles"; - -declare namespace dependencies { - export type Dependency = Self & { - dependencies: Dependencies, - priority?: number, - new(dependencies: Dependencies, ...args: NewArgs): Dependency; - }; - - interface ProccessDependencyResult { - sortedDependencies: Dependency[]; - lifecycles: Lifecycle[]; - } - - export type SubdependenciesOf = T extends { dependencies: infer Dependencies } - ? Dependencies - : never; - - export function depend InstanceType>(dependency: T): InstanceType; - export function processDependencies(dependencies: Set>): ProccessDependencyResult; - export function sortByPriority(dependencies: Dependency[]): void; -} - -export = dependencies; -export as namespace dependencies; diff --git a/dist/wally/dependencies/src/init.luau b/dist/wally/dependencies/src/init.luau deleted file mode 100644 index e6b27b24..00000000 --- a/dist/wally/dependencies/src/init.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 = types.Dependency - -return table.freeze({ - depend = depend, - processDependencies = processDependencies, - sortByPriority = sortByPriority, -}) diff --git a/dist/wally/dependencies/src/logger.luau b/dist/wally/dependencies/src/logger.luau deleted file mode 100644 index 22f3b307..00000000 --- a/dist/wally/dependencies/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", - alreadyFinished = "Root has already finished.", -}) diff --git a/dist/wally/dependencies/src/process-dependencies.luau b/dist/wally/dependencies/src/process-dependencies.luau deleted file mode 100644 index 20820a35..00000000 --- a/dist/wally/dependencies/src/process-dependencies.luau +++ /dev/null @@ -1,57 +0,0 @@ -local lifecycles = require("../lifecycles") -local types = require("./types") - -export type ProccessDependencyResult = { - sortedDependencies: { types.Dependency }, - lifecycles: { lifecycles.Lifecycle }, -} - -type Set = { [T]: true } - -local function processDependencies(dependencies: Set>): ProccessDependencyResult - local sortedDependencies = {} - local lifecycles = {} - - -- TODO: optimize ts - local function visitDependency(dependency: types.Dependency) - -- print("Visiting dependency", dependency) - - for key, value in dependency :: any do - if key == "dependencies" then - -- print("Checking [prvd.dependencies]") - if typeof(value) == "table" then - for key, value in value do - -- print("Checking key", key, "value", value) - if typeof(value) == "table" and value.type == "UnresolvedDependency" then - local unresolved: types.UnresolvedDependency = value - -- print("Got unresolved dependency", unresolved.dependency, "visiting") - visitDependency(unresolved.dependency) - end - end - end - - continue - end - - if typeof(value) == "table" and value.type == "Lifecycle" and not table.find(lifecycles, value) then - table.insert(lifecycles, value) - end - end - - if dependencies[dependency] and not table.find(sortedDependencies, dependency) then - -- print("Pushing to sort") - table.insert(sortedDependencies, dependency) - end - end - - for dependency in dependencies do - visitDependency(dependency) - end - - return { - sortedDependencies = sortedDependencies, - lifecycles = lifecycles, - } -end - -return processDependencies diff --git a/dist/wally/dependencies/src/process-dependencies.spec.luau b/dist/wally/dependencies/src/process-dependencies.spec.luau deleted file mode 100644 index 0fcfcac8..00000000 --- a/dist/wally/dependencies/src/process-dependencies.spec.luau +++ /dev/null @@ -1,67 +0,0 @@ -local depend = require("./depend") -local processDependencies = require("./process-dependencies") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -local function nickname(name: string) - return function(tbl: T): T - return setmetatable(tbl :: any, { - __tostring = function() - return name - end, - }) - end -end - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("processDependencies", function() - test("sortedDependencies", function() - local first = nickname("first")({}) - - local second = nickname("second")({ - dependencies = { - toFirst = depend(first :: any), - toFirstAgain = depend(first :: any), - }, - }) - - local third = nickname("third")({ - dependencies = { - toSecond = depend(second :: any), - }, - }) - - local fourth = nickname("fourth")({ - dependencies = { - toFirst = depend(first :: any), - toSecond = depend(second :: any), - toThird = depend(third :: any), - }, - }) - - local processed = processDependencies({ - [first] = true, - [second] = true, - [third] = true, - [fourth] = true, - } :: any) - - expect(typeof(processed)).is("table") - expect(processed).has_key("sortedDependencies") - expect(typeof(processed.sortedDependencies)).is("table") - - local sortedDependencies = processed.sortedDependencies - - expect(typeof(sortedDependencies)).is("table") - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - expect(sortedDependencies[4]).is(fourth) - end) - - test("lifecycles", function() end) - end) -end diff --git a/dist/wally/dependencies/src/sort-by-priority.luau b/dist/wally/dependencies/src/sort-by-priority.luau deleted file mode 100644 index 638468ab..00000000 --- a/dist/wally/dependencies/src/sort-by-priority.luau +++ /dev/null @@ -1,14 +0,0 @@ -local types = require("./types") - -local function sortByPriority(dependencies: { types.Dependency }) - 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) - local rightIndex = table.find(dependencies, right) - return leftIndex < rightIndex - end) -end - -return sortByPriority diff --git a/dist/wally/dependencies/src/sort-by-priority.spec.luau b/dist/wally/dependencies/src/sort-by-priority.spec.luau deleted file mode 100644 index eeb34933..00000000 --- a/dist/wally/dependencies/src/sort-by-priority.spec.luau +++ /dev/null @@ -1,52 +0,0 @@ -local sortByPriority = require("./sort-by-priority") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("sortByPriority", function() - test("dependencies", function() - local first = {} - - local second = { - toFirst = first, - } - - local third = { - toSecond = second, - } - - local sortedDependencies = { - first, - second, - third, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(first) - expect(sortedDependencies[2]).is(second) - expect(sortedDependencies[3]).is(third) - end) - - test("priority", function() - local low = {} - - local high = { - priority = 500, - } - - local sortedDependencies = { - low, - high, - } - - sortByPriority(sortedDependencies :: any) - - expect(sortedDependencies[1]).is(high) - expect(sortedDependencies[2]).is(low) - end) - end) -end diff --git a/dist/wally/dependencies/src/types.luau b/dist/wally/dependencies/src/types.luau deleted file mode 100644 index 2b1c72aa..00000000 --- a/dist/wally/dependencies/src/types.luau +++ /dev/null @@ -1,14 +0,0 @@ -export type Dependency = Self & { - dependencies: Dependencies, - priority: number?, - new: (dependencies: Dependencies, NewArgs...) -> Dependency, -} - -export type UnresolvedDependency = { - type: "UnresolvedDependency", - dependency: Dependency, -} - -export type dependencies = { __prvdmwrong_dependencies: never } - -return nil diff --git a/dist/wally/lifecycles/LICENSE.md b/dist/wally/lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/lifecycles/Wally.toml b/dist/wally/lifecycles/Wally.toml deleted file mode 100644 index 9a305d68..00000000 --- a/dist/wally/lifecycles/Wally.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -authors = ["Fire "] -description = "Provider method lifecycles implementation for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/lifecycles" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -logger = "prvdmwrong/logger@0.2.0-rc.4" -runtime = "prvdmwrong/runtime@0.2.0-rc.4" diff --git a/dist/wally/lifecycles/logger.luau b/dist/wally/lifecycles/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/wally/lifecycles/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/wally/lifecycles/runtime.luau b/dist/wally/lifecycles/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/wally/lifecycles/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/wally/lifecycles/src/create.luau b/dist/wally/lifecycles/src/create.luau deleted file mode 100644 index 6cdd2891..00000000 --- a/dist/wally/lifecycles/src/create.luau +++ /dev/null @@ -1,45 +0,0 @@ -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") -local onUnregistered = require("./methods/on-unregistered") -local register = require("./methods/register") -local types = require("./types") -local unregister = require("./methods/unregister") - -local function create( - method: string, - onFire: (lifecycle: types.Lifecycle, Args...) -> () -): types.Lifecycle - local self: types.Self = { - _isDestroyed = false, - _selfRegistered = {}, - _selfUnregistered = {}, - - type = "Lifecycle", - callbacks = {}, - - fire = onFire, - method = method, - register = register, - unregister = unregister, - clear = clear, - onRegistered = onRegistered, - onUnregistered = onUnregistered, - await = await, - destroy = destroy, - } :: any - - methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) - - for _, onLifecycleConstructed in lifecycleConstructed.callbacks do - onLifecycleConstructed(self :: types.Lifecycle) - end - - return self -end - -return create diff --git a/dist/wally/lifecycles/src/handlers/fire-concurrent.luau b/dist/wally/lifecycles/src/handlers/fire-concurrent.luau deleted file mode 100644 index f279b888..00000000 --- a/dist/wally/lifecycles/src/handlers/fire-concurrent.luau +++ /dev/null @@ -1,10 +0,0 @@ -local runtime = require("../../runtime") -local types = require("../types") - -local function fireConcurrent(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - runtime.threadpool.spawn(callback, ...) - end -end - -return fireConcurrent diff --git a/dist/wally/lifecycles/src/handlers/fire-sequential.luau b/dist/wally/lifecycles/src/handlers/fire-sequential.luau deleted file mode 100644 index 80911ad9..00000000 --- a/dist/wally/lifecycles/src/handlers/fire-sequential.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -local function fireSequential(lifecycle: types.Lifecycle, ...: Args...) - for _, callback in lifecycle.callbacks do - callback(...) - end -end - -return fireSequential diff --git a/dist/wally/lifecycles/src/hooks/lifecycle-constructed.luau b/dist/wally/lifecycles/src/hooks/lifecycle-constructed.luau deleted file mode 100644 index 8ea4d81b..00000000 --- a/dist/wally/lifecycles/src/hooks/lifecycle-constructed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleConstructed = onLifecycleConstructed, -}) diff --git a/dist/wally/lifecycles/src/hooks/lifecycle-destroyed.luau b/dist/wally/lifecycles/src/hooks/lifecycle-destroyed.luau deleted file mode 100644 index 47abcfab..00000000 --- a/dist/wally/lifecycles/src/hooks/lifecycle-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 table.freeze({ - callbacks = callbacks, - onLifecycleDestroyed = onLifecycleDestroyed, -}) diff --git a/dist/wally/lifecycles/src/hooks/lifecycle-registered.luau b/dist/wally/lifecycles/src/hooks/lifecycle-registered.luau deleted file mode 100644 index fab588a3..00000000 --- a/dist/wally/lifecycles/src/hooks/lifecycle-registered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleRegistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleRegistered = onLifecycleRegistered, -}) diff --git a/dist/wally/lifecycles/src/hooks/lifecycle-unregistered.luau b/dist/wally/lifecycles/src/hooks/lifecycle-unregistered.luau deleted file mode 100644 index 0ec81756..00000000 --- a/dist/wally/lifecycles/src/hooks/lifecycle-unregistered.luau +++ /dev/null @@ -1,20 +0,0 @@ -local types = require("../types") - -local callbacks: { (lifecycle: types.Lifecycle, callback: (...unknown) -> ()) -> () } = {} - -local function onLifecycleUnregistered( - listener: ( - lifecycle: types.Lifecycle, - callback: (Args...) -> () - ) -> () -): () -> () - table.insert(callbacks, listener :: any) - return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUnregistered = onLifecycleUnregistered, -}) diff --git a/dist/wally/lifecycles/src/index.d.ts b/dist/wally/lifecycles/src/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/dist/wally/lifecycles/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/dist/wally/lifecycles/src/init.luau b/dist/wally/lifecycles/src/init.luau deleted file mode 100644 index dbec091b..00000000 --- a/dist/wally/lifecycles/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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 lifecycleRegistered = require("@self/hooks/lifecycle-registered") -local lifecycleUnregistered = require("@self/hooks/lifecycle-unregistered") -local methodToLifecycles = require("@self/method-to-lifecycles") -local types = require("@self/types") - -export type Lifecycle = types.Lifecycle - -return table.freeze({ - create = create, - handlers = table.freeze({ - fireConcurrent = fireConcurrent, - fireSequential = fireSequential, - }), - hooks = table.freeze({ - onLifecycleRegistered = lifecycleRegistered.onLifecycleRegistered, - onLifecycleUnregistered = lifecycleUnregistered.onLifecycleUnregistered, - onLifecycleConstructed = lifecycleConstructed.onLifecycleConstructed, - onLifecycleDestroyed = lifecycleDestroyed.onLifecycleDestroyed, - }), - _ = table.freeze({ - methodToLifecycles = methodToLifecycles, - }), -}) diff --git a/dist/wally/lifecycles/src/logger.luau b/dist/wally/lifecycles/src/logger.luau deleted file mode 100644 index 3ae7c27e..00000000 --- a/dist/wally/lifecycles/src/logger.luau +++ /dev/null @@ -1,6 +0,0 @@ -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.", -}) diff --git a/dist/wally/lifecycles/src/method-to-lifecycles.luau b/dist/wally/lifecycles/src/method-to-lifecycles.luau deleted file mode 100644 index 386a8756..00000000 --- a/dist/wally/lifecycles/src/method-to-lifecycles.luau +++ /dev/null @@ -1,5 +0,0 @@ -local types = require("./types") - -local methodToLifecycles: { [string]: { types.Lifecycle } } = {} - -return methodToLifecycles diff --git a/dist/wally/lifecycles/src/methods/await.luau b/dist/wally/lifecycles/src/methods/await.luau deleted file mode 100644 index ed8299d6..00000000 --- a/dist/wally/lifecycles/src/methods/await.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function await(lifecycle: types.Self): Args... - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local currentThread = coroutine.running() - local function callback(...: Args...) - lifecycle:unregister(callback) - coroutine.resume(currentThread, ...) - end - lifecycle:register(callback) - return coroutine.yield() -end - -return await diff --git a/dist/wally/lifecycles/src/methods/destroy.luau b/dist/wally/lifecycles/src/methods/destroy.luau deleted file mode 100644 index d9d5d6cc..00000000 --- a/dist/wally/lifecycles/src/methods/destroy.luau +++ /dev/null @@ -1,18 +0,0 @@ -local lifecycleDestroyed = require("../hooks/lifecycle-destroyed") -local logger = require("../logger") -local methodToLifecycles = require("../method-to-lifecycles") -local types = require("../types") - -local function destroy(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.alreadyDestroyed }) - end - table.remove(methodToLifecycles[lifecycle.method], table.find(methodToLifecycles[lifecycle.method], lifecycle)) - table.clear(lifecycle.callbacks) - for _, callback in lifecycleDestroyed.callbacks do - callback(lifecycle) - end - lifecycle._isDestroyed = true -end - -return destroy diff --git a/dist/wally/lifecycles/src/methods/on-registered.luau b/dist/wally/lifecycles/src/methods/on-registered.luau deleted file mode 100644 index 7ddb009a..00000000 --- a/dist/wally/lifecycles/src/methods/on-registered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onRegistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end - table.insert(lifecycle._selfRegistered, listener) - return function() - table.remove(lifecycle._selfRegistered, table.find(lifecycle._selfRegistered, listener)) - end -end - -return onRegistered diff --git a/dist/wally/lifecycles/src/methods/on-unregistered.luau b/dist/wally/lifecycles/src/methods/on-unregistered.luau deleted file mode 100644 index 842040ec..00000000 --- a/dist/wally/lifecycles/src/methods/on-unregistered.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local types = require("../types") - -local function onUnregistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end - table.insert(lifecycle._selfUnregistered, listener) - return function() - table.remove(lifecycle._selfUnregistered, table.find(lifecycle._selfUnregistered, listener)) - end -end - -return onUnregistered diff --git a/dist/wally/lifecycles/src/methods/register.luau b/dist/wally/lifecycles/src/methods/register.luau deleted file mode 100644 index 3fd74d56..00000000 --- a/dist/wally/lifecycles/src/methods/register.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function register(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - if _G.PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS then - table.remove(lifecycle.callbacks, table.find(lifecycle.callbacks, callback)) - end - table.insert(lifecycle.callbacks, callback) - threadpool.spawnCallbacks(lifecycle._selfRegistered, callback) -end - -return register diff --git a/dist/wally/lifecycles/src/methods/unregister-all.luau b/dist/wally/lifecycles/src/methods/unregister-all.luau deleted file mode 100644 index 5e6235af..00000000 --- a/dist/wally/lifecycles/src/methods/unregister-all.luau +++ /dev/null @@ -1,17 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function clear(lifecycle: types.Self) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - for _, callback in lifecycle.callbacks do - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end - table.clear(lifecycle.callbacks) -end - -return clear diff --git a/dist/wally/lifecycles/src/methods/unregister.luau b/dist/wally/lifecycles/src/methods/unregister.luau deleted file mode 100644 index 0ca7223f..00000000 --- a/dist/wally/lifecycles/src/methods/unregister.luau +++ /dev/null @@ -1,18 +0,0 @@ -local logger = require("../logger") -local runtime = require("../../runtime") -local types = require("../types") - -local threadpool = runtime.threadpool - -local function unregister(lifecycle: types.Self, callback: (Args...) -> ()) - if lifecycle._isDestroyed then - logger:fatalError({ template = logger.useAfterDestroy }) - end - local index = table.find(lifecycle.callbacks, callback) - if index then - table.remove(lifecycle.callbacks, index) - threadpool.spawnCallbacks(lifecycle._selfUnregistered, callback) - end -end - -return unregister diff --git a/dist/wally/lifecycles/src/types.luau b/dist/wally/lifecycles/src/types.luau deleted file mode 100644 index f2931b52..00000000 --- a/dist/wally/lifecycles/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -export type Lifecycle = { - type: "Lifecycle", - - callbacks: { (Args...) -> () }, - method: string, - - register: (self: Lifecycle, callback: (Args...) -> ()) -> (), - fire: (self: Lifecycle, Args...) -> (), - unregister: (self: Lifecycle, callback: (Args...) -> ()) -> (), - clear: (self: Lifecycle) -> (), - onRegistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - onUnregistered: (self: Lifecycle, listener: (callback: (Args...) -> ()) -> ()) -> () -> (), - await: (self: Lifecycle) -> Args..., - destroy: (self: Lifecycle) -> (), -} - -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - -return nil diff --git a/dist/wally/logger/LICENSE.md b/dist/wally/logger/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/logger/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/logger/Wally.toml b/dist/wally/logger/Wally.toml deleted file mode 100644 index 15b4cdc3..00000000 --- a/dist/wally/logger/Wally.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -authors = ["Fire "] -description = "Logging for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/logger" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -runtime = "prvdmwrong/runtime@0.2.0-rc.4" diff --git a/dist/wally/logger/runtime.luau b/dist/wally/logger/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/wally/logger/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/wally/logger/src/allow-web-links.luau b/dist/wally/logger/src/allow-web-links.luau deleted file mode 100644 index dcd0bb82..00000000 --- a/dist/wally/logger/src/allow-web-links.luau +++ /dev/null @@ -1,5 +0,0 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks diff --git a/dist/wally/logger/src/create.luau b/dist/wally/logger/src/create.luau deleted file mode 100644 index 943aab25..00000000 --- a/dist/wally/logger/src/create.luau +++ /dev/null @@ -1,32 +0,0 @@ -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(label: string, errorInfoUrl: string?, templates: T): types.Logger - local self = {} :: types.Logger - self.type = "Logger" - - label = `[{label}] ` - errorInfoUrl = if allowWebLinks then errorInfoUrl else nil - - function self:warn(log) - warn(label .. formatLog(self, log, errorInfoUrl)) - end - - function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) - end - - function self:fatalError(log) - error(label .. formatLog(self, log, errorInfoUrl)) - end - - setmetatable(self :: any, { __index = templates }) - return self -end - -return create diff --git a/dist/wally/logger/src/format-log.luau b/dist/wally/logger/src/format-log.luau deleted file mode 100644 index 3eeda21b..00000000 --- a/dist/wally/logger/src/format-log.luau +++ /dev/null @@ -1,43 +0,0 @@ -local types = require("./types") - -local function formatLog(self: types.Logger, 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 - formattedTemplate = string.gsub(formattedTemplate, "ERROR_MESSAGE", error.message) - end - - local id: string? - - -- TODO: find a better way to do ts while still being ergonomic - for templateKey, template in (self :: any) :: { [string]: string } do - if template == log.template then - id = templateKey - break - end - end - - if id then - formattedTemplate ..= `\nID: {id}` - end - - if errorInfoUrl then - formattedTemplate ..= `\nLearn more: {errorInfoUrl}` - if id then - formattedTemplate ..= `#{string.lower(id)}` - end - end - - if trace then - formattedTemplate ..= `\n---- Stack trace ----\n{trace}` - end - - -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") -end - -return formatLog diff --git a/dist/wally/logger/src/index.d.ts b/dist/wally/logger/src/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/dist/wally/logger/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/dist/wally/logger/src/init.luau b/dist/wally/logger/src/init.luau deleted file mode 100644 index 52760a5d..00000000 --- a/dist/wally/logger/src/init.luau +++ /dev/null @@ -1,18 +0,0 @@ -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 = types.Logger -export type Log = types.Log -export type Error = types.Error - -return table.freeze({ - create = create, - formatLog = formatLog, - parseError = parseError, - allowWebLinks = allowWebLinks, - standardErrorInfoUrl = standardErrorInfoUrl, -}) diff --git a/dist/wally/logger/src/parse-error.luau b/dist/wally/logger/src/parse-error.luau deleted file mode 100644 index e43fe53d..00000000 --- a/dist/wally/logger/src/parse-error.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/dist/wally/logger/src/standard-error-info-url.luau b/dist/wally/logger/src/standard-error-info-url.luau deleted file mode 100644 index 345faf36..00000000 --- a/dist/wally/logger/src/standard-error-info-url.luau +++ /dev/null @@ -1,5 +0,0 @@ -local function standardErrorInfoUrl(label: string): string - return `https://prvdmwrong.luau.page/api-reference/{label}/errors` -end - -return standardErrorInfoUrl diff --git a/dist/wally/logger/src/types.luau b/dist/wally/logger/src/types.luau deleted file mode 100644 index d1699037..00000000 --- a/dist/wally/logger/src/types.luau +++ /dev/null @@ -1,23 +0,0 @@ -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 & { - type: "Logger", - print: (self: Logger, props: Log) -> (), - warn: (self: Logger, props: Log) -> (), - error: (self: Logger, props: Log) -> (), - fatalError: (self: Logger, props: Log) -> never, -} - -return nil diff --git a/dist/wally/providers/LICENSE.md b/dist/wally/providers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/providers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/providers/Wally.toml b/dist/wally/providers/Wally.toml deleted file mode 100644 index 1299a231..00000000 --- a/dist/wally/providers/Wally.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -authors = ["Fire "] -description = "Provider creation for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/providers" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -dependencies = "prvdmwrong/dependencies@0.2.0-rc.4" -lifecycles = "prvdmwrong/lifecycles@0.2.0-rc.4" -logger = "prvdmwrong/logger@0.2.0-rc.4" -runtime = "prvdmwrong/runtime@0.2.0-rc.4" diff --git a/dist/wally/providers/dependencies.luau b/dist/wally/providers/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/wally/providers/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/wally/providers/lifecycles.luau b/dist/wally/providers/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/wally/providers/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/wally/providers/logger.luau b/dist/wally/providers/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/wally/providers/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/wally/providers/runtime.luau b/dist/wally/providers/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/wally/providers/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/wally/providers/src/create.luau b/dist/wally/providers/src/create.luau deleted file mode 100644 index 016b8a6d..00000000 --- a/dist/wally/providers/src/create.luau +++ /dev/null @@ -1,30 +0,0 @@ -local nameOf = require("./name-of") -local providerClasses = require("./provider-classes") -local types = require("./types") - -local function createProvider(self: Self): types.Provider - local provider: types.Provider = self :: any - - if provider.__index == nil then - provider.__index = provider - end - - if provider.__tostring == nil then - provider.__tostring = nameOf - end - - if provider.new == nil then - function provider.new(dependencies) - local self: types.Provider = setmetatable({}, provider) :: any - if provider.constructor then - return provider.constructor(self, dependencies) or self - end - return self - end - end - - providerClasses[provider] = true - return provider -end - -return createProvider diff --git a/dist/wally/providers/src/index.d.ts b/dist/wally/providers/src/index.d.ts deleted file mode 100644 index 2ab36e15..00000000 --- a/dist/wally/providers/src/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "../dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/dist/wally/providers/src/init.luau b/dist/wally/providers/src/init.luau deleted file mode 100644 index d678d850..00000000 --- a/dist/wally/providers/src/init.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 = types.Provider - -local providers = table.freeze({ - create = create, - nameOf = nameOf, - _ = table.freeze({ - providerClasses = providerClasses, - }), -}) - -return providers diff --git a/dist/wally/providers/src/name-of.luau b/dist/wally/providers/src/name-of.luau deleted file mode 100644 index 3f86ceec..00000000 --- a/dist/wally/providers/src/name-of.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -local function nameOf(provider: types.Provider) - return provider.name or "Provider" -end - -return nameOf diff --git a/dist/wally/providers/src/provider-classes.luau b/dist/wally/providers/src/provider-classes.luau deleted file mode 100644 index cc57922f..00000000 --- a/dist/wally/providers/src/provider-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local providerClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return providerClasses diff --git a/dist/wally/providers/src/types.luau b/dist/wally/providers/src/types.luau deleted file mode 100644 index 4f4d4dc9..00000000 --- a/dist/wally/providers/src/types.luau +++ /dev/null @@ -1,12 +0,0 @@ -local dependencies = require("../dependencies") - -export type Provider = dependencies.Dependency, - __tostring: (self: Provider) -> string, - name: string?, - constructor: ((self: Provider, dependencies: Dependencies) -> ())?, - start: (self: Provider) -> ()?, - destroy: (self: Provider) -> ()?, -}, Dependencies> - -return nil diff --git a/dist/wally/prvdmwrong/LICENSE.md b/dist/wally/prvdmwrong/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/prvdmwrong/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/prvdmwrong/Wally.toml b/dist/wally/prvdmwrong/Wally.toml deleted file mode 100644 index 1f4e3fac..00000000 --- a/dist/wally/prvdmwrong/Wally.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -authors = ["Fire "] -description = "Entry point to Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/prvdmwrong" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -dependencies = "prvdmwrong/dependencies@0.2.0-rc.4" -lifecycles = "prvdmwrong/lifecycles@0.2.0-rc.4" -providers = "prvdmwrong/providers@0.2.0-rc.4" -roots = "prvdmwrong/roots@0.2.0-rc.4" diff --git a/dist/wally/prvdmwrong/dependencies.luau b/dist/wally/prvdmwrong/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/wally/prvdmwrong/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/wally/prvdmwrong/lifecycles.luau b/dist/wally/prvdmwrong/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/wally/prvdmwrong/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/wally/prvdmwrong/providers.luau b/dist/wally/prvdmwrong/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/wally/prvdmwrong/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/wally/prvdmwrong/roots.luau b/dist/wally/prvdmwrong/roots.luau deleted file mode 100644 index c606c7bd..00000000 --- a/dist/wally/prvdmwrong/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./Packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/wally/prvdmwrong/src/index.d.ts b/dist/wally/prvdmwrong/src/index.d.ts deleted file mode 100644 index 2058129c..00000000 --- a/dist/wally/prvdmwrong/src/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "../dependencies"; -import lifecycles from "../lifecycles"; -import providers from "../providers"; -import roots from "../roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/dist/wally/prvdmwrong/src/init.luau b/dist/wally/prvdmwrong/src/init.luau deleted file mode 100644 index 413e2258..00000000 --- a/dist/wally/prvdmwrong/src/init.luau +++ /dev/null @@ -1,44 +0,0 @@ -local dependencies = require("./dependencies") -local lifecycles = require("./lifecycles") -local providers = require("./providers") -local roots = require("./roots") - -export type Provider = providers.Provider -export type Lifecycle = lifecycles.Lifecycle -export type Root = roots.Root -export type StartedRoot = roots.StartedRoot - -local prvd = { - provider = providers.create, - root = roots.create, - depend = dependencies.depend, - nameOf = providers.nameOf, - - lifecycle = lifecycles.create, - fireConcurrent = lifecycles.handlers.fireConcurrent, - fireSequential = lifecycles.handlers.fireSequential, - - hooks = table.freeze({ - onProviderUsed = roots.hooks.onProviderUsed, - onLifecycleUsed = roots.hooks.onLifecycleUsed, - onRootConstructing = roots.hooks.onRootConstructing, - onRootUsed = roots.hooks.onRootUsed, - onRootStarted = roots.hooks.onRootStarted, - onRootFinished = roots.hooks.onRootFinished, - onRootDestroyed = roots.hooks.onRootDestroyed, - - onLifecycleConstructed = lifecycles.hooks.onLifecycleConstructed, - onLifecycleDestroyed = lifecycles.hooks.onLifecycleDestroyed, - onLifecycleRegistered = lifecycles.hooks.onLifecycleRegistered, - onLifecycleUnregistered = lifecycles.hooks.onLifecycleUnregistered, - }), -} - -local mt = {} - -function mt.__call(_, provider: Self): providers.Provider - return providers.create(provider) :: any -end - -table.freeze(mt) -return setmetatable(prvd, mt) diff --git a/dist/wally/rbx-components/LICENSE.md b/dist/wally/rbx-components/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/rbx-components/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/rbx-components/Wally.toml b/dist/wally/rbx-components/Wally.toml deleted file mode 100644 index 5c89a9ff..00000000 --- a/dist/wally/rbx-components/Wally.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -authors = ["Fire "] -description = "Component functionality for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/rbx-components" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -dependencies = "prvdmwrong/dependencies@0.2.0-rc.4" -logger = "prvdmwrong/logger@0.2.0-rc.4" -providers = "prvdmwrong/providers@0.2.0-rc.4" -roots = "prvdmwrong/roots@0.2.0-rc.4" diff --git a/dist/wally/rbx-components/dependencies.luau b/dist/wally/rbx-components/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/wally/rbx-components/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/wally/rbx-components/logger.luau b/dist/wally/rbx-components/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/wally/rbx-components/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/wally/rbx-components/providers.luau b/dist/wally/rbx-components/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/wally/rbx-components/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/wally/rbx-components/roots.luau b/dist/wally/rbx-components/roots.luau deleted file mode 100644 index c606c7bd..00000000 --- a/dist/wally/rbx-components/roots.luau +++ /dev/null @@ -1,4 +0,0 @@ -local DEPENDENCY = require("./Packages/roots") -export type Root = DEPENDENCY.Root -export type StartedRoot = DEPENDENCY.StartedRoot -return DEPENDENCY diff --git a/dist/wally/rbx-components/src/component-classes.luau b/dist/wally/rbx-components/src/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/dist/wally/rbx-components/src/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/dist/wally/rbx-components/src/component-provider.luau b/dist/wally/rbx-components/src/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/dist/wally/rbx-components/src/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/dist/wally/rbx-components/src/create.luau b/dist/wally/rbx-components/src/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/dist/wally/rbx-components/src/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/dist/wally/rbx-components/src/extend-root/create-component-class-provider.luau b/dist/wally/rbx-components/src/extend-root/create-component-class-provider.luau deleted file mode 100644 index 9d5ae999..00000000 --- a/dist/wally/rbx-components/src/extend-root/create-component-class-provider.luau +++ /dev/null @@ -1,31 +0,0 @@ -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.dependencies = table.freeze({ - componentProvider = ComponentProvider, -}) - -ComponentClassProvider._components = {} :: { types.AnyComponent } - -function ComponentClassProvider.constructor( - self: ComponentClassProvider, - dependencies: typeof(ComponentClassProvider.dependencies) -) - for _, class in self._components do - dependencies.componentProvider:addComponentClass(class) - end -end - -export type ComponentClassProvider = typeof(ComponentClassProvider) - -local function createComponentClassProvider(components: { types.AnyComponent }) - local provider = table.clone(ComponentClassProvider) - provider._components = components - return providers.create(provider) -end - -return createComponentClassProvider diff --git a/dist/wally/rbx-components/src/extend-root/init.luau b/dist/wally/rbx-components/src/extend-root/init.luau deleted file mode 100644 index 6e9f0578..00000000 --- a/dist/wally/rbx-components/src/extend-root/init.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 = require("@self/use-components") -local useModuleAsComponent = require("@self/use-module-as-component") -local useModulesAsComponents = require("@self/use-modules-as-components") - -local function extendRoot(root: types.RootPrivate): types.Root - if root._hasComponentExtensions then - return logger:fatalError({ template = logger.alreadyExtendedRoot }) - end - - root._hasComponentExtensions = true - root._classes = {} - - root:useProvider(ComponentProvider) - root:useProvider(createComponentClassProvider(root._classes)) - - root.useComponent = useComponent :: any - root.useComponents = useComponents :: any - root.useModuleAsComponent = useModuleAsComponent :: any - root.useModulesAsComponents = useModulesAsComponents :: any - - return root -end - -return extendRoot :: (root: roots.Root) -> types.Root diff --git a/dist/wally/rbx-components/src/extend-root/use-component.luau b/dist/wally/rbx-components/src/extend-root/use-component.luau deleted file mode 100644 index b0bd8d1f..00000000 --- a/dist/wally/rbx-components/src/extend-root/use-component.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function useComponent(root: types.RootPrivate, component: types.AnyComponent) - table.insert(root._classes, component) - return root -end - -return useComponent diff --git a/dist/wally/rbx-components/src/extend-root/use-components.luau b/dist/wally/rbx-components/src/extend-root/use-components.luau deleted file mode 100644 index 809a4006..00000000 --- a/dist/wally/rbx-components/src/extend-root/use-components.luau +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/dist/wally/rbx-components/src/extend-root/use-module-as-component.luau b/dist/wally/rbx-components/src/extend-root/use-module-as-component.luau deleted file mode 100644 index 46724fe7..00000000 --- a/dist/wally/rbx-components/src/extend-root/use-module-as-component.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 useModuleAsComponent diff --git a/dist/wally/rbx-components/src/extend-root/use-modules-as-components.luau b/dist/wally/rbx-components/src/extend-root/use-modules-as-components.luau deleted file mode 100644 index bababafa..00000000 --- a/dist/wally/rbx-components/src/extend-root/use-modules-as-components.luau +++ /dev/null @@ -1,28 +0,0 @@ -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") then - continue - end - - if predicate and not predicate(module) then - continue - end - - local required = (require)(module) - if componentClasses[required] then - table.insert(root, required) - end - end - return root -end - -return useModulesAsComponents diff --git a/dist/wally/rbx-components/src/init.luau b/dist/wally/rbx-components/src/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/dist/wally/rbx-components/src/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/dist/wally/rbx-components/src/logger.luau b/dist/wally/rbx-components/src/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/dist/wally/rbx-components/src/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/dist/wally/rbx-components/src/types.luau b/dist/wally/rbx-components/src/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/dist/wally/rbx-components/src/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/dist/wally/rbx-lifecycles/LICENSE.md b/dist/wally/rbx-lifecycles/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/rbx-lifecycles/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/rbx-lifecycles/Wally.toml b/dist/wally/rbx-lifecycles/Wally.toml deleted file mode 100644 index 3412f852..00000000 --- a/dist/wally/rbx-lifecycles/Wally.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -authors = ["Fire "] -description = "Lifecycles implementations for Roblox" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/rbx-lifecycles" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -prvdmwrong = "prvdmwrong/prvdmwrong@0.2.0-rc.4" diff --git a/dist/wally/rbx-lifecycles/prvdmwrong.luau b/dist/wally/rbx-lifecycles/prvdmwrong.luau deleted file mode 100644 index 6f986dff..00000000 --- a/dist/wally/rbx-lifecycles/prvdmwrong.luau +++ /dev/null @@ -1,6 +0,0 @@ -local DEPENDENCY = require("./Packages/prvdmwrong") -export type Root = DEPENDENCY.Root -export type Lifecycle = DEPENDENCY.Lifecycle -export type StartedRoot = DEPENDENCY.StartedRoot -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/wally/rbx-lifecycles/src/index.d.ts b/dist/wally/rbx-lifecycles/src/index.d.ts deleted file mode 100644 index 3ad36447..00000000 --- a/dist/wally/rbx-lifecycles/src/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace RbxLifecycles { - export const RbxLifecycles: Provider<{ - preSimulation: Lifecycle<[dt: number]>; - postSimulation: Lifecycle<[dt: number]>; - preAnimation: Lifecycle<[dt: number]>; - preRender: Lifecycle<[dt: number]>; - playerAdded: Lifecycle<[player: Player]>; - playerRemoving: Lifecycle<[player: Player]>; - }>; - - export interface PreSimulation { - preSimulation(dt: number): void; - } - - export interface PostSimulation { - postSimulation(dt: number): void; - } - - export interface PreAnimation { - preAnimation(dt: number): void; - } - - export interface PreRender { - preRender(dt: number): void; - } - - export interface PlayerAdded { - playerAdded(player: Player): void; - } - - export interface PlayerRemoving { - playerRemoving(player: Player): void; - } -} - -export = RbxLifecycles; -export as namespace RbxLifecycles; diff --git a/dist/wally/rbx-lifecycles/src/init.luau b/dist/wally/rbx-lifecycles/src/init.luau deleted file mode 100644 index c1243680..00000000 --- a/dist/wally/rbx-lifecycles/src/init.luau +++ /dev/null @@ -1,67 +0,0 @@ -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 = prvd.lifecycle("preSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.postSimulation = prvd.lifecycle("postSimulation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preAnimation = prvd.lifecycle("preAnimation", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.preRender = prvd.lifecycle("preRender", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerAdded = prvd.lifecycle("playerAdded", fireConcurrent) :: prvd.Lifecycle -RbxLifecycles.playerRemoving = prvd.lifecycle("playerRemoving", fireConcurrent) :: prvd.Lifecycle - -local function wrapLifecycle(lifecycle: prvd.Lifecycle<...unknown>) - return function(...: unknown) - lifecycle:fire(...) - end -end - -function RbxLifecycles.constructor(self: RbxLifecycles) - self.connections = {} :: { RBXScriptConnection } - - self:_addConnections( - RunService.PreSimulation:Connect(wrapLifecycle(RbxLifecycles.preSimulation :: any)), - RunService.PostSimulation:Connect(wrapLifecycle(RbxLifecycles.postSimulation :: any)), - RunService.PreAnimation:Connect(wrapLifecycle(RbxLifecycles.preAnimation :: any)) - ) - - if RunService:IsClient() then - self:_addConnections(RunService.PreRender:Connect(wrapLifecycle(RbxLifecycles.preRender :: any))) - end - - self:_addConnections( - Players.PlayerAdded:Connect(wrapLifecycle(RbxLifecycles.playerAdded :: any)), - Players.PlayerRemoving:Connect(wrapLifecycle(RbxLifecycles.playerRemoving :: any)) - ) -end - -function RbxLifecycles.finish(self: RbxLifecycles) - for _, connection in self.connections do - if connection.Connected then - connection:Disconnect() - end - end - table.clear(self.connections) -end - -function RbxLifecycles._addConnections(self: RbxLifecycles, ...: RBXScriptConnection) - for index = 1, select("#", ...) do - table.insert(self.connections, select(index, ...) :: any) - end -end - --- Needed so typescript can require the provider as: --- --- ```ts --- import { RbxLifecycles } from "@rbxts/rbx-lifecycles" --- ``` -RbxLifecycles.RbxLifecycles = RbxLifecycles - -export type RbxLifecycles = typeof(RbxLifecycles) -return prvd(RbxLifecycles) diff --git a/dist/wally/roots/LICENSE.md b/dist/wally/roots/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/roots/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/roots/Wally.toml b/dist/wally/roots/Wally.toml deleted file mode 100644 index 0fcbbd8c..00000000 --- a/dist/wally/roots/Wally.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -authors = ["Fire "] -description = "Roots implementation for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/roots" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] -dependencies = "prvdmwrong/dependencies@0.2.0-rc.4" -lifecycles = "prvdmwrong/lifecycles@0.2.0-rc.4" -logger = "prvdmwrong/logger@0.2.0-rc.4" -providers = "prvdmwrong/providers@0.2.0-rc.4" -runtime = "prvdmwrong/runtime@0.2.0-rc.4" diff --git a/dist/wally/roots/dependencies.luau b/dist/wally/roots/dependencies.luau deleted file mode 100644 index c11c4469..00000000 --- a/dist/wally/roots/dependencies.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/dependencies") -export type Dependency = DEPENDENCY.Dependency -return DEPENDENCY diff --git a/dist/wally/roots/lifecycles.luau b/dist/wally/roots/lifecycles.luau deleted file mode 100644 index 53ce025e..00000000 --- a/dist/wally/roots/lifecycles.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/lifecycles") -export type Lifecycle = DEPENDENCY.Lifecycle -return DEPENDENCY diff --git a/dist/wally/roots/logger.luau b/dist/wally/roots/logger.luau deleted file mode 100644 index 830f960c..00000000 --- a/dist/wally/roots/logger.luau +++ /dev/null @@ -1,5 +0,0 @@ -local DEPENDENCY = require("./Packages/logger") -export type Logger = DEPENDENCY.Logger -export type Log = DEPENDENCY.Log -export type Error = DEPENDENCY.Error -return DEPENDENCY diff --git a/dist/wally/roots/providers.luau b/dist/wally/roots/providers.luau deleted file mode 100644 index dd417a75..00000000 --- a/dist/wally/roots/providers.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/providers") -export type Provider = DEPENDENCY.Provider -return DEPENDENCY diff --git a/dist/wally/roots/runtime.luau b/dist/wally/roots/runtime.luau deleted file mode 100644 index c841cb44..00000000 --- a/dist/wally/roots/runtime.luau +++ /dev/null @@ -1,3 +0,0 @@ -local DEPENDENCY = require("./Packages/runtime") -export type RuntimeName = DEPENDENCY.RuntimeName -return DEPENDENCY diff --git a/dist/wally/roots/src/create.luau b/dist/wally/roots/src/create.luau deleted file mode 100644 index 26c14f4e..00000000 --- a/dist/wally/roots/src/create.luau +++ /dev/null @@ -1,47 +0,0 @@ -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-modules") -local useProvider = require("./methods/use-provider") -local useProviders = require("./methods/use-providers") -local useRoot = require("./methods/use-root") -local useRoots = require("./methods/use-roots") -local willFinish = require("./methods/will-finish") -local willStart = require("./methods/will-start") - -local function create(): types.Root - local self: types.Self = { - type = "Root", - - start = start, - - useProvider = useProvider, - useProviders = useProviders, - useModule = useModule, - useModules = useModules, - useRoot = useRoot, - useRoots = useRoots, - destroy = destroy, - - willStart = willStart, - willFinish = willFinish, - - _destroyed = false, - _rootProviders = {}, - _rootLifecycles = {}, - _subRoots = {}, - _start = lifecycles.create("start", lifecycles.handlers.fireConcurrent), - _finish = lifecycles.create("destroy", lifecycles.handlers.fireSequential), - } :: any - - for _, callback in rootConstructing.callbacks do - callback(self) - end - - return self -end - -return create diff --git a/dist/wally/roots/src/hooks/lifecycle-used.luau b/dist/wally/roots/src/hooks/lifecycle-used.luau deleted file mode 100644 index bd29276a..00000000 --- a/dist/wally/roots/src/hooks/lifecycle-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onLifecycleUsed = onLifecycleUsed, -}) diff --git a/dist/wally/roots/src/hooks/provider-used.luau b/dist/wally/roots/src/hooks/provider-used.luau deleted file mode 100644 index dac2573c..00000000 --- a/dist/wally/roots/src/hooks/provider-used.luau +++ /dev/null @@ -1,16 +0,0 @@ -local providers = require("../../providers") -local types = require("../types") - -local callbacks: { (root: types.Self, provider: providers.Provider) -> () } = {} - -local function onProviderUsed(listener: (root: types.Root, provider: providers.Provider) -> ()): () -> () - table.insert(callbacks, listener) - return function() - table.remove(callbacks, table.find(callbacks, listener)) - end -end - -return table.freeze({ - callbacks = callbacks, - onProviderUsed = onProviderUsed, -}) diff --git a/dist/wally/roots/src/hooks/root-constructing.luau b/dist/wally/roots/src/hooks/root-constructing.luau deleted file mode 100644 index 5fb8b819..00000000 --- a/dist/wally/roots/src/hooks/root-constructing.luau +++ /dev/null @@ -1,15 +0,0 @@ -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({ - callbacks = callbacks, - onRootConstructing = onRootConstructing, -}) diff --git a/dist/wally/roots/src/hooks/root-destroyed.luau b/dist/wally/roots/src/hooks/root-destroyed.luau deleted file mode 100644 index 10b79b54..00000000 --- a/dist/wally/roots/src/hooks/root-destroyed.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootDestroyed = onRootDestroyed, -}) diff --git a/dist/wally/roots/src/hooks/root-finished.luau b/dist/wally/roots/src/hooks/root-finished.luau deleted file mode 100644 index d3519cea..00000000 --- a/dist/wally/roots/src/hooks/root-finished.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootFinished = onRootFinished, -}) diff --git a/dist/wally/roots/src/hooks/root-started.luau b/dist/wally/roots/src/hooks/root-started.luau deleted file mode 100644 index 2ae6f90c..00000000 --- a/dist/wally/roots/src/hooks/root-started.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 = callbacks, - onRootStarted = onRootStarted, -}) diff --git a/dist/wally/roots/src/hooks/root-used.luau b/dist/wally/roots/src/hooks/root-used.luau deleted file mode 100644 index 71f172cc..00000000 --- a/dist/wally/roots/src/hooks/root-used.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 -end - -return table.freeze({ - callbacks = callbacks, - onRootUsed = onRootUsed, -}) diff --git a/dist/wally/roots/src/index.d.ts b/dist/wally/roots/src/index.d.ts deleted file mode 100644 index d8e100c5..00000000 --- a/dist/wally/roots/src/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/dist/wally/roots/src/init.luau b/dist/wally/roots/src/init.luau deleted file mode 100644 index f6aa7495..00000000 --- a/dist/wally/roots/src/init.luau +++ /dev/null @@ -1,28 +0,0 @@ -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/hooks/root-finished") -local rootStarted = require("@self/hooks/root-started") -local rootUsed = require("@self/hooks/root-used") -local types = require("@self/types") - -export type Root = types.Root -export type StartedRoot = types.StartedRoot - -local roots = table.freeze({ - create = create, - hooks = table.freeze({ - onLifecycleUsed = lifecycleUsed.onLifecycleUsed, - onProviderUsed = providerUsed.onProviderUsed, - onRootUsed = rootUsed.onRootUsed, - - onRootConstructing = rootConstructing.onRootConstructing, - onRootStarted = rootStarted.onRootStarted, - onRootFinished = rootFinished.onRootFinished, - onRootDestroyed = rootDestroyed.onRootDestroyed, - }), -}) - -return roots diff --git a/dist/wally/roots/src/logger.luau b/dist/wally/roots/src/logger.luau deleted file mode 100644 index 92e611ef..00000000 --- a/dist/wally/roots/src/logger.luau +++ /dev/null @@ -1,7 +0,0 @@ -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.", -}) diff --git a/dist/wally/roots/src/methods/destroy.luau b/dist/wally/roots/src/methods/destroy.luau deleted file mode 100644 index 0c62a935..00000000 --- a/dist/wally/roots/src/methods/destroy.luau +++ /dev/null @@ -1,16 +0,0 @@ -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._subRoots) - root._start:clear() - root._finish:clear() -end - -return destroy diff --git a/dist/wally/roots/src/methods/start.luau b/dist/wally/roots/src/methods/start.luau deleted file mode 100644 index 3f24dac5..00000000 --- a/dist/wally/roots/src/methods/start.luau +++ /dev/null @@ -1,102 +0,0 @@ -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 = require("../types") - -local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) - local lifecycleMethod = (provider :: any)[lifecycle.method] - if typeof(lifecycleMethod) == "function" then - -- local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES - - -- if isProfiling then - -- lifecycle:register(function(...) - -- debug.profilebegin(memoryCategory) - -- debug.setmemorycategory(memoryCategory) - -- lifecycleMethod(provider, ...) - -- debug.resetmemorycategory() - -- debug.profileend() - -- end) - -- else - lifecycle:register(function(...) - lifecycleMethod(provider, ...) - end) - -- end - end -end - -local function nameOf(provider: providers.Provider, extension: string?): string - return if extension then `{tostring(provider)}.{extension}` else tostring(provider) -end - -local function start(root: types.Self): types.StartedRoot - local processed = dependencies.processDependencies(root._rootProviders) - local sortedProviders = processed.sortedDependencies :: { providers.Provider } - local processedLifecycles = processed.lifecycles - table.move(root._rootLifecycles, 1, #root._rootLifecycles, #processedLifecycles + 1, processedLifecycles) - - dependencies.sortByPriority(sortedProviders) - - local constructedProviders = {} - for _, provider in sortedProviders do - local providerDependencies = (provider :: any).dependencies - if typeof(providerDependencies) == "table" then - providerDependencies = table.clone(providerDependencies) - for key, value in providerDependencies do - providerDependencies[key] = constructedProviders[value] - end - end - - local constructed = provider.new(providerDependencies) - constructedProviders[provider] = constructed - bindLifecycle(root._start, constructed) - bindLifecycle(root._finish, constructed) - - for _, lifecycle in processedLifecycles do - bindLifecycle(lifecycle, constructed) - end - end - - local subRoots: { types.StartedRoot } = {} - for root in root._subRoots do - table.insert(subRoots, root:start()) - end - - root._start:fire() - - local startedRoot = {} :: types.StartedRoot - startedRoot.type = "StartedRoot" - - local didFinish = false - - function startedRoot:finish() - if didFinish then - return logger:fatalError({ template = logger.alreadyFinished }) - end - - didFinish = true - root._finish:fire() - - -- NOTE(znotfireman): Assume the user cleans up their own lifecycles - root._start:clear() - root._finish:clear() - - for _, subRoot in subRoots do - subRoot:finish() - end - - for _, hook in rootFinished do - hook(root) - end - end - - for _, hook in rootStarted do - hook(root) - end - - return startedRoot -end - -return start diff --git a/dist/wally/roots/src/methods/use-lifecycle.luau b/dist/wally/roots/src/methods/use-lifecycle.luau deleted file mode 100644 index 862c2d07..00000000 --- a/dist/wally/roots/src/methods/use-lifecycle.luau +++ /dev/null @@ -1,14 +0,0 @@ -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.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - return root -end - -return useLifecycle diff --git a/dist/wally/roots/src/methods/use-lifecycles.luau b/dist/wally/roots/src/methods/use-lifecycles.luau deleted file mode 100644 index 3f12341f..00000000 --- a/dist/wally/roots/src/methods/use-lifecycles.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 _, lifecycle in lifecycles do - table.insert(root._rootLifecycles, lifecycle) - threadpool.spawnCallbacks(lifecycleUsed, root, lifecycle) - end - return root -end - -return useLifecycles diff --git a/dist/wally/roots/src/methods/use-module.luau b/dist/wally/roots/src/methods/use-module.luau deleted file mode 100644 index a96b3d17..00000000 --- a/dist/wally/roots/src/methods/use-module.luau +++ /dev/null @@ -1,23 +0,0 @@ -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, module: ModuleScript) - local moduleExport = (require)(module) - - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - - return root -end - -return useModule diff --git a/dist/wally/roots/src/methods/use-modules.luau b/dist/wally/roots/src/methods/use-modules.luau deleted file mode 100644 index 8354a9d0..00000000 --- a/dist/wally/roots/src/methods/use-modules.luau +++ /dev/null @@ -1,28 +0,0 @@ -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, modules: { Instance }, predicate: ((module: ModuleScript) -> boolean)?) - for _, module in modules do - if not module:IsA("ModuleScript") or predicate and not predicate(module) then - continue - end - - local moduleExport = (require)(module) - if providerClasses[moduleExport] then - root._rootProviders[moduleExport] = true - if typeof(moduleExport.name) ~= "string" then - moduleExport.name = module.Name - end - threadpool.spawnCallbacks(providerUsed, root, moduleExport) - end - end - - return root -end - -return useModules diff --git a/dist/wally/roots/src/methods/use-provider.luau b/dist/wally/roots/src/methods/use-provider.luau deleted file mode 100644 index 277d8049..00000000 --- a/dist/wally/roots/src/methods/use-provider.luau +++ /dev/null @@ -1,14 +0,0 @@ -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) - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - return root -end - -return useProvider diff --git a/dist/wally/roots/src/methods/use-providers.luau b/dist/wally/roots/src/methods/use-providers.luau deleted file mode 100644 index 1489c3a3..00000000 --- a/dist/wally/roots/src/methods/use-providers.luau +++ /dev/null @@ -1,16 +0,0 @@ -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 }) - for _, provider in providers do - root._rootProviders[provider] = true - threadpool.spawnCallbacks(providerUsed, root, provider) - end - return root -end - -return useProviders diff --git a/dist/wally/roots/src/methods/use-root.luau b/dist/wally/roots/src/methods/use-root.luau deleted file mode 100644 index efc4ad1e..00000000 --- a/dist/wally/roots/src/methods/use-root.luau +++ /dev/null @@ -1,13 +0,0 @@ -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) - return root -end - -return useRoot diff --git a/dist/wally/roots/src/methods/use-roots.luau b/dist/wally/roots/src/methods/use-roots.luau deleted file mode 100644 index 7b5b9dda..00000000 --- a/dist/wally/roots/src/methods/use-roots.luau +++ /dev/null @@ -1,15 +0,0 @@ -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.spawnCallbacks(rootUsed, root, subRoot) - end - return root -end - -return useRoots diff --git a/dist/wally/roots/src/methods/will-finish.luau b/dist/wally/roots/src/methods/will-finish.luau deleted file mode 100644 index 893088f4..00000000 --- a/dist/wally/roots/src/methods/will-finish.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willFinish(root: types.Self, callback: () -> ()) - root._finish:register(callback) - return root -end - -return willFinish diff --git a/dist/wally/roots/src/methods/will-start.luau b/dist/wally/roots/src/methods/will-start.luau deleted file mode 100644 index 7c3d88c3..00000000 --- a/dist/wally/roots/src/methods/will-start.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function willStart(root: types.Self, callback: () -> ()) - root._start:register(callback) - return root -end - -return willStart diff --git a/dist/wally/roots/src/types.luau b/dist/wally/roots/src/types.luau deleted file mode 100644 index 104143c4..00000000 --- a/dist/wally/roots/src/types.luau +++ /dev/null @@ -1,40 +0,0 @@ -local lifecycles = require("../lifecycles") -local providers = require("../providers") - -type Set = { [T]: true } - -export type Root = { - type: "Root", - - start: (root: Root) -> StartedRoot, - - useModule: (root: Root, module: ModuleScript) -> Root, - useModules: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useRoot: (root: Root, root: Root) -> Root, - useRoots: (root: Root, roots: { Root }) -> Root, - useProvider: (root: Root, provider: providers.Provider) -> Root, - useProviders: (root: Root, providers: { providers.Provider }) -> Root, - useLifecycle: (root: Root, lifecycle: lifecycles.Lifecycle) -> Root, - useLifecycles: (root: Root, lifecycles: { lifecycles.Lifecycle }) -> Root, - destroy: (root: Root) -> (), - - willStart: (callback: () -> ()) -> Root, - willFinish: (callback: () -> ()) -> Root, -} - -export type StartedRoot = { - type: "StartedRoot", - - finish: (root: StartedRoot) -> (), -} - -export type Self = Root & { - _destroyed: boolean, - _rootProviders: Set>, - _rootLifecycles: { lifecycles.Lifecycle }, - _subRoots: Set, - _start: lifecycles.Lifecycle<()>, - _finish: lifecycles.Lifecycle<()>, -} - -return nil diff --git a/dist/wally/runtime/LICENSE.md b/dist/wally/runtime/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/runtime/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/runtime/Wally.toml b/dist/wally/runtime/Wally.toml deleted file mode 100644 index 66b37d73..00000000 --- a/dist/wally/runtime/Wally.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -authors = ["Fire "] -description = "Runtime agnostic libraries for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/runtime" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] diff --git a/dist/wally/runtime/src/batteries/threadpool.luau b/dist/wally/runtime/src/batteries/threadpool.luau deleted file mode 100644 index 6caf08b4..00000000 --- a/dist/wally/runtime/src/batteries/threadpool.luau +++ /dev/null @@ -1,38 +0,0 @@ -local task = require("../libs/task") - -local freeThreads: { thread } = {} - -local function run(f: (T...) -> (), thread: thread, ...) - f(...) - table.insert(freeThreads, thread) -end - -local function yielder() - while true do - run(coroutine.yield()) - end -end - -local function spawn(f: (T...) -> (), ...: T...) - local thread - if #freeThreads > 0 then - thread = freeThreads[#freeThreads] - freeThreads[#freeThreads] = nil - else - thread = coroutine.create(yielder) - coroutine.resume(thread) - end - - task.spawn(thread, f, thread, ...) -end - -local function spawnCallbacks(callbacks: { (Args...) -> () }, ...: Args...) - for _, callback in callbacks do - spawn(callback, ...) - end -end - -return table.freeze({ - spawn = spawn, - spawnCallbacks = spawnCallbacks, -}) diff --git a/dist/wally/runtime/src/implementations/init.luau b/dist/wally/runtime/src/implementations/init.luau deleted file mode 100644 index 28dbe015..00000000 --- a/dist/wally/runtime/src/implementations/init.luau +++ /dev/null @@ -1,56 +0,0 @@ -local types = require("@self/../types") - -type Implementation = { 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/lune"), - lute = require("@self/lute"), - seal = require("@self/seal"), - zune = require("@self/zune"), -}) - -local currentRuntime: types.Runtime = nil -do - for _, runtime in supportedRuntimes :: { [string]: types.Runtime } do - local isRuntime = runtime.is() - if isRuntime then - local currentRuntimePriority = currentRuntime and currentRuntime.priority or 0 - local runtimePriority = runtime.priority or 0 - if currentRuntimePriority <= runtimePriority then - currentRuntime = runtime - end - end - end - assert(currentRuntime, "No supported runtime") -end - -local currentRuntimeName: RuntimeName = currentRuntime.name :: any - -local function notImplemented(functionName: string) - return function() - error(`'{functionName}' is not implemented by runtime '{currentRuntimeName}'`, 2) - end -end - -local function implementFunction(label: string, implementations: { [types.Runtime]: Implementation? }): T - local implementation = implementations[currentRuntime] - if implementation then - if implementation.new then - return implementation.new() - elseif implementation.implementation then - return implementation.implementation - end - end - return notImplemented(label) :: any -end - -return table.freeze({ - supportedRuntimes = supportedRuntimes, - currentRuntime = currentRuntime, - currentRuntimeName = currentRuntimeName, - implementFunction = implementFunction, -}) diff --git a/dist/wally/runtime/src/implementations/init.spec.luau b/dist/wally/runtime/src/implementations/init.spec.luau deleted file mode 100644 index 3ce91cbb..00000000 --- a/dist/wally/runtime/src/implementations/init.spec.luau +++ /dev/null @@ -1,81 +0,0 @@ -local implementations = require("@self/../implementations") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("currentRuntime", function() - test("detects lune runtime", function() - expect(implementations.currentRuntimeName).is("lune") - expect(implementations.currentRuntime).is(implementations.supportedRuntimes.lune) - end) - end) - - describe("implementFunction", function() - test("implements for lune runtime", function() - local lune = function() end - local luau = function() end - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - implementation = lune, - }, - [implementations.supportedRuntimes.luau] = { - implementation = luau, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - end) - - test("constructs for lune runtime", function() - local lune = function() end - local luau = function() end - - local constructedLune = false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - new = function() - constructedLune = true - return lune - end, - }, - [implementations.supportedRuntimes.luau] = { - new = function() - return luau - end, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - expect(constructedLune).is_true() - end) - - test("defaults to not implemented function", function() - local constructSuccess, runSuccess = false, false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.roblox] = { - new = function() - constructSuccess = true - return function() - runSuccess = true - end - end, - }, - }) - - expect(constructSuccess).is(false) - expect(implementation).is_a("function") - expect(implementation).fails_with("'implementation' is not implemented by runtime 'lune'") - expect(runSuccess).is(false) - end) - end) -end diff --git a/dist/wally/runtime/src/implementations/luau.luau b/dist/wally/runtime/src/implementations/luau.luau deleted file mode 100644 index c67e52f4..00000000 --- a/dist/wally/runtime/src/implementations/luau.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "luau", - priority = -1, - is = function() - return true - end, -}) diff --git a/dist/wally/runtime/src/implementations/lune.luau b/dist/wally/runtime/src/implementations/lune.luau deleted file mode 100644 index f49834eb..00000000 --- a/dist/wally/runtime/src/implementations/lune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/wally/runtime/src/implementations/lute.luau b/dist/wally/runtime/src/implementations/lute.luau deleted file mode 100644 index 7b6abc58..00000000 --- a/dist/wally/runtime/src/implementations/lute.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "lute", - is = function() - return false - end, -}) diff --git a/dist/wally/runtime/src/implementations/roblox.luau b/dist/wally/runtime/src/implementations/roblox.luau deleted file mode 100644 index 91a780e2..00000000 --- a/dist/wally/runtime/src/implementations/roblox.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "roblox", - is = function() - -- wtf - return not not (_VERSION == "Luau" and game and workspace) - end, -}) diff --git a/dist/wally/runtime/src/implementations/seal.luau b/dist/wally/runtime/src/implementations/seal.luau deleted file mode 100644 index 0a72684c..00000000 --- a/dist/wally/runtime/src/implementations/seal.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "seal", - is = function() - return false - end, -}) diff --git a/dist/wally/runtime/src/implementations/zune.luau b/dist/wally/runtime/src/implementations/zune.luau deleted file mode 100644 index 48243e05..00000000 --- a/dist/wally/runtime/src/implementations/zune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/dist/wally/runtime/src/index.d.ts b/dist/wally/runtime/src/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/dist/wally/runtime/src/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/dist/wally/runtime/src/init.luau b/dist/wally/runtime/src/init.luau deleted file mode 100644 index 26bdeee0..00000000 --- a/dist/wally/runtime/src/init.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - - task = task, - warn = warn, - - threadpool = threadpool, -}) diff --git a/dist/wally/runtime/src/libs/task.luau b/dist/wally/runtime/src/libs/task.luau deleted file mode 100644 index 28c1ac9e..00000000 --- a/dist/wally/runtime/src/libs/task.luau +++ /dev/null @@ -1,157 +0,0 @@ -local implementations = require("../implementations") - -export type TaskLib = { - cancel: (thread) -> (), - defer: (functionOrThread: thread | (T...) -> (), T...) -> thread, - delay: (duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread, - spawn: (functionOrThread: thread | (T...) -> (), T...) -> thread, - wait: (duration: number?) -> number, -} - -local supportedRuntimes = implementations.supportedRuntimes -local implementFunction = implementations.implementFunction - -local function defaultSpawn(functionOrThread: thread | (T...) -> (), ...: T...): thread - if type(functionOrThread) == "thread" then - coroutine.resume(functionOrThread, ...) - return functionOrThread - else - local thread = coroutine.create(functionOrThread) - coroutine.resume(thread, ...) - return thread - end -end - -local function defaultWait(seconds: number?) - local startTime = os.clock() - local endTime = startTime + (seconds or 1) - local clockTime: number - repeat - clockTime = os.clock() - until clockTime >= endTime - return clockTime - startTime -end - -local task: TaskLib = table.freeze({ - cancel = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.cancel - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").cancel - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").cancel - end, - }, - [supportedRuntimes.luau] = { - implementation = function(thread) - if not coroutine.close(thread) then - error(debug.traceback(thread, "Could not cancel thread")) - end - end, - }, - }), - defer = implementFunction("task.defer", { - [supportedRuntimes.roblox] = { - new = function() - return task.defer :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").defer - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").defer - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - delay = implementFunction("task.delay", { - [supportedRuntimes.roblox] = { - new = function() - return task.delay :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").delay - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").delay - end, - }, - [supportedRuntimes.luau] = { - implementation = function(duration: number, functionOrThread: thread | (T...) -> (), ...: T...): thread - return defaultSpawn( - if typeof(functionOrThread) == "function" - then function(duration, functionOrThread, ...) - defaultWait(duration) - functionOrThread(...) - end - else function(duration, functionOrThread, ...) - defaultWait(duration) - coroutine.resume(...) - end, - duration, - functionOrThread, - ... - ) - end, - }, - }), - spawn = implementFunction("task.spawn", { - [supportedRuntimes.roblox] = { - new = function() - return task.spawn :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").spawn - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").spawn - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - wait = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.wait - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").wait - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").wait - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultWait, - }, - }), -}) - -return task diff --git a/dist/wally/runtime/src/libs/task.spec.luau b/dist/wally/runtime/src/libs/task.spec.luau deleted file mode 100644 index 0918e87f..00000000 --- a/dist/wally/runtime/src/libs/task.spec.luau +++ /dev/null @@ -1,62 +0,0 @@ -local luneTask = require("@lune/task") -local task = require("./task") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - --- FIXME: can't async stuff lol -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("task", function() - test("spawn", function() - expect(task.spawn).is(luneTask.spawn) - local spawned = false - - task.spawn(function() - spawned = true - end) - - expect(spawned).is_true() - end) - - test("defer", function() - expect(task.defer).is(luneTask.defer) - - -- local spawned = false - - -- task.defer(function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - end) - - test("delay", function() - expect(task.delay).is(luneTask.delay) - -- local spawned = false - - -- task.delay(0.25, function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - - -- local startTime = os.clock() - -- repeat - -- until os.clock() - startTime > 0.5 - - -- print(spawned) - - -- expect(spawned).is_true() - end) - - test("wait", function() - expect(task.wait).is(luneTask.wait) - end) - - test("cancel", function() - expect(task.cancel).is(luneTask.cancel) - end) - end) -end diff --git a/dist/wally/runtime/src/libs/warn.luau b/dist/wally/runtime/src/libs/warn.luau deleted file mode 100644 index 6a4837ac..00000000 --- a/dist/wally/runtime/src/libs/warn.luau +++ /dev/null @@ -1,27 +0,0 @@ -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(index, ...))) - end - return table.concat(stringified, " ") -end - -local warn: (T...) -> () = implementFunction("warn", { - [supportedRuntimes.roblox] = { - new = function() - return warn - end, - }, - [supportedRuntimes.luau] = { - implementation = function(...: T...) - print(`\27[0;33m{tostringTuple(...)}\27[0m`) - end, - }, -}) - -return warn diff --git a/dist/wally/runtime/src/types.luau b/dist/wally/runtime/src/types.luau deleted file mode 100644 index ca050fce..00000000 --- a/dist/wally/runtime/src/types.luau +++ /dev/null @@ -1,13 +0,0 @@ -export type Runtime = { - name: string, - priority: number?, - is: () -> boolean, -} - -local function Runtime(x: Runtime) - return table.freeze(x) -end - -return table.freeze({ - Runtime = Runtime, -}) diff --git a/dist/wally/typecheckers/LICENSE.md b/dist/wally/typecheckers/LICENSE.md deleted file mode 100644 index f6610311..00000000 --- a/dist/wally/typecheckers/LICENSE.md +++ /dev/null @@ -1,355 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -### 1. Definitions - -**1.1. “Contributor”** - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -**1.2. “Contributor Version”** - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -**1.3. “Contribution”** - means Covered Software of a particular Contributor. - -**1.4. “Covered Software”** - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -**1.5. “Incompatible With Secondary Licenses”** - means - -* **(a)** that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or -* **(b)** that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -**1.6. “Executable Form”** - means any form of the work other than Source Code Form. - -**1.7. “Larger Work”** - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -**1.8. “License”** - means this document. - -**1.9. “Licensable”** - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -**1.10. “Modifications”** - means any of the following: - -* **(a)** any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or -* **(b)** any new file in Source Code Form that contains any Covered - Software. - -**1.11. “Patent Claims” of a Contributor** - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -**1.12. “Secondary License”** - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -**1.13. “Source Code Form”** - means the form of the work preferred for making modifications. - -**1.14. “You” (or “Your”)** - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, “control” means **(a)** the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or **(b)** ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - -### 2. License Grants and Conditions - -#### 2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -* **(a)** under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and -* **(b)** under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -#### 2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -#### 2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -* **(a)** for any code that a Contributor has removed from Covered Software; - or -* **(b)** for infringements caused by: **(i)** Your and any other third party's - modifications of Covered Software, or **(ii)** the combination of its - Contributions with other software (except as part of its Contributor - Version); or -* **(c)** under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -#### 2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -#### 2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -#### 2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -#### 2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - - -### 3. Responsibilities - -#### 3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -#### 3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -* **(a)** such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -* **(b)** You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -#### 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -#### 3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -#### 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - - -### 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: **(a)** comply with -the terms of this License to the maximum extent possible; and **(b)** -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - - -### 5. Termination - -**5.1.** The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated **(a)** provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and **(b)** on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -**5.2.** If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - - -### 6. Disclaimer of Warranty - -> Covered Software is provided under this License on an “as is” -> basis, without warranty of any kind, either expressed, implied, or -> statutory, including, without limitation, warranties that the -> Covered Software is free of defects, merchantable, fit for a -> particular purpose or non-infringing. The entire risk as to the -> quality and performance of the Covered Software is with You. -> Should any Covered Software prove defective in any respect, You -> (not any Contributor) assume the cost of any necessary servicing, -> repair, or correction. This disclaimer of warranty constitutes an -> essential part of this License. No use of any Covered Software is -> authorized under this License except under this disclaimer. - -### 7. Limitation of Liability - -> Under no circumstances and under no legal theory, whether tort -> (including negligence), contract, or otherwise, shall any -> Contributor, or anyone who distributes Covered Software as -> permitted above, be liable to You for any direct, indirect, -> special, incidental, or consequential damages of any character -> including, without limitation, damages for lost profits, loss of -> goodwill, work stoppage, computer failure or malfunction, or any -> and all other commercial damages or losses, even if such party -> shall have been informed of the possibility of such damages. This -> limitation of liability shall not apply to liability for death or -> personal injury resulting from such party's negligence to the -> extent applicable law prohibits such limitation. Some -> jurisdictions do not allow the exclusion or limitation of -> incidental or consequential damages, so this exclusion and -> limitation may not apply to You. - - -### 8. Litigation - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - - -### 9. Miscellaneous - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - - -### 10. Versions of the License - -#### 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -#### 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -#### 10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -## Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -## Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/dist/wally/typecheckers/Wally.toml b/dist/wally/typecheckers/Wally.toml deleted file mode 100644 index 4532c3e5..00000000 --- a/dist/wally/typecheckers/Wally.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -authors = ["Fire "] -description = "Typechecking primitives and compatibility for Prvd 'M Wrong" -homepage = "https://prvdmwrong.luau.page/latest/" -license = "MPL-2.0" -name = "prvdmwrong/typecheckers" -private = false -realm = "shared" -registry = "https://github.com/upliftgames/wally-index" -repository = "https://github.com/prvdmwrong/prvdmwrong" -version = "0.2.0-rc.4" - -[package.dependencies] diff --git a/dist/wally/typecheckers/src/init.luau b/dist/wally/typecheckers/src/init.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/lune/run-example.luau b/lune/run-example.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/lune/tiniest.luau b/lune/tiniest.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/monarch/init.luau b/monarch/init.luau new file mode 100644 index 00000000..90aceeae --- /dev/null +++ b/monarch/init.luau @@ -0,0 +1 @@ +-- Monarch: A CLI to manage the Prvd 'M Wrong monorepo diff --git a/package.json b/package.json index 38c80717..a68e888a 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,25 @@ { - "private": true, - "files": [ - "**/out", - "!**/*.tsbuildinfo" - ], - "prettier": { - "printWidth": 120, - "tabWidth": 4, - "useTabs": true, - "endOfLine": "lf" - }, - "devDependencies": { - "@rbxts/compiler-types": "1.2.3-types.1", - "@rbxts/types": "1.0.543", - "@typescript-eslint/eslint-plugin": "5.1.0", - "@typescript-eslint/parser": "5.1.0", - "eslint": "8.1.0", - "eslint-config-prettier": "8.3.0", - "eslint-plugin-prettier": "4.0.0", - "eslint-plugin-roblox-ts": "0.0.32", - "prettier": "2.4.1", - "typescript": "4.4.4" - } -} \ No newline at end of file + "private": true, + "files": [ + "**/out", + "!**/*.tsbuildinfo" + ], + "prettier": { + "printWidth": 120, + "tabWidth": 4, + "useTabs": true, + "endOfLine": "lf" + }, + "devDependencies": { + "@rbxts/compiler-types": "1.2.3-types.1", + "@rbxts/types": "1.0.543", + "@typescript-eslint/eslint-plugin": "5.1.0", + "@typescript-eslint/parser": "5.1.0", + "eslint": "8.1.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", + "eslint-plugin-roblox-ts": "0.0.32", + "prettier": "2.4.1", + "typescript": "4.4.4" + } +} diff --git a/packages/lifecycles/create.luau b/packages/lifecycles/create.luau index 6cdd2891..fb8f5688 100644 --- a/packages/lifecycles/create.luau +++ b/packages/lifecycles/create.luau @@ -13,7 +13,7 @@ local function create( method: string, onFire: (lifecycle: types.Lifecycle, Args...) -> () ): types.Lifecycle - local self: types.Self = { + local self: types.Lifecycle = { _isDestroyed = false, _selfRegistered = {}, _selfUnregistered = {}, @@ -33,7 +33,7 @@ local function create( } :: any methodToLifecycles[method] = methodToLifecycles[method] or {} - table.insert(methodToLifecycles[method], self) + table.insert(methodToLifecycles[method], self :: types.Lifecycle) for _, onLifecycleConstructed in lifecycleConstructed.callbacks do onLifecycleConstructed(self :: types.Lifecycle) diff --git a/packages/lifecycles/hooks/lifecycle-registered.luau b/packages/lifecycles/hooks/lifecycle-registered.luau index fab588a3..e303e8a7 100644 --- a/packages/lifecycles/hooks/lifecycle-registered.luau +++ b/packages/lifecycles/hooks/lifecycle-registered.luau @@ -8,9 +8,9 @@ local function onLifecycleRegistered( callback: (Args...) -> () ) -> () ): () -> () - table.insert(callbacks, listener :: any) + table.insert(callbacks :: any, listener) return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) + table.remove(callbacks, table.find(callbacks :: any, listener)) end end diff --git a/packages/lifecycles/hooks/lifecycle-unregistered.luau b/packages/lifecycles/hooks/lifecycle-unregistered.luau index 0ec81756..bca08e7f 100644 --- a/packages/lifecycles/hooks/lifecycle-unregistered.luau +++ b/packages/lifecycles/hooks/lifecycle-unregistered.luau @@ -8,9 +8,9 @@ local function onLifecycleUnregistered( callback: (Args...) -> () ) -> () ): () -> () - table.insert(callbacks, listener :: any) + table.insert(callbacks :: any, listener) return function() - table.remove(callbacks, table.find(callbacks, listener :: any)) + table.remove(callbacks, table.find(callbacks :: any, listener)) end end diff --git a/packages/lifecycles/index.d.ts b/packages/lifecycles/index.d.ts deleted file mode 100644 index 0e5f324b..00000000 --- a/packages/lifecycles/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace lifecycles { - export interface Lifecycle { - type: "Lifecycle"; - - callbacks: Array<(...args: Args) => void>; - method: string; - - register(callback: (...args: Args) => void): void; - fire(...args: Args): void; - unregister(callback: (...args: Args) => void): void; - clear(): void; - onRegistered(listener: (callback: (...args: Args) => void) => void): () => void; - onUnegistered(listener: (callback: (...args: Args) => void) => void): () => void; - await(): LuaTuple; - destroy(): void; - } - - export function create( - method: string, - onFire: (lifecycle: Lifecycle, ...args: Args) => void - ): Lifecycle; - - export namespace handlers { - export function fireConcurrent(lifecycle: Lifecycle, ...args: Args): void; - export function fireSequential(lifecycle: Lifecycle, ...args: Args): void; - } - - export namespace hooks { - export function onLifecycleConstructed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleDestroyed(callback: (lifecycle: Lifecycle) => void): () => void; - export function onLifecycleRegistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - export function onLifecycleUnregistered( - callback: (lifecycle: Lifecycle, callback: (...args: Args) => void) => void - ): () => void; - } - - export namespace _ { - export const methodToLifecycles: Map; - } -} - -export = lifecycles; -export as namespace lifecycles; diff --git a/packages/lifecycles/methods/await.luau b/packages/lifecycles/methods/await.luau index ed8299d6..505a7843 100644 --- a/packages/lifecycles/methods/await.luau +++ b/packages/lifecycles/methods/await.luau @@ -1,16 +1,16 @@ local logger = require("../logger") local types = require("../types") -local function await(lifecycle: types.Self): Args... +local function await(lifecycle: types.Lifecycle): Args... if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end local currentThread = coroutine.running() local function callback(...: Args...) - lifecycle:unregister(callback) + (lifecycle :: any):unregister(callback) coroutine.resume(currentThread, ...) end - lifecycle:register(callback) + (lifecycle :: any):register(callback) return coroutine.yield() end diff --git a/packages/lifecycles/methods/destroy.luau b/packages/lifecycles/methods/destroy.luau index d9d5d6cc..d003d0ab 100644 --- a/packages/lifecycles/methods/destroy.luau +++ b/packages/lifecycles/methods/destroy.luau @@ -3,11 +3,14 @@ local logger = require("../logger") local methodToLifecycles = require("../method-to-lifecycles") local types = require("../types") -local function destroy(lifecycle: types.Self) +local function destroy(lifecycle: types.Lifecycle) if lifecycle._isDestroyed then logger:fatalError({ template = logger.alreadyDestroyed }) end - table.remove(methodToLifecycles[lifecycle.method], table.find(methodToLifecycles[lifecycle.method], lifecycle)) + table.remove( + methodToLifecycles[lifecycle.method], + table.find(methodToLifecycles[lifecycle.method], lifecycle :: types.Lifecycle) + ) table.clear(lifecycle.callbacks) for _, callback in lifecycleDestroyed.callbacks do callback(lifecycle) diff --git a/packages/lifecycles/methods/on-registered.luau b/packages/lifecycles/methods/on-registered.luau index 7ddb009a..b9ca1a99 100644 --- a/packages/lifecycles/methods/on-registered.luau +++ b/packages/lifecycles/methods/on-registered.luau @@ -1,7 +1,7 @@ local logger = require("../logger") local types = require("../types") -local function onRegistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) +local function onRegistered(lifecycle: types.Lifecycle, listener: (callback: (Args...) -> ()) -> ()) if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end diff --git a/packages/lifecycles/methods/on-unregistered.luau b/packages/lifecycles/methods/on-unregistered.luau index 842040ec..dca485ce 100644 --- a/packages/lifecycles/methods/on-unregistered.luau +++ b/packages/lifecycles/methods/on-unregistered.luau @@ -1,7 +1,7 @@ local logger = require("../logger") local types = require("../types") -local function onUnregistered(lifecycle: types.Self, listener: (callback: (Args...) -> ()) -> ()) +local function onUnregistered(lifecycle: types.Lifecycle, listener: (callback: (Args...) -> ()) -> ()) if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end diff --git a/packages/lifecycles/methods/register.luau b/packages/lifecycles/methods/register.luau index 3fd74d56..29d4a83d 100644 --- a/packages/lifecycles/methods/register.luau +++ b/packages/lifecycles/methods/register.luau @@ -4,7 +4,7 @@ local types = require("../types") local threadpool = runtime.threadpool -local function register(lifecycle: types.Self, callback: (Args...) -> ()) +local function register(lifecycle: types.Lifecycle, callback: (Args...) -> ()) if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end diff --git a/packages/lifecycles/methods/unregister-all.luau b/packages/lifecycles/methods/unregister-all.luau index 5e6235af..ab933d31 100644 --- a/packages/lifecycles/methods/unregister-all.luau +++ b/packages/lifecycles/methods/unregister-all.luau @@ -4,7 +4,7 @@ local types = require("../types") local threadpool = runtime.threadpool -local function clear(lifecycle: types.Self) +local function clear(lifecycle: types.Lifecycle) if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end diff --git a/packages/lifecycles/methods/unregister.luau b/packages/lifecycles/methods/unregister.luau index 0ca7223f..347e80e4 100644 --- a/packages/lifecycles/methods/unregister.luau +++ b/packages/lifecycles/methods/unregister.luau @@ -4,7 +4,7 @@ local types = require("../types") local threadpool = runtime.threadpool -local function unregister(lifecycle: types.Self, callback: (Args...) -> ()) +local function unregister(lifecycle: types.Lifecycle, callback: (Args...) -> ()) if lifecycle._isDestroyed then logger:fatalError({ template = logger.useAfterDestroy }) end diff --git a/packages/lifecycles/types.luau b/packages/lifecycles/types.luau index f2931b52..a829f769 100644 --- a/packages/lifecycles/types.luau +++ b/packages/lifecycles/types.luau @@ -1,4 +1,8 @@ export type Lifecycle = { + _isDestroyed: boolean, + _selfRegistered: { (callback: (Args...) -> ()) -> () }, + _selfUnregistered: { (callback: (Args...) -> ()) -> () }, + type: "Lifecycle", callbacks: { (Args...) -> () }, @@ -14,10 +18,4 @@ export type Lifecycle = { destroy: (self: Lifecycle) -> (), } -export type Self = Lifecycle & { - _isDestroyed: boolean, - _selfRegistered: { (callback: (Args...) -> ()) -> () }, - _selfUnregistered: { (callback: (Args...) -> ()) -> () }, -} - return nil diff --git a/packages/logger/allow-web-links.luau b/packages/logger/allow-web-links.luau index dcd0bb82..7ddb1472 100644 --- a/packages/logger/allow-web-links.luau +++ b/packages/logger/allow-web-links.luau @@ -1,5 +1 @@ -local runtime = require("../runtime") - -local allowWebLinks = if runtime.name == "roblox" then game:GetService("RunService"):IsStudio() else true - -return allowWebLinks +return game:GetService("RunService"):IsStudio() diff --git a/packages/logger/create.luau b/packages/logger/create.luau index 943aab25..86f330e8 100644 --- a/packages/logger/create.luau +++ b/packages/logger/create.luau @@ -18,7 +18,8 @@ local function create(label: string, errorInfoUrl: string?, templates: T): ty end function self:error(log) - task.spawn(error, label .. formatLog(self, log, errorInfoUrl), 0) + -- LUAU: ...YOU CANT ERROR A STRING ANYMORE?? + task.spawn(error, label .. formatLog(self, log, errorInfoUrl) :: any, 0) end function self:fatalError(log) diff --git a/packages/logger/format-log.luau b/packages/logger/format-log.luau index 3eeda21b..3fea2d61 100644 --- a/packages/logger/format-log.luau +++ b/packages/logger/format-log.luau @@ -1,7 +1,7 @@ local types = require("./types") local function formatLog(self: types.Logger, log: types.Log, errorInfoUrl: string?): string - local formattedTemplate = string.format(log.template, table.unpack(log)) + local formattedTemplate = string.format(log.template :: any, table.unpack(log)) local error = log.error local trace: string? = log.trace @@ -37,7 +37,7 @@ local function formatLog(self: types.Logger, log: types.Lo end -- Labels are added from createLogger, so we don't add it here - return string.gsub(formattedTemplate, "\n", "\n ") + return (string.gsub(formattedTemplate, "\n", "\n ")) end return formatLog diff --git a/packages/logger/index.d.ts b/packages/logger/index.d.ts deleted file mode 100644 index 85251a07..00000000 --- a/packages/logger/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare namespace Logger { - export interface Error { - type: "Error"; - raw: string; - message: string; - trace: string; - } - - interface LogProps { - template: string; - error?: Error; - trace?: string; - } - - export type Log = LogProps & unknown[]; - - interface LoggerProps { - print(props: Log): void; - warn(props: Log): void; - error(props: Log): void; - fatalError(props: Log): never; - } - - export type Logger> = LoggerProps & Templates; - - export function create>( - label: string, - errorInfoUrl: string | undefined, - templates: Templates - ): Logger; - - export function formatLog>( - logger: Logger, - log: Log, - errorInfoUrl?: string - ): string; - - export function parseError(err: string): Error; - - export const allowWebLinks: boolean; - export function standardErrorInfoUrl(label: string): string; -} - -export = Logger; -export as namespace Logger; diff --git a/packages/logger/parse-error.luau b/packages/logger/parse-error.luau index e43fe53d..95218207 100644 --- a/packages/logger/parse-error.luau +++ b/packages/logger/parse-error.luau @@ -4,7 +4,7 @@ local function parseError(err: string): types.Error return { type = "Error", raw = err, - message = err:gsub("^.+:%d+:%s*", ""), + message = string.gsub(err, "^.+:%d+:%s*", ""), trace = debug.traceback(nil, 2), } end diff --git a/packages/providers/create.luau b/packages/providers/create.luau index 016b8a6d..dd44dbd5 100644 --- a/packages/providers/create.luau +++ b/packages/providers/create.luau @@ -14,7 +14,7 @@ local function createProvider(self: Self): types.Provider end if provider.new == nil then - function provider.new(dependencies) + provider.new = function(dependencies) local self: types.Provider = setmetatable({}, provider) :: any if provider.constructor then return provider.constructor(self, dependencies) or self diff --git a/packages/providers/index.d.ts b/packages/providers/index.d.ts deleted file mode 100644 index 2ab36e15..00000000 --- a/packages/providers/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Dependency } from "../dependencies"; - -declare namespace providers { - export type Provider = Dependency< - Self & { - __index: Provider; - name?: string; - constructor?(dependencies: Dependencies): void; - start?(): void; - destroy?(): void; - }, - Dependencies - >; - - // Class decorator syntax - export function create InstanceType>(self: Self): Provider; - // Normal syntax - export function create(self: Self): Provider; - - export function nameOf(provider: Provider): string; - - export namespace _ { - export const providerClasses: Set>; - } - - export interface Start { - start(): void; - } - - export interface Destroy { - destroy(): void; - } -} - -export = providers; -export as namespace providers; diff --git a/packages/prvdmwrong/index.d.ts b/packages/prvdmwrong/index.d.ts deleted file mode 100644 index 2058129c..00000000 --- a/packages/prvdmwrong/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import dependencies from "../dependencies"; -import lifecycles from "../lifecycles"; -import providers from "../providers"; -import roots from "../roots"; - -declare namespace prvd { - export type Provider = providers.Provider; - export interface Lifecycle extends lifecycles.Lifecycle { } - export type SubdependenciesOf = dependencies.SubdependenciesOf; - export interface Root extends roots.Root { } - export interface StartedRoot extends roots.StartedRoot { } - - export interface Start extends providers.Start { } - export interface Destroy extends providers.Destroy { } - - export const provider: typeof providers.create; - export const root: typeof roots.create; - export const depend: typeof dependencies.depend; - export const nameOf: typeof providers.nameOf; - - export const lifecycle: typeof lifecycles.create; - export const fireConcurrent: typeof lifecycles.handlers.fireConcurrent; - export const fireSequential: typeof lifecycles.handlers.fireSequential; - - export namespace hooks { - export const onLifecycleConstructed: typeof lifecycles.hooks.onLifecycleConstructed; - export const onLifecycleDestroyed: typeof lifecycles.hooks.onLifecycleDestroyed; - export const onLifecycleRegistered: typeof lifecycles.hooks.onLifecycleRegistered; - export const onLifecycleUnregistered: typeof lifecycles.hooks.onLifecycleUnregistered; - - export const onLifecycleUsed: typeof roots.hooks.onLifecycleUsed; - export const onProviderUsed: typeof roots.hooks.onProviderUsed; - export const onRootUsed: typeof roots.hooks.onRootUsed; - export const onRootConstructing: typeof roots.hooks.onRootConstructing; - export const onRootStarted: typeof roots.hooks.onRootStarted; - export const onRootFinished: typeof roots.hooks.onRootFinished; - export const onRootDestroyed: typeof roots.hooks.onRootDestroyed; - } -} - -export = prvd; -export as namespace prvd; diff --git a/packages/prvdmwrong/init.luau b/packages/prvdmwrong/init.luau index 413e2258..1381801d 100644 --- a/packages/prvdmwrong/init.luau +++ b/packages/prvdmwrong/init.luau @@ -34,11 +34,12 @@ local prvd = { }), } -local mt = {} +type PrvdModule = ((provider: Self) -> Provider) & typeof(prvd) +local mt = {} function mt.__call(_, provider: Self): providers.Provider return providers.create(provider) :: any end -table.freeze(mt) -return setmetatable(prvd, mt) +local module: PrvdModule = setmetatable(prvd, mt) :: any +return module diff --git a/packages/rbx-components/component-classes.luau b/packages/rbx-components/component-classes.luau deleted file mode 100644 index 0dcdb30a..00000000 --- a/packages/rbx-components/component-classes.luau +++ /dev/null @@ -1,7 +0,0 @@ -local types = require("./types") - -type Set = { [T]: true } - -local componentClasses: Set> = setmetatable({}, { __mode = "k" }) :: any - -return componentClasses diff --git a/packages/rbx-components/component-provider.luau b/packages/rbx-components/component-provider.luau deleted file mode 100644 index 85af0d0d..00000000 --- a/packages/rbx-components/component-provider.luau +++ /dev/null @@ -1,185 +0,0 @@ -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]: true } -type ConstructedComponent = types.AnyComponent -type LuauBug = any - -local ComponentProvider = {} -ComponentProvider.priority = -math.huge -ComponentProvider.name = "@rbx-components" - -function ComponentProvider.constructor(self: ComponentProvider) - self.componentClasses = {} :: Set - self.tagToComponentClasses = {} :: { [string]: Set } - self.instanceToComponents = {} :: { [Instance]: { [types.AnyComponent]: ConstructedComponent } } - self.componentToInstances = {} :: { [types.AnyComponent]: Set? } - self.constructedToClass = {} :: { [ConstructedComponent]: types.AnyComponent? } - - self._destroyingConnections = {} :: { [Instance]: RBXScriptConnection } - self._connections = {} :: { RBXScriptConnection } -end - -function ComponentProvider.start(self: ComponentProvider) - for tag, components in self.tagToComponentClasses do - local function onTagAdded(instance) - local instanceToComponents = self.instanceToComponents[instance] - if not instanceToComponents then - instanceToComponents = {} - self.instanceToComponents[instance] = instanceToComponents - end - - for componentClass in components do - if - (componentClass.blacklistInstances and (componentClass.blacklistInstances :: LuauBug)[instance]) - or (componentClass.whitelistInstances and not (componentClass.whitelistInstances :: LuauBug)[instance]) - or (componentClass.instanceCheck and not componentClass.instanceCheck(instance)) - then - continue - end - - local component: ConstructedComponent = instanceToComponents[componentClass] - if not component then - component = componentClass.new(instance) - instanceToComponents[componentClass] = component - self.constructedToClass[component :: any] = componentClass - end - - if component.added then - component:added() - end - end - - if not self._destroyingConnections[instance] then - self._destroyingConnections[instance] = instance.Destroying:Once(function() - for _, component in instanceToComponents do - if component.destroy then - threadpool.spawn(component.destroy, component) - end - end - table.clear(instanceToComponents) - self.instanceToComponents[instance] = nil - end) - end - end - - table.insert(self._connections, CollectionService:GetInstanceAddedSignal(tag):Connect(onTagAdded)) - table.insert(self._connections, CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) end)) - - for _, instance in CollectionService:GetTagged(tag) do - onTagAdded(instance) - end - end -end - -function ComponentProvider.destroy(self: ComponentProvider) - for _, components in self.instanceToComponents do - for _, component in components do - if component.destroy then - component:destroy() - end - end - table.clear(components) - end - - table.clear(self.componentClasses) - table.clear(self.tagToComponentClasses) - table.clear(self.instanceToComponents) - table.clear(self.componentToInstances) - table.clear(self.constructedToClass) - - for _, connection in self._connections do - if connection.Connected then - connection:Disconnect() - end - end - - for _, connection in self._destroyingConnections do - if connection.Connected then - connection:Disconnect() - end - end - - table.clear(self._connections) - table.clear(self._destroyingConnections) -end - -function ComponentProvider.addComponentClass(self: ComponentProvider, class: types.AnyComponent) - if not componentClasses[class] then - logger:fatalError({ template = logger.invalidComponent }) - end - - if self.componentClasses[class] then - logger:fatalError({ template = logger.alreadyRegisteredComponent }) - end - - if class.tag then - local tagToComponentClasses = self.tagToComponentClasses[class.tag] - - if tagToComponentClasses then - if not _G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG and #tagToComponentClasses > 0 then - logger:warn({ template = logger.multipleSameTag, class.tag }) - end - else - tagToComponentClasses = {} - self.tagToComponentClasses[class.tag] = tagToComponentClasses - end - - (tagToComponentClasses :: any)[class] = true - end - - self.componentClasses[class] = true - self.componentToInstances[class] = {} -end - -function ComponentProvider.getFromInstance( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - return self.instanceToComponents[instance :: any][class] -end - -function ComponentProvider.getAllComponents( - self: ComponentProvider, - class: types.Component -): Set> - local result = {} - for _, components in self.instanceToComponents do - for _, component in components do - if self.constructedToClass[component] == class then - result[component] = true - end - end - end - return result :: any -end - -function ComponentProvider.addComponent( - self: ComponentProvider, - class: types.Component, - instance: I -): types.Component? - error("not yet implemented") -end - -function ComponentProvider.removeComponent(self: ComponentProvider, class: types.Component, instance: I) - local constructed = self:getFromInstance(class, instance) - if constructed then - self.instanceToComponents[instance :: any][class] = nil - - if constructed.removed then - threadpool.spawn(constructed.removed :: any, constructed, instance) - end - end -end - -export type ComponentProvider = typeof(ComponentProvider) -return providers.create(ComponentProvider) diff --git a/packages/rbx-components/create.luau b/packages/rbx-components/create.luau deleted file mode 100644 index 24d39a3b..00000000 --- a/packages/rbx-components/create.luau +++ /dev/null @@ -1,28 +0,0 @@ -local componentClasses = require("./component-classes") -local types = require("./types") - --- TODO: prvdmwrong/classes package? -local function create(self: Self): types.Component - local component: types.Component = self :: any - - if component.__index == nil then - component.__index = component - end - - -- TODO: abstract nameOf - - if component.new == nil then - function component.new(instance: any) - local self: types.Component = setmetatable({}, component) :: any - if component.constructor then - return component.constructor(self, instance) or self - end - return self - end - end - - componentClasses[component] = true - return component -end - -return create diff --git a/packages/rbx-components/extend-root/create-component-class-provider.luau b/packages/rbx-components/extend-root/create-component-class-provider.luau deleted file mode 100644 index 9d5ae999..00000000 --- a/packages/rbx-components/extend-root/create-component-class-provider.luau +++ /dev/null @@ -1,31 +0,0 @@ -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.dependencies = table.freeze({ - componentProvider = ComponentProvider, -}) - -ComponentClassProvider._components = {} :: { types.AnyComponent } - -function ComponentClassProvider.constructor( - self: ComponentClassProvider, - dependencies: typeof(ComponentClassProvider.dependencies) -) - for _, class in self._components do - dependencies.componentProvider:addComponentClass(class) - end -end - -export type ComponentClassProvider = typeof(ComponentClassProvider) - -local function createComponentClassProvider(components: { types.AnyComponent }) - local provider = table.clone(ComponentClassProvider) - provider._components = components - return providers.create(provider) -end - -return createComponentClassProvider diff --git a/packages/rbx-components/extend-root/init.luau b/packages/rbx-components/extend-root/init.luau deleted file mode 100644 index 6e9f0578..00000000 --- a/packages/rbx-components/extend-root/init.luau +++ /dev/null @@ -1,30 +0,0 @@ -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 = require("@self/use-components") -local useModuleAsComponent = require("@self/use-module-as-component") -local useModulesAsComponents = require("@self/use-modules-as-components") - -local function extendRoot(root: types.RootPrivate): types.Root - if root._hasComponentExtensions then - return logger:fatalError({ template = logger.alreadyExtendedRoot }) - end - - root._hasComponentExtensions = true - root._classes = {} - - root:useProvider(ComponentProvider) - root:useProvider(createComponentClassProvider(root._classes)) - - root.useComponent = useComponent :: any - root.useComponents = useComponents :: any - root.useModuleAsComponent = useModuleAsComponent :: any - root.useModulesAsComponents = useModulesAsComponents :: any - - return root -end - -return extendRoot :: (root: roots.Root) -> types.Root diff --git a/packages/rbx-components/extend-root/use-component.luau b/packages/rbx-components/extend-root/use-component.luau deleted file mode 100644 index b0bd8d1f..00000000 --- a/packages/rbx-components/extend-root/use-component.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -local function useComponent(root: types.RootPrivate, component: types.AnyComponent) - table.insert(root._classes, component) - return root -end - -return useComponent diff --git a/packages/rbx-components/extend-root/use-components.luau b/packages/rbx-components/extend-root/use-components.luau deleted file mode 100644 index 809a4006..00000000 --- a/packages/rbx-components/extend-root/use-components.luau +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/packages/rbx-components/extend-root/use-module-as-component.luau b/packages/rbx-components/extend-root/use-module-as-component.luau deleted file mode 100644 index 46724fe7..00000000 --- a/packages/rbx-components/extend-root/use-module-as-component.luau +++ /dev/null @@ -1,12 +0,0 @@ -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 useModuleAsComponent diff --git a/packages/rbx-components/extend-root/use-modules-as-components.luau b/packages/rbx-components/extend-root/use-modules-as-components.luau deleted file mode 100644 index bababafa..00000000 --- a/packages/rbx-components/extend-root/use-modules-as-components.luau +++ /dev/null @@ -1,28 +0,0 @@ -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") then - continue - end - - if predicate and not predicate(module) then - continue - end - - local required = (require)(module) - if componentClasses[required] then - table.insert(root, required) - end - end - return root -end - -return useModulesAsComponents diff --git a/packages/rbx-components/init.luau b/packages/rbx-components/init.luau deleted file mode 100644 index 598bcea4..00000000 --- a/packages/rbx-components/init.luau +++ /dev/null @@ -1,24 +0,0 @@ -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 = types.Component -export type Root = types.Root - -local components = { - create = create, - extendRoot = extendRoot, - _ = table.freeze({ - componentClasses = componentClasses, - }), -} - -local mt = {} - -function mt.__call(_, component: Self): types.Component - return create(component) -end - -table.freeze(mt) -return table.freeze(setmetatable(components, mt)) diff --git a/packages/rbx-components/logger.luau b/packages/rbx-components/logger.luau deleted file mode 100644 index edcc7fac..00000000 --- a/packages/rbx-components/logger.luau +++ /dev/null @@ -1,8 +0,0 @@ -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)`.", - alreadyRegisteredComponent = "Component already registered.", - multipleSameTag = "Multiple components use the CollectionService tag '%s', which is likely a mistake. Supress this warning with `_G.PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG = true`.", -}) diff --git a/packages/rbx-components/prvd.config.luau b/packages/rbx-components/prvd.config.luau deleted file mode 100644 index 7d6f179c..00000000 --- a/packages/rbx-components/prvd.config.luau +++ /dev/null @@ -1,15 +0,0 @@ -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, - }), -}) diff --git a/packages/rbx-components/types.luau b/packages/rbx-components/types.luau deleted file mode 100644 index 5bc17dcf..00000000 --- a/packages/rbx-components/types.luau +++ /dev/null @@ -1,30 +0,0 @@ -local dependencies = require("../dependencies") -local roots = require("../roots") - -export type Component = dependencies.Dependency, - tag: string?, - instanceCheck: (unknown) -> boolean, - blacklistInstances: { Instance }?, - whitelistInstances: { Instance }?, - constructor: (self: Component, instance: Instance) -> ()?, - added: (self: Component) -> ()?, - removed: (self: Component) -> ()?, - destroyed: (self: Component) -> ()?, -}, nil, Instance> - -export type Root = roots.Root & { - useModuleAsComponent: (root: Root, module: ModuleScript) -> Root, - useModulesAsComponents: (root: Root, modules: { Instance }, predicate: ((ModuleScript) -> boolean)?) -> Root, - useComponent: (root: Root, component: Component) -> Root, - useComponents: (root: Root, components: { Component }) -> Root, -} - -export type RootPrivate = Root & { - _hasComponentExtensions: true?, - _classes: { Component }, -} - -export type AnyComponent = Component - -return nil diff --git a/packages/rbx-lifecycles/index.d.ts b/packages/rbx-lifecycles/index.d.ts deleted file mode 100644 index 3ad36447..00000000 --- a/packages/rbx-lifecycles/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace RbxLifecycles { - export const RbxLifecycles: Provider<{ - preSimulation: Lifecycle<[dt: number]>; - postSimulation: Lifecycle<[dt: number]>; - preAnimation: Lifecycle<[dt: number]>; - preRender: Lifecycle<[dt: number]>; - playerAdded: Lifecycle<[player: Player]>; - playerRemoving: Lifecycle<[player: Player]>; - }>; - - export interface PreSimulation { - preSimulation(dt: number): void; - } - - export interface PostSimulation { - postSimulation(dt: number): void; - } - - export interface PreAnimation { - preAnimation(dt: number): void; - } - - export interface PreRender { - preRender(dt: number): void; - } - - export interface PlayerAdded { - playerAdded(player: Player): void; - } - - export interface PlayerRemoving { - playerRemoving(player: Player): void; - } -} - -export = RbxLifecycles; -export as namespace RbxLifecycles; diff --git a/packages/roots/index.d.ts b/packages/roots/index.d.ts deleted file mode 100644 index d8e100c5..00000000 --- a/packages/roots/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Lifecycle } from "../lifecycles"; -import { Provider } from "../providers"; - -declare namespace roots { - export type Root = { - type: "Root"; - - start(): StartedRoot; - - useModule(module: ModuleScript): Root; - useModules(modules: Instance[], predicate?: (module: ModuleScript) => boolean): Root; - useRoot(root: Root): Root; - useRoots(roots: Root[]): Root; - useProvider(provider: Provider): Root; - useProviders(providers: Provider[]): Root; - useLifecycle(lifecycle: Lifecycle): Root; - useLifecycles(lifecycles: Lifecycle): Root; - destroy(): void; - - willStart(callback: () => void): Root; - willFinish(callback: () => void): Root; - }; - - export type StartedRoot = { - type: "StartedRoot"; - - finish(): void; - }; - - export function create(): Root; - - export namespace hooks { - export function onLifecycleUsed(listener: (lifecycle: Lifecycle) => void): () => void; - export function onProviderUsed(listener: (provider: Provider) => void): () => void; - export function onRootUsed(listener: (root: Root, subRoot: Root) => void): () => void; - - export function onRootConstructing(listener: (root: Root) => void): () => void; - export function onRootStarted(listener: (root: Root) => void): () => void; - export function onRootFinished(listener: (root: Root) => void): () => void; - export function onRootDestroyed(listener: (root: Root) => void): () => void; - } -} - -export = roots; -export as namespace roots; diff --git a/packages/roots/methods/start.luau b/packages/roots/methods/start.luau index 3f24dac5..1da105cb 100644 --- a/packages/roots/methods/start.luau +++ b/packages/roots/methods/start.luau @@ -6,38 +6,34 @@ local rootFinished = require("../hooks/root-finished").callbacks local rootStarted = require("../hooks/root-started").callbacks local types = require("../types") -local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) - local lifecycleMethod = (provider :: any)[lifecycle.method] +local function bindLifecycle(lifecycle: lifecycles.Lifecycle<...any>, provider: providers.Provider) + local lifecycleMethod: (self: any, ...any) -> () = (provider :: any)[lifecycle.method] if typeof(lifecycleMethod) == "function" then - -- local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES - - -- if isProfiling then - -- lifecycle:register(function(...) - -- debug.profilebegin(memoryCategory) - -- debug.setmemorycategory(memoryCategory) - -- lifecycleMethod(provider, ...) - -- debug.resetmemorycategory() - -- debug.profileend() - -- end) - -- else - lifecycle:register(function(...) - lifecycleMethod(provider, ...) - end) - -- end + local isProfiling = _G.PRVDMWRONG_PROFILE_LIFECYCLES + + if isProfiling then + lifecycle:register(function(...) + local memoryCategory = providers.nameOf(provider) .. ":" .. lifecycle.method + debug.profilebegin(memoryCategory) + debug.setmemorycategory(memoryCategory) + lifecycleMethod(provider, ...) + debug.resetmemorycategory() + debug.profileend() + end) + else + lifecycle:register(function(...) + lifecycleMethod(provider, ...) + end) + end end end - -local function nameOf(provider: providers.Provider, extension: string?): string - return if extension then `{tostring(provider)}.{extension}` else tostring(provider) -end - local function start(root: types.Self): types.StartedRoot - local processed = dependencies.processDependencies(root._rootProviders) + local processed = dependencies.processDependencies(root._rootProviders :: any) local sortedProviders = processed.sortedDependencies :: { providers.Provider } local processedLifecycles = processed.lifecycles table.move(root._rootLifecycles, 1, #root._rootLifecycles, #processedLifecycles + 1, processedLifecycles) - dependencies.sortByPriority(sortedProviders) + dependencies.sortByPriority(sortedProviders :: any) local constructedProviders = {} for _, provider in sortedProviders do @@ -49,7 +45,7 @@ local function start(root: types.Self): types.StartedRoot end end - local constructed = provider.new(providerDependencies) + local constructed = (provider.new :: any)(providerDependencies) constructedProviders[provider] = constructed bindLifecycle(root._start, constructed) bindLifecycle(root._finish, constructed) @@ -73,7 +69,8 @@ local function start(root: types.Self): types.StartedRoot function startedRoot:finish() if didFinish then - return logger:fatalError({ template = logger.alreadyFinished }) + logger:fatalError({ template = logger.alreadyFinished }) + return end didFinish = true diff --git a/packages/runtime/batteries/threadpool.luau b/packages/runtime/batteries/threadpool.luau index 6caf08b4..5b73229b 100644 --- a/packages/runtime/batteries/threadpool.luau +++ b/packages/runtime/batteries/threadpool.luau @@ -1,5 +1,3 @@ -local task = require("../libs/task") - local freeThreads: { thread } = {} local function run(f: (T...) -> (), thread: thread, ...) @@ -9,7 +7,7 @@ end local function yielder() while true do - run(coroutine.yield()) + (run :: any)(coroutine.yield()) end end diff --git a/packages/runtime/implementations/init.luau b/packages/runtime/implementations/init.luau deleted file mode 100644 index 28dbe015..00000000 --- a/packages/runtime/implementations/init.luau +++ /dev/null @@ -1,56 +0,0 @@ -local types = require("@self/../types") - -type Implementation = { 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/lune"), - lute = require("@self/lute"), - seal = require("@self/seal"), - zune = require("@self/zune"), -}) - -local currentRuntime: types.Runtime = nil -do - for _, runtime in supportedRuntimes :: { [string]: types.Runtime } do - local isRuntime = runtime.is() - if isRuntime then - local currentRuntimePriority = currentRuntime and currentRuntime.priority or 0 - local runtimePriority = runtime.priority or 0 - if currentRuntimePriority <= runtimePriority then - currentRuntime = runtime - end - end - end - assert(currentRuntime, "No supported runtime") -end - -local currentRuntimeName: RuntimeName = currentRuntime.name :: any - -local function notImplemented(functionName: string) - return function() - error(`'{functionName}' is not implemented by runtime '{currentRuntimeName}'`, 2) - end -end - -local function implementFunction(label: string, implementations: { [types.Runtime]: Implementation? }): T - local implementation = implementations[currentRuntime] - if implementation then - if implementation.new then - return implementation.new() - elseif implementation.implementation then - return implementation.implementation - end - end - return notImplemented(label) :: any -end - -return table.freeze({ - supportedRuntimes = supportedRuntimes, - currentRuntime = currentRuntime, - currentRuntimeName = currentRuntimeName, - implementFunction = implementFunction, -}) diff --git a/packages/runtime/implementations/init.spec.luau b/packages/runtime/implementations/init.spec.luau deleted file mode 100644 index 3ce91cbb..00000000 --- a/packages/runtime/implementations/init.spec.luau +++ /dev/null @@ -1,81 +0,0 @@ -local implementations = require("@self/../implementations") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("currentRuntime", function() - test("detects lune runtime", function() - expect(implementations.currentRuntimeName).is("lune") - expect(implementations.currentRuntime).is(implementations.supportedRuntimes.lune) - end) - end) - - describe("implementFunction", function() - test("implements for lune runtime", function() - local lune = function() end - local luau = function() end - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - implementation = lune, - }, - [implementations.supportedRuntimes.luau] = { - implementation = luau, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - end) - - test("constructs for lune runtime", function() - local lune = function() end - local luau = function() end - - local constructedLune = false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.lune] = { - new = function() - constructedLune = true - return lune - end, - }, - [implementations.supportedRuntimes.luau] = { - new = function() - return luau - end, - }, - }) - - expect(implementation).is_a("function") - expect(implementation).never_is(luau) - expect(implementation).is(lune) - expect(constructedLune).is_true() - end) - - test("defaults to not implemented function", function() - local constructSuccess, runSuccess = false, false - - local implementation = implementations.implementFunction("implementation", { - [implementations.supportedRuntimes.roblox] = { - new = function() - constructSuccess = true - return function() - runSuccess = true - end - end, - }, - }) - - expect(constructSuccess).is(false) - expect(implementation).is_a("function") - expect(implementation).fails_with("'implementation' is not implemented by runtime 'lune'") - expect(runSuccess).is(false) - end) - end) -end diff --git a/packages/runtime/implementations/luau.luau b/packages/runtime/implementations/luau.luau deleted file mode 100644 index c67e52f4..00000000 --- a/packages/runtime/implementations/luau.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "luau", - priority = -1, - is = function() - return true - end, -}) diff --git a/packages/runtime/implementations/lune.luau b/packages/runtime/implementations/lune.luau deleted file mode 100644 index f49834eb..00000000 --- a/packages/runtime/implementations/lune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/packages/runtime/implementations/lute.luau b/packages/runtime/implementations/lute.luau deleted file mode 100644 index 7b6abc58..00000000 --- a/packages/runtime/implementations/lute.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "lute", - is = function() - return false - end, -}) diff --git a/packages/runtime/implementations/roblox.luau b/packages/runtime/implementations/roblox.luau deleted file mode 100644 index 91a780e2..00000000 --- a/packages/runtime/implementations/roblox.luau +++ /dev/null @@ -1,9 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "roblox", - is = function() - -- wtf - return not not (_VERSION == "Luau" and game and workspace) - end, -}) diff --git a/packages/runtime/implementations/seal.luau b/packages/runtime/implementations/seal.luau deleted file mode 100644 index 0a72684c..00000000 --- a/packages/runtime/implementations/seal.luau +++ /dev/null @@ -1,8 +0,0 @@ -local types = require("../types") - -return types.Runtime({ - name = "seal", - is = function() - return false - end, -}) diff --git a/packages/runtime/implementations/zune.luau b/packages/runtime/implementations/zune.luau deleted file mode 100644 index 48243e05..00000000 --- a/packages/runtime/implementations/zune.luau +++ /dev/null @@ -1,10 +0,0 @@ -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, -}) diff --git a/packages/runtime/index.d.ts b/packages/runtime/index.d.ts deleted file mode 100644 index b227b952..00000000 --- a/packages/runtime/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -declare namespace runtime { - export type RuntimeName = "roblox" | "luau" | "lune" | "lute" | "seal" | "zune"; - - export const name: RuntimeName; - - export namespace task { - export function cancel(thread: thread): void; - - export function defer(functionOrThread: (...args: T) => void, ...args: T): thread; - export function defer(functionOrThread: thread): thread; - export function defer( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function delay( - duration: number, - functionOrThread: (...args: T) => void, - ...args: T - ): thread; - export function delay(duration: number, functionOrThread: thread): thread; - export function delay( - duration: number, - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function spawn(functionOrThread: (...args: T) => void, ...args: T): thread; - export function spawn(functionOrThread: thread): thread; - export function spawn( - functionOrThread: thread | ((...args: T) => void), - ...args: T - ): thread; - - export function wait(duration: number): number; - } - - export function warn(...args: T): void; - - export namespace threadpool { - export function spawn(f: (...args: T) => void, ...args: T): void; - export function spawnCallbacks(functions: ((...args: T) => void)[], ...args: T): void; - } -} - -export = runtime; -export as namespace runtime; diff --git a/packages/runtime/init.luau b/packages/runtime/init.luau index 26bdeee0..20498372 100644 --- a/packages/runtime/init.luau +++ b/packages/runtime/init.luau @@ -1,12 +1,8 @@ -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 +-- TODO 0.3: support other runtimes return table.freeze({ - name = implementations.currentRuntimeName, + name = "Roblox", task = task, warn = warn, diff --git a/packages/runtime/libs/task.luau b/packages/runtime/libs/task.luau deleted file mode 100644 index 28c1ac9e..00000000 --- a/packages/runtime/libs/task.luau +++ /dev/null @@ -1,157 +0,0 @@ -local implementations = require("../implementations") - -export type TaskLib = { - cancel: (thread) -> (), - defer: (functionOrThread: thread | (T...) -> (), T...) -> thread, - delay: (duration: number, functionOrThread: thread | (T...) -> (), T...) -> thread, - spawn: (functionOrThread: thread | (T...) -> (), T...) -> thread, - wait: (duration: number?) -> number, -} - -local supportedRuntimes = implementations.supportedRuntimes -local implementFunction = implementations.implementFunction - -local function defaultSpawn(functionOrThread: thread | (T...) -> (), ...: T...): thread - if type(functionOrThread) == "thread" then - coroutine.resume(functionOrThread, ...) - return functionOrThread - else - local thread = coroutine.create(functionOrThread) - coroutine.resume(thread, ...) - return thread - end -end - -local function defaultWait(seconds: number?) - local startTime = os.clock() - local endTime = startTime + (seconds or 1) - local clockTime: number - repeat - clockTime = os.clock() - until clockTime >= endTime - return clockTime - startTime -end - -local task: TaskLib = table.freeze({ - cancel = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.cancel - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").cancel - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").cancel - end, - }, - [supportedRuntimes.luau] = { - implementation = function(thread) - if not coroutine.close(thread) then - error(debug.traceback(thread, "Could not cancel thread")) - end - end, - }, - }), - defer = implementFunction("task.defer", { - [supportedRuntimes.roblox] = { - new = function() - return task.defer :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").defer - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").defer - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - delay = implementFunction("task.delay", { - [supportedRuntimes.roblox] = { - new = function() - return task.delay :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").delay - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").delay - end, - }, - [supportedRuntimes.luau] = { - implementation = function(duration: number, functionOrThread: thread | (T...) -> (), ...: T...): thread - return defaultSpawn( - if typeof(functionOrThread) == "function" - then function(duration, functionOrThread, ...) - defaultWait(duration) - functionOrThread(...) - end - else function(duration, functionOrThread, ...) - defaultWait(duration) - coroutine.resume(...) - end, - duration, - functionOrThread, - ... - ) - end, - }, - }), - spawn = implementFunction("task.spawn", { - [supportedRuntimes.roblox] = { - new = function() - return task.spawn :: any - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").spawn - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").spawn - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultSpawn, - }, - }), - wait = implementFunction("task.wait", { - [supportedRuntimes.roblox] = { - new = function() - return task.wait - end, - }, - [supportedRuntimes.lune] = { - new = function() - return require("@lune/task").wait - end, - }, - [supportedRuntimes.zune] = { - new = function() - return require("@zcore/task").wait - end, - }, - [supportedRuntimes.luau] = { - implementation = defaultWait, - }, - }), -}) - -return task diff --git a/packages/runtime/libs/task.spec.luau b/packages/runtime/libs/task.spec.luau deleted file mode 100644 index 0918e87f..00000000 --- a/packages/runtime/libs/task.spec.luau +++ /dev/null @@ -1,62 +0,0 @@ -local luneTask = require("@lune/task") -local task = require("./task") -local tiniest = require("@lune-lib/tiniest/tiniest_for_lune") - --- FIXME: can't async stuff lol -return function(tiniest: tiniest.Configured): () - local test = tiniest.test - local expect = tiniest.expect - local describe = tiniest.describe - - describe("task", function() - test("spawn", function() - expect(task.spawn).is(luneTask.spawn) - local spawned = false - - task.spawn(function() - spawned = true - end) - - expect(spawned).is_true() - end) - - test("defer", function() - expect(task.defer).is(luneTask.defer) - - -- local spawned = false - - -- task.defer(function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - end) - - test("delay", function() - expect(task.delay).is(luneTask.delay) - -- local spawned = false - - -- task.delay(0.25, function() - -- spawned = true - -- end) - - -- expect(spawned).never_is_true() - - -- local startTime = os.clock() - -- repeat - -- until os.clock() - startTime > 0.5 - - -- print(spawned) - - -- expect(spawned).is_true() - end) - - test("wait", function() - expect(task.wait).is(luneTask.wait) - end) - - test("cancel", function() - expect(task.cancel).is(luneTask.cancel) - end) - end) -end diff --git a/packages/runtime/libs/warn.luau b/packages/runtime/libs/warn.luau deleted file mode 100644 index 6a4837ac..00000000 --- a/packages/runtime/libs/warn.luau +++ /dev/null @@ -1,27 +0,0 @@ -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(index, ...))) - end - return table.concat(stringified, " ") -end - -local warn: (T...) -> () = implementFunction("warn", { - [supportedRuntimes.roblox] = { - new = function() - return warn - end, - }, - [supportedRuntimes.luau] = { - implementation = function(...: T...) - print(`\27[0;33m{tostringTuple(...)}\27[0m`) - end, - }, -}) - -return warn diff --git a/prvd.config.luau b/prvd.config.luau index 9282af01..0d08e9d7 100644 --- a/prvd.config.luau +++ b/prvd.config.luau @@ -1,17 +1,17 @@ -local configure = require("@lune-lib/configure") +-- local configure = require("@lune-lib/configure") -return configure.root({ - repository = "https://github.com/prvdmwrong/prvdmwrong", - homepage = "https://prvdmwrong.luau.page/latest/", - packageDir = "packages", - defaults = { - authors = { "Fire " }, - license = "MPL-2.0", - version = "0.2.0-rc.4", - }, - publishers = { - pesde = configure.publisher({ scope = "prvdmwrong", registry = "https://github.com/pesde-pkg/index" }), - wally = configure.publisher({ scope = "prvdmwrong", registry = "https://github.com/upliftgames/wally-index" }), - npm = configure.publisher({ scope = "prvdmwrong", registry = "" }), - }, -}) +-- return configure.root({ +-- repository = "https://github.com/prvdmwrong/prvdmwrong", +-- homepage = "https://prvdmwrong.luau.page/latest/", +-- packageDir = "packages", +-- defaults = { +-- authors = { "Fire " }, +-- license = "MPL-2.0", +-- version = "0.2.0-rc.4", +-- }, +-- publishers = { +-- pesde = configure.publisher({ scope = "prvdmwrong", registry = "https://github.com/pesde-pkg/index" }), +-- wally = configure.publisher({ scope = "prvdmwrong", registry = "https://github.com/upliftgames/wally-index" }), +-- npm = configure.publisher({ scope = "prvdmwrong", registry = "" }), +-- }, +-- }) diff --git a/rokit.toml b/rokit.toml index f44178d6..86a146b8 100644 --- a/rokit.toml +++ b/rokit.toml @@ -4,7 +4,7 @@ # New tools can be added by running `rokit add ` in a terminal. [tools] -stylua = "JohnnyMorganz/StyLua@2.3.1" +StyLua = "JohnnyMorganz/StyLua@2.3.1" luau-lsp = "JohnnyMorganz/luau-lsp@1.58.0" rojo = "rojo-rbx/rojo@7.6.1" # Runtimes diff --git a/sitegen/README.md b/sitegen/README.md deleted file mode 100644 index facc8a0d..00000000 --- a/sitegen/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sitegen - -## Usage - -```sh -lune run sitegen watch -``` - -## Acknowledgements - -- -- \ No newline at end of file diff --git a/sitegen/build.luau b/sitegen/build.luau deleted file mode 100644 index c968aaec..00000000 --- a/sitegen/build.luau +++ /dev/null @@ -1,26 +0,0 @@ -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(path(rootPath, "static"), siteUrls.base) - -for _, location in sitemap do - local locationPath = location.path:gsub("^/", ""):gsub("/$", ""):split("/") - local parentPath = table.clone(locationPath) - parentPath[#parentPath] = nil - - local dirPath = path(siteUrls.base, table.unpack(locationPath)) - local filePath = path(dirPath, "index.html") - - print("Rendering page", filePath) - local rendered = h.flatten(location.render(location.props)) - - pcall(fs.writeDir, dirPath) - fs.writeFile(filePath, rendered) -end diff --git a/sitegen/components/article.luau b/sitegen/components/article.luau deleted file mode 100644 index 0141d423..00000000 --- a/sitegen/components/article.luau +++ /dev/null @@ -1,74 +0,0 @@ -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 defaultHeading = h.h6 - -local function Article(props: ArticleSection) - local toc = {} - - local content = { - h.h1(props.title) :: any, - props.content, - } - - local function processSections(sections: { ArticleSection }, depth: number) - for _, section in sections do - table.insert(content, { - (headings[depth] or defaultHeading)(section.title), - section.content :: any, - }) - - if section.sections then - processSections(section.sections, depth + 1) - end - end - end - - if props.sections then - processSections(props.sections, 1) - end - - return Document({ - title = props.title, - extraHead = { - h.link({ rel = "stylesheet", href = siteBaseUrl("stylesheets/article.css") }), - }, - main = { - h.section({ - class = "article-container", - - h.nav({ - class = "article-nav", - }), - - h.article({ - class = "article-content", - content, - }), - - h.div({ - class = "article-toc", - toc, - }), - }), - }, - }) -end - -return Article diff --git a/sitegen/components/button.luau b/sitegen/components/button.luau deleted file mode 100644 index 33c50d6b..00000000 --- a/sitegen/components/button.luau +++ /dev/null @@ -1,15 +0,0 @@ -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 diff --git a/sitegen/components/code-snippet.luau b/sitegen/components/code-snippet.luau deleted file mode 100644 index 4c3a399c..00000000 --- a/sitegen/components/code-snippet.luau +++ /dev/null @@ -1,19 +0,0 @@ -local h = require("@sitegen/h") - -local function CodeSnippet(props: { - language: "lua" | "shell" | "typescript", - - [number]: h.Child, -}) - return h.pre({ - class = `code-snippet`, - - h.code({ - class = `language-{props.language}`, - - table.unpack(props), - }), - }) -end - -return CodeSnippet diff --git a/sitegen/components/document.luau b/sitegen/components/document.luau deleted file mode 100644 index 834159c0..00000000 --- a/sitegen/components/document.luau +++ /dev/null @@ -1,47 +0,0 @@ -local Navbar = require("@sitegen/components/navbar") -local h = require("@sitegen/h") -local siteBaseUrl = require("@sitegen/utils/site-base-url") - -local function Document(props: { - title: string?, - main: h.Child, - header: h.Child?, - extraHead: h.Child?, -}) - return { - "", - h.html({ - lang = "en", - h.head({ - h.meta({ charset = "UTF-8" }), - h.meta({ name = "viewport", content = "width=device-width, initial-scale=1.0" }), - - h.title((if props.title then `{props.title} - ` else "") .. "Prvd 'M Wrong"), - - h.link({ rel = "stylesheet", href = siteBaseUrl("stylesheets/reset.css") }), - h.link({ rel = "stylesheet", href = siteBaseUrl("stylesheets/fonts.css") }), - h.link({ rel = "stylesheet", href = siteBaseUrl("stylesheets/common.css") }), - - h.link({ - rel = "stylesheet", - href = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css", - }), - h.script({ src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js" }), - h.script({ src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/lua.min.js" }), - h.script({ src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/ts.min.js" }), - h.script({ src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/shell.min.js" }), - - props.extraHead :: any, - }), - h.body({ - Navbar(), - props.header and h.header(props.header) :: any, - h.main(props.main), - - h.script("hljs.highlightAll();"), - }), - }), - } -end - -return Document diff --git a/sitegen/components/navbar.luau b/sitegen/components/navbar.luau deleted file mode 100644 index 66448880..00000000 --- a/sitegen/components/navbar.luau +++ /dev/null @@ -1,28 +0,0 @@ -local forEach = require("@sitegen/utils/for-each") -local h = require("@sitegen/h") -local navPages = require("@sitegen/config/nav-pages") -local siteBaseUrl = require("@sitegen/utils/site-base-url") - -local function Navbar() - return h.nav({ - class = "navbar", - - h.div({ - class = "navbar-inner", - - h.a({ - href = siteBaseUrl(""), - "Prvd 'M Wrong", - }), - - forEach(navPages, function(index, page) - return index, h.a({ - href = page.href, - page.title, - }) - end) :: any, - }), - }) -end - -return Navbar diff --git a/sitegen/config/common-urls.luau b/sitegen/config/common-urls.luau deleted file mode 100644 index 80b19b67..00000000 --- a/sitegen/config/common-urls.luau +++ /dev/null @@ -1,3 +0,0 @@ -return { - rossThread = "https://discord.com/channels/385151591524597761/1267055070374268969", -} diff --git a/sitegen/config/nav-pages.luau b/sitegen/config/nav-pages.luau deleted file mode 100644 index 9f2c87ab..00000000 --- a/sitegen/config/nav-pages.luau +++ /dev/null @@ -1,30 +0,0 @@ -local siteBaseUrl = require("@sitegen/utils/site-base-url") - -export type NavPage = { - id: string, - href: string, - title: string, -} - -return { - { - id = "learn", - href = siteBaseUrl("learn"), - title = "Learn", - }, - { - id = "api", - href = siteBaseUrl("api"), - title = "API", - }, - { - id = "releases", - href = siteBaseUrl("releases"), - title = "Releases", - }, - { - id = "blog", - href = siteBaseUrl("blog"), - title = "Blog", - }, -} :: { NavPage } diff --git a/sitegen/config/site-urls.luau b/sitegen/config/site-urls.luau deleted file mode 100644 index 95256e58..00000000 --- a/sitegen/config/site-urls.luau +++ /dev/null @@ -1,6 +0,0 @@ -local path = require("@lune-lib/utils/path") -local process = require("@lune/process") - -return { - base = if process.env.IS_CI then "https://prvdmwrong.luau.page/" else path(process.cwd, "site"), -} diff --git a/sitegen/config/sitemap.luau b/sitegen/config/sitemap.luau deleted file mode 100644 index 0c6b4d1c..00000000 --- a/sitegen/config/sitemap.luau +++ /dev/null @@ -1,15 +0,0 @@ -local h = require("@sitegen/h") - -export type SitemapEntry = { - path: string, - render: (Props) -> h.Child, - props: Props, -} - -local sitemap: { SitemapEntry } = { - { path = "", render = require("@sitegen/pages/index") }, - { path = "learn", render = require("@sitegen/pages/learn/index") }, - { path = "learn/installation", render = require("@sitegen/pages/learn/installation") }, -} - -return sitemap diff --git a/sitegen/h.luau b/sitegen/h.luau deleted file mode 100644 index d363ec47..00000000 --- a/sitegen/h.luau +++ /dev/null @@ -1,133 +0,0 @@ -export type Child = string | { Child } - -local function flatten(child: Child): string - if typeof(child) == "string" then - return child - else - local flat = "" - for _, sub_child in child do - flat ..= flatten(sub_child) - end - return flat - end -end - -local function escape(attribute: string): string - attribute = string.gsub(attribute, "&", "&") - attribute = string.gsub(attribute, "<", "<") - attribute = string.gsub(attribute, ">", ">") - attribute = string.gsub(attribute, "'", "'") - attribute = string.gsub(attribute, '"', """) - return attribute -end - -local function createElement(tag: string) - local function element(props: string | { [unknown]: unknown }) - if typeof(props) == "table" then - local attributes = "" - for key, value in props do - if typeof(key) == "string" then - assert(typeof(value) == "string", "HTML attribute value must be string") - attributes ..= ` {key}="{escape(value)}"` - end - end - return `<{tag}{attributes}>{flatten({ table.unpack(props :: any) })}` - end - - return `<{tag}>{props}` - end - - return element -end - -return table.freeze({ - escape = escape, - flatten = flatten, - - div = createElement("div"), - span = createElement("span"), - h1 = createElement("h1"), - h2 = createElement("h2"), - h3 = createElement("h3"), - h4 = createElement("h4"), - h5 = createElement("h5"), - h6 = createElement("h6"), - p = createElement("p"), - a = createElement("a"), - img = createElement("img"), - button = createElement("button"), - input = createElement("input"), - label = createElement("label"), - textarea = createElement("textarea"), - select = createElement("select"), - option = createElement("option"), - ul = createElement("ul"), - ol = createElement("ol"), - li = createElement("li"), - table = createElement("table"), - tr = createElement("tr"), - td = createElement("td"), - th = createElement("th"), - thead = createElement("thead"), - tbody = createElement("tbody"), - tfoot = createElement("tfoot"), - form = createElement("form"), - br = createElement("br"), - hr = createElement("hr"), - strong = createElement("strong"), - b = createElement("b"), - em = createElement("em"), - i = createElement("i"), - u = createElement("u"), - s = createElement("s"), - sup = createElement("sup"), - sub = createElement("sub"), - small = createElement("small"), - code = createElement("code"), - pre = createElement("pre"), - blockquote = createElement("blockquote"), - nav = createElement("nav"), - header = createElement("header"), - footer = createElement("footer"), - section = createElement("section"), - article = createElement("article"), - aside = createElement("aside"), - main = createElement("main"), - details = createElement("details"), - summary = createElement("summary"), - dialog = createElement("dialog"), - time = createElement("time"), - address = createElement("address"), - mark = createElement("mark"), - progress = createElement("progress"), - meter = createElement("meter"), - caption = createElement("caption"), - figure = createElement("figure"), - figcaption = createElement("figcaption"), - legend = createElement("legend"), - fieldset = createElement("fieldset"), - dfn = createElement("dfn"), - kbd = createElement("kbd"), - var = createElement("var"), - cite = createElement("cite"), - q = createElement("q"), - - html = createElement("html"), - head = createElement("head"), - title = createElement("title"), - meta = createElement("meta"), - link = createElement("link"), - style = createElement("style"), - body = createElement("body"), - - script = createElement("script"), - noscript = createElement("noscript"), - - audio = createElement("audio"), - video = createElement("video"), - source = createElement("source"), - track = createElement("track"), - iframe = createElement("iframe"), - canvas = createElement("canvas"), - svg = createElement("svg"), -}) diff --git a/sitegen/init.luau b/sitegen/init.luau deleted file mode 100644 index 5f42c510..00000000 --- a/sitegen/init.luau +++ /dev/null @@ -1,65 +0,0 @@ -local fs = require("@lune/fs") -local path = require("@lune-lib/utils/path") -local process = require("@lune/process") -local stdio = require("@lune/stdio") -local task = require("@lune/task") - -local sitegenRootPath = path(process.cwd, "sitegen") -local sitePath = path(process.cwd, "site") - -local function watchPaths() - local paths = {} - - local function watch(path: string) - if fs.isDir(path) then - for _, name in fs.readDir(path) do - watch(path .. "/" .. name) - end - elseif fs.isFile(path) then - table.insert(paths, path) - end - end - - watch(sitegenRootPath) - - return paths -end - -local function spawnBuild() - local result = process.exec("lune", { "run", "sitegen/build", sitegenRootPath }) - stdio.write(result.stdout) - stdio.write(result.stderr) - - if not result.ok then - print("Failed to build site") - process.exit(1) - end - - return -end - -if table.find(process.args, "watch") then - local lastModifiedAt = {} - - while task.wait(1) do - local paths = watchPaths() - - local rebuild = false - for _, watched in paths do - local meta = fs.metadata(watched) - if rebuild or lastModifiedAt[watched] ~= meta.modifiedAt then - lastModifiedAt[watched] = meta.modifiedAt - rebuild = true - end - end - - if rebuild then - print(string.rep("\n", 80)) - spawnBuild() - end - end - - return -end - -spawnBuild() diff --git a/sitegen/pages/api/index.luau b/sitegen/pages/api/index.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/index.luau b/sitegen/pages/index.luau deleted file mode 100644 index 277a4130..00000000 --- a/sitegen/pages/index.luau +++ /dev/null @@ -1,97 +0,0 @@ -local Button = require("@sitegen/components/button") -local CodeSnippet = require("@sitegen/components/code-snippet") -local Document = require("@sitegen/components/document") -local h = require("@sitegen/h") -local rootConfig = require("@lune-lib/root-config") -local siteBaseUrl = require("@sitegen/utils/site-base-url") - -local CODE_EXAMPLE = [[ -function MyProvider.constructor( - self: MyProvider, - dependencies: typeof(MyProvider.dependencies) -) - self.value = otherProvider:someMethod() -end - -function MyProvider.start(self: MyProvider) - print("Value:", self.value) -end - -export type MyProvider = typeof(MyProvider) -return prvd(MyProvider)]] - -return function() - return Document({ - header = { - h.div({ - class = "hero-inner", - - h.section({ - class = "hero-lead", - - h.h1("Luau's Unstoppable Force"), - h.p("The Luau provider framework with a fantastic featureset, extensibility, \ - and intuitiveness. Structure Luau projects with service providers. All \ - free from logistical nightmares and zero sprawling mazes of bloaty \ - dependencies."), - - Button({ - href = siteBaseUrl("learn"), - "Get Started", - }), - }), - - h.section({ - class = "hero-supports", - - h.div({ - h.span("Available On"), - h.div({ - class = "hero-supports-icons", - h.a({ - href = "https://github.com/prvdmwrong/prvdmwrong", - }), - h.a({ - href = "https://pesde.dev/packages/prvdmwrong/prvdmwrong/latest/any", - }), - h.a({ - href = "https://wally.run/package/prvdmwrong/prvdmwrong", - }), - h.a({ - href = "https://github.com/prvdmwrong/prvdmwrong", - }), - }), - }), - - h.div({ - h.span("Supported Runtimes"), - h.div({ - class = "hero-supports-icons", - h.a({}), - h.a({}), - h.a({}), - h.a({}), - }), - }), - }), - - h.section({ - class = "hero-code-example", - - CodeSnippet({ - language = "lua", - - CODE_EXAMPLE, - }), - }), - }), - }, - main = { - h.section({}), - h.h1(string.rep("placeholder
", 80)), - }, - extraHead = { - h.link({ rel = "stylesheet", href = siteBaseUrl("stylesheets/landing.css") }), - }, - }) -end diff --git a/sitegen/pages/learn/fundamentals/lifecycles.luau b/sitegen/pages/learn/fundamentals/lifecycles.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/learn/fundamentals/providers.luau b/sitegen/pages/learn/fundamentals/providers.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/learn/fundamentals/roots.luau b/sitegen/pages/learn/fundamentals/roots.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/learn/fundamentals/using-dependencies.luau b/sitegen/pages/learn/fundamentals/using-dependencies.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/learn/index.luau b/sitegen/pages/learn/index.luau deleted file mode 100644 index 9004659b..00000000 --- a/sitegen/pages/learn/index.luau +++ /dev/null @@ -1,61 +0,0 @@ -local Article = require("@sitegen/components/article") -local commonUrls = require("@sitegen/config/common-urls") -local h = require("@sitegen/h") - -return function() - return Article({ - title = "Learn Prvd 'M Wrong", - content = { - h.p("Congratulations on choosing Prvd 'M Wrong, you’re finally making good decisions!"), - h.p("You will learn how to build great projects with Prvd 'M Wrong, even if you never used \ - it before, with advice from maintainers who know Prvd 'M Wrong best."), - }, - sections = { - { - title = "Expectations", - content = { - h.p("Prvd 'M Wrong expects:"), - h.ul({ - h.li("That you're comfortable with the Luau scripting language."), - h.li("That — if you will use Roblox-specific packages — you're familiar with Roblox"), - }), - h.p("Some articles might challenge you more than others. Remember, Prvd 'M Wrong is \ - built with you in mind, but it may still take a bit of time to absorb some \ - concepts. Take your time and explore at your own pace."), - }, - }, - { - title = "Support", - content = { - h.p("Prvd 'M Wrong is built with you in mind and our documentation aims to be as \ - useful and comprehensive as possible. However, you might need specific advice \ - on an issue, perhaps you may want to learn Prvd 'M Wrong through other means, \ - or you caught a bug."), - h.p({ - "Whatever you're looking for, feel free to swing by our ", - h.a({ - href = commonUrls.rossThread, - "dedicated thread over the Roblox OSS Discord server.", - }), - " Maintainers drop in frequently alongside eager \ - Prvd 'M Wrong users.", - }), - }, - }, - { - title = "Using the Documentation", - content = { - h.p("The Prvd 'M Wrong documentation aims to be as useful and comprehensive as \ - possible. You can open the documentation settings by clicking the gear \ - icon in the top right corner."), - h.p("These customization settings will persist between sessions:"), - h.ul({ - h.li("Dark, light and sepia color schemes"), - h.li("Preferred monospace fonts for code snippets"), - h.li("Relevant documentation for Luau and Roblox TypeScript"), - }), - }, - }, - }, - }) -end diff --git a/sitegen/pages/learn/installation.luau b/sitegen/pages/learn/installation.luau deleted file mode 100644 index 3cb2eb8e..00000000 --- a/sitegen/pages/learn/installation.luau +++ /dev/null @@ -1,33 +0,0 @@ -local Article = require("@sitegen/components/article") -local commonUrls = require("@sitegen/config/common-urls") -local h = require("@sitegen/h") - -return function() - return Article({ - title = "Installation", - content = { - h.p("Prvd 'M Wrong is distributed as several packages that needs to be installed into \ - your game."), - }, - sections = { - { - title = "Templates", - content = { - h.p("TBA"), - }, - }, - { - title = "Installation", - content = { - h.p("TBA"), - }, - }, - { - title = "Build from Source", - content = { - h.p("TBA"), - }, - }, - }, - }) -end diff --git a/sitegen/pages/learn/roblox/components.luau b/sitegen/pages/learn/roblox/components.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/pages/learn/roblox/roblox-lifecycles.luau b/sitegen/pages/learn/roblox/roblox-lifecycles.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/publish.luau b/sitegen/publish.luau deleted file mode 100644 index e69de29b..00000000 diff --git a/sitegen/static/fonts/jura.ttf b/sitegen/static/fonts/jura.ttf deleted file mode 100644 index 5256bad0..00000000 Binary files a/sitegen/static/fonts/jura.ttf and /dev/null differ diff --git a/sitegen/static/stylesheets/article.css b/sitegen/static/stylesheets/article.css deleted file mode 100644 index 4440427f..00000000 --- a/sitegen/static/stylesheets/article.css +++ /dev/null @@ -1,18 +0,0 @@ -.article-container { - display: flex; - justify-content: space-between; - margin-top: var(--navbar-height); -} - -.article-content { - margin: var(--content-padding); - max-width: var(--max-content-width); - width: 100%; - flex-grow: 1; -} - -.article-toc, -.article-nav { - background-color: blue; - width: 20rem; -} diff --git a/sitegen/static/stylesheets/common.css b/sitegen/static/stylesheets/common.css deleted file mode 100644 index c73695c2..00000000 --- a/sitegen/static/stylesheets/common.css +++ /dev/null @@ -1,136 +0,0 @@ -:root { - --prvdmwrong-hue: 240; - --prvdmwrong-chroma: 0.025; - --prvdmwrong-gray-0: oklch(0 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-1: oklch(0.05 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-2: oklch(0.1 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-3: oklch(0.15 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-4: oklch(0.2 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-5: oklch(0.3 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-6: oklch(0.8 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-7: oklch(0.85 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-8: oklch(0.9 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-9: oklch(0.95 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - --prvdmwrong-gray-10: oklch(1 var(--prvdmwrong-chroma) var(--prvdmwrong-hue)); - - --prvdmwrong-accent-hue: 50; - --prvdmwrong-accent-chroma: 0.15; - --prvdmwrong-accent: oklch(0.6 var(--prvdmwrong-accent-chroma) var(--prvdmwrong-accent-hue)); - --prvdmwrong-accent-dark: oklch(0.55 var(--prvdmwrong-accent-chroma) var(--prvdmwrong-accent-hue)); - --prvdmwrong-accent-darker: oklch(0.4 var(--prvdmwrong-accent-chroma) var(--prvdmwrong-accent-hue)); - --prvdmwrong-accent-light: oklch(0.65 var(--prvdmwrong-accent-chroma) var(--prvdmwrong-accent-hue)); - --prvdmwrong-accent-lighter: oklch(0.7 var(--prvdmwrong-accent-chroma) var(--prvdmwrong-accent-hue)); - - --fg: var(--prvdmwrong-gray-8); - --fg-light: var(--prvdmwrong-gray-7); - --fg-lighter: var(--prvdmwrong-gray-6); - --fg-lightest: var(--prvdmwrong-gray-5); - --bg: var(--prvdmwrong-gray-4); - --bg-light: var(--prvdmwrong-gray-3); - --bg-lighter: var(--prvdmwrong-gray-2); - --bg-lightest: var(--prvdmwrong-gray-1); - --accent: var(--prvdmwrong-accent); - - --content-padding: 2rem; - --max-content-width: 80rem; - --mobile-width: 80rem; - --current-content-width: max(var(--max-content-width), calc(100vw - var(--content-padding) - var(--content-padding))); - - --navbar-height: 4rem; -} - -body { - background: var(--bg); - color: var(--fg); -} - -body>* { - image-rendering: pixelated; -} - -header { - display: flex; - justify-content: center; - - --vertical-padding: max(2em, calc(30svh - 10em)); - - padding: var(--vertical-padding) 0; - padding-top: calc(var(--vertical-padding) + var(--navbar-height)); - - background-color: var(--bg-light); - border-bottom: 0.1rem solid var(--fg-lightest); -} - -header h1 { - font-size: 3rem; -} - -.navbar { - display: flex; - justify-content: center; - - position: fixed; - z-index: 9999; - top: 0; - height: var(--navbar-height); - width: 100%; - - background-color: var(--bg-light); - border-bottom: 0.1rem solid var(--fg-lightest); -} - -.navbar-inner { - display: flex; - align-items: center; - gap: 1rem; - - margin: 0 var(--content-padding); - max-width: var(--max-content-width); - height: 100%; - width: 100%; -} - -.navbar-inner :first-child { - margin-right: auto; -} - -.navbar-inner a { - color: var(--fg); - text-decoration: none; -} - -.button { - background-color: var(--fg); - color: var(--bg); - - padding: 0.5rem 1rem; - - border-radius: 0.25rem; - font-weight: 700; - text-decoration: none; -} - -.code-snippet { - /* white-space: pre-wrap; - word-wrap: break-word; - text-align: justify; */ - /* overflow: auto ; */ - /* max-width: var(--current-content-width); */ -} - -.code-snippet code { - - /* overflow-x: scroll; */ -} - -.hljs { - background-color: var(--bg-lightest) !important; - border: 0.1rem solid var(--fg-lightest); - border-radius: 0.5rem; - overflow-x: scroll !important; -} - -a { - color: var(--accent); - text-decoration: none; -} diff --git a/sitegen/static/stylesheets/fonts.css b/sitegen/static/stylesheets/fonts.css deleted file mode 100644 index 2925cae6..00000000 --- a/sitegen/static/stylesheets/fonts.css +++ /dev/null @@ -1,63 +0,0 @@ -@font-face { - font-family: 'Jura'; - src: url('../fonts/jura.ttf') format('truetype') -} - -* { - text-balance: pretty; -} - -body { - font-family: "Jura", system-ui; - line-height: 2; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-weight: 700; - - &:not(:first-child) { - margin-top: 1rem; - } -} - -h1 { - font-size: 2em; - line-height: 1.5; -} - -h2 { - font-size: 1.5em; - line-height: 1.5; -} - -h3 { - font-size: 1.25em; - line-height: 1.5; -} - -h4, -h5, -h6, -strong, -b { - font-size: 1em; - line-height: 1.5; - letter-spacing: 0.125em; - text-shadow: 0.125em 0; -} - -u, -a { - text-decoration-thickness: 0.125em; - text-underline-offset: 0.125em; -} - -small, -pre { - font-size: 0.75rem; -} diff --git a/sitegen/static/stylesheets/landing.css b/sitegen/static/stylesheets/landing.css deleted file mode 100644 index 8b4b833e..00000000 --- a/sitegen/static/stylesheets/landing.css +++ /dev/null @@ -1,65 +0,0 @@ -.hero-inner { - display: flex; - flex-direction: column; - position: relative; - gap: 1rem; - width: 100%; - - padding: 0 var(--content-padding); - max-width: var(--max-content-width); -} - -.hero-lead { - flex: 1 1 auto; -} - -.hero-lead :not(:last-child) { - margin-bottom: 0.5rem; -} - -.hero-supports { - display: flex; - flex-direction: row; - gap: 1rem; -} - -.hero-supports div span { - font-weight: 700; - opacity: 50%; -} - -.hero-supports .hero-supports-icons { - display: flex; - gap: 0.5rem; -} - -.hero-supports .hero-supports-icons a { - width: 4rem; - height: 4rem; - background-color: red; -} - -@media only screen and (max-width: 50rem) { - .hero-supports { - flex-direction: column; - } -} - -.hero-left, -.hero-right { - display: flex; - flex-direction: column; - gap: 1rem; -} - - -.hero-buttons { - display: flex; - gap: 1rem; -} - -/* .hero-inner > section { - display: flex; - position: relative; - max-width: 100%; -} */ diff --git a/sitegen/static/stylesheets/reset.css b/sitegen/static/stylesheets/reset.css deleted file mode 100644 index 7e547adb..00000000 --- a/sitegen/static/stylesheets/reset.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - Josh's Custom CSS Reset - https://www.joshwcomeau.com/css/custom-css-reset/ -*/ - -*, *::before, *::after { - box-sizing: border-box; -} - -* { - margin: 0; -} - -@media (prefers-reduced-motion: no-preference) { - html { - interpolate-size: allow-keywords; - } -} - -body { - line-height: 1.5; - -webkit-font-smoothing: antialiased; -} - -img, picture, video, canvas, svg { - display: block; - max-width: 100%; -} - -input, button, textarea, select { - font: inherit; -} - -p, h1, h2, h3, h4, h5, h6 { - overflow-wrap: break-word; -} - -p { - text-wrap: pretty; -} -h1, h2, h3, h4, h5, h6 { - text-wrap: balance; -} - -#root, #__next { - isolation: isolate; -} \ No newline at end of file diff --git a/sitegen/utils/for-each.luau b/sitegen/utils/for-each.luau deleted file mode 100644 index c38c62f0..00000000 --- a/sitegen/utils/for-each.luau +++ /dev/null @@ -1,14 +0,0 @@ -local function forEach(input: { [KI]: VI }, func: (KI, VI) -> (KO, VO)): { [KO]: VO } - local output = {} - for keyIn, valueIn in input do - local keyOut, valueOut = func(keyIn, valueIn) - if keyOut == nil or valueOut == nil then - continue - end - assert(output[keyOut] == nil, "Key collision") - output[keyOut] = valueOut - end - return output -end - -return forEach diff --git a/sitegen/utils/site-base-url.luau b/sitegen/utils/site-base-url.luau deleted file mode 100644 index 08b357df..00000000 --- a/sitegen/utils/site-base-url.luau +++ /dev/null @@ -1,7 +0,0 @@ -local siteUrls = require("@sitegen/config/site-urls") - -local function siteBaseUrl(suffix: string) - return siteUrls.base .. "/" .. suffix -end - -return siteBaseUrl diff --git a/stylua.toml b/stylua.toml index 77fa854a..26bd9ac7 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,4 +1,4 @@ syntax = "Luau" [sort_requires] - enabled = true +enabled = true diff --git a/types/g.d.luau b/types/g.d.luau deleted file mode 100644 index edfb7af3..00000000 --- a/types/g.d.luau +++ /dev/null @@ -1,5 +0,0 @@ -declare _G: { - PRVDMWRONG_SUPPRESS_MULTIPLE_SAME_TAG: unknown, - PRVDMWRONG_DISALLOW_MULTIPLE_LISTENERS: unknown, - PRVDMWRONG_PROFILE_LIFECYCLES: unknown -}