@rahul1616/flo42 0.0.0-master-202607081302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bip-bop-01-ga21wr3r.mp3 +0 -0
- package/bip-bop-03-kgfd4rq4.mp3 +0 -0
- package/cli.js +51 -0
- package/flo42.js +7272 -0
- package/highlights-eq9cgrbb.scm +604 -0
- package/highlights-ghv9g403.scm +205 -0
- package/highlights-hk7bwhj4.scm +284 -0
- package/highlights-r812a2qc.scm +150 -0
- package/highlights-x6tmsnaa.scm +115 -0
- package/injections-73j83es3.scm +27 -0
- package/libopentui-4ee161ja.dylib +0 -0
- package/libopentui-hsm9amr6.so +0 -0
- package/libopentui-kexxrvrr.dylib +0 -0
- package/libopentui-pe7h02x9.so +0 -0
- package/libopentui-rg5wc05m.so +0 -0
- package/libopentui-wvyv6gn9.so +0 -0
- package/nope-03-2z8weyjw.mp3 +0 -0
- package/opentui-2nr24hkx.dll +0 -0
- package/opentui-rz7xn336.dll +0 -0
- package/package.json +20 -0
- package/photon_rs_bg-bq08arze.wasm +0 -0
- package/staplebops-06-rz29m246.mp3 +0 -0
- package/tree-sitter-3jzf13jk.wasm +0 -0
- package/tree-sitter-bash-hq5s6fxb.wasm +0 -0
- package/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/tree-sitter-powershell-ryb2ffqs.wasm +0 -0
- package/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/yup-01-30ecpeh9.mp3 +0 -0
|
Binary file
|
|
Binary file
|
package/cli.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict"
|
|
3
|
+
const { spawnSync, spawn, execSync } = require("child_process")
|
|
4
|
+
const { existsSync, mkdirSync, chmodSync, createWriteStream } = require("fs")
|
|
5
|
+
const { homedir, platform, arch } = require("os")
|
|
6
|
+
const { join } = require("path")
|
|
7
|
+
const https = require("https")
|
|
8
|
+
|
|
9
|
+
const CACHE = join(homedir(), ".flo42", "bun")
|
|
10
|
+
const BUN = join(CACHE, platform() === "win32" ? "bun.exe" : "bun")
|
|
11
|
+
|
|
12
|
+
function getBun() {
|
|
13
|
+
try { spawnSync("bun", ["--version"], { stdio: "ignore" }); return "bun" } catch {}
|
|
14
|
+
if (existsSync(BUN)) return BUN
|
|
15
|
+
return null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function download(url, dest) {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
const file = createWriteStream(dest)
|
|
21
|
+
https.get(url, (res) => {
|
|
22
|
+
if (res.statusCode >= 300 && res.headers.location)
|
|
23
|
+
return download(res.headers.location, dest).then(resolve, reject)
|
|
24
|
+
if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return }
|
|
25
|
+
res.pipe(file)
|
|
26
|
+
file.on("finish", () => { file.close(); resolve() })
|
|
27
|
+
}).on("error", reject)
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function main() {
|
|
32
|
+
let bun = getBun()
|
|
33
|
+
if (!bun) {
|
|
34
|
+
console.error("Downloading Bun runtime (one-time, ~60MB)...")
|
|
35
|
+
mkdirSync(CACHE, { recursive: true })
|
|
36
|
+
const os = { win32: "windows", darwin: "darwin", linux: "linux" }[platform()]
|
|
37
|
+
const zip = join(CACHE, "bun.zip")
|
|
38
|
+
await download(`https://github.com/oven-sh/bun/releases/latest/download/bun-${os}-${arch()}.zip`, zip)
|
|
39
|
+
if (platform() === "win32") {
|
|
40
|
+
execSync(`powershell -Command "Expand-Archive -Path '${zip}' -DestinationPath '${CACHE}' -Force"`, { stdio: "inherit" })
|
|
41
|
+
} else {
|
|
42
|
+
execSync(`unzip -o -q "${zip}" -d "${CACHE}"`, { stdio: "inherit" })
|
|
43
|
+
}
|
|
44
|
+
chmodSync(BUN, 0o755)
|
|
45
|
+
bun = BUN
|
|
46
|
+
}
|
|
47
|
+
const p = spawn(bun, [join(__dirname, "flo42.js"), ...process.argv.slice(2)], { stdio: "inherit", windowsHide: false })
|
|
48
|
+
p.on("exit", (c) => process.exit(c ?? 1))
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
main().catch((e) => { console.error(e.message); process.exit(1) })
|