mirror of
https://github.com/pesde-pkg/scripts.git
synced 2025-01-08 12:39:08 +00:00
chore(lune): fix typings for manifest & add spinner wait
This commit is contained in:
parent
a0879ddf2c
commit
9b2cde688c
2 changed files with 9 additions and 16 deletions
|
@ -10,17 +10,8 @@ local manifest = require("./lib/manifest")
|
||||||
local pathfs = require("../lune_packages/pathfs")
|
local pathfs = require("../lune_packages/pathfs")
|
||||||
|
|
||||||
type ToolChoice = "rojo"
|
type ToolChoice = "rojo"
|
||||||
type ManifestExt = {
|
|
||||||
scripts: {
|
|
||||||
[ToolChoice]: {
|
|
||||||
version: string,
|
|
||||||
tool_dependencies: { { [string]: manifest.DependencySpecifier } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local SCRIPTS_DIR = pathfs.getAbsolutePathOf(pathfs.Path.from(".pesde"))
|
local SCRIPTS_DIR = pathfs.getAbsolutePathOf(pathfs.Path.from(".pesde"))
|
||||||
local MANIFEST = manifest(nil, (nil :: any) :: { meta: ManifestExt })
|
local MANIFEST = manifest(nil, (nil :: any) :: { meta: manifest.PesdeManifest })
|
||||||
local SCRIPTS = {
|
local SCRIPTS = {
|
||||||
syncConfigGenerator = [[local process = require("@lune/process")
|
syncConfigGenerator = [[local process = require("@lune/process")
|
||||||
|
|
||||||
|
@ -90,6 +81,9 @@ local function installDeps(): number
|
||||||
-- Moves the cursor back 1 spot and clears everything after
|
-- Moves the cursor back 1 spot and clears everything after
|
||||||
"\x1b[2D\x1b[0K"
|
"\x1b[2D\x1b[0K"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- Wait 10ms between each spinner state
|
||||||
|
task.wait(0.1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -97,7 +91,7 @@ local function installDeps(): number
|
||||||
-- `process_spawn` is an async rust function, so tokio spawns a hardware
|
-- `process_spawn` is an async rust function, so tokio spawns a hardware
|
||||||
-- thread and mlua will yield the current thread, allowing for `spinnerThread`
|
-- thread and mlua will yield the current thread, allowing for `spinnerThread`
|
||||||
-- to continue executing
|
-- to continue executing
|
||||||
local child = process.spawn("pesde", { "install" }, {
|
local child = process.spawn("/home/usr/.pesde/bin/pesde", { "install" }, {
|
||||||
stdio = "default",
|
stdio = "default",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,11 @@ export type DependencySpecifier = (({
|
||||||
export type PackageTarget = {
|
export type PackageTarget = {
|
||||||
environment: "roblox" | "roblox_server",
|
environment: "roblox" | "roblox_server",
|
||||||
lib: string,
|
lib: string,
|
||||||
} | {
|
} | ({
|
||||||
environment: "luau" | "lune",
|
environment: "luau" | "lune",
|
||||||
lib: string,
|
} & (
|
||||||
bin: string,
|
{ scripts: { [string]: string } } | { lib: string } | { bin: string }
|
||||||
scripts: { [string]: string },
|
))
|
||||||
}
|
|
||||||
|
|
||||||
export type PesdeManifest<T = {}> = {
|
export type PesdeManifest<T = {}> = {
|
||||||
name: string,
|
name: string,
|
||||||
|
|
Loading…
Reference in a new issue