@lifo-sh/core 0.4.6 → 0.5.5

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.
Files changed (202) hide show
  1. package/README.md +7 -3
  2. package/dist/{awk-BFrGImnt.js → awk-Bhywv7pU.js} +1 -1
  3. package/dist/base64-ncdb27yL.js +72 -0
  4. package/dist/{basename-MGz8cBxd.js → basename-D-_r1VN_.js} +1 -1
  5. package/dist/browser-Bymgnrli.js +35 -0
  6. package/dist/{cat-BnEyWWFr.js → cat-DSe6FHma.js} +1 -1
  7. package/dist/{chmod-CdrI3hZV.js → chmod-BZIlNR2-.js} +1 -1
  8. package/dist/{chown-7yY3iC6J.js → chown-BAOEOuMn.js} +1 -1
  9. package/dist/commands/net/curl.d.ts +2 -2
  10. package/dist/commands/net/curl.d.ts.map +1 -1
  11. package/dist/commands/net/forward.d.ts +14 -0
  12. package/dist/commands/net/forward.d.ts.map +1 -0
  13. package/dist/commands/net/host.d.ts +14 -0
  14. package/dist/commands/net/host.d.ts.map +1 -0
  15. package/dist/commands/net/ifconfig.d.ts +8 -0
  16. package/dist/commands/net/ifconfig.d.ts.map +1 -0
  17. package/dist/commands/net/ip.d.ts +14 -0
  18. package/dist/commands/net/ip.d.ts.map +1 -0
  19. package/dist/commands/net/netstat.d.ts +8 -0
  20. package/dist/commands/net/netstat.d.ts.map +1 -0
  21. package/dist/commands/net/ports.d.ts +8 -0
  22. package/dist/commands/net/ports.d.ts.map +1 -0
  23. package/dist/commands/net/route.d.ts +8 -0
  24. package/dist/commands/net/route.d.ts.map +1 -0
  25. package/dist/commands/net/test-registry.d.ts +8 -0
  26. package/dist/commands/net/test-registry.d.ts.map +1 -0
  27. package/dist/commands/net/tunnel-v2.d.ts +4 -0
  28. package/dist/commands/net/tunnel-v2.d.ts.map +1 -0
  29. package/dist/commands/net/tunnel.d.ts +6 -0
  30. package/dist/commands/net/tunnel.d.ts.map +1 -0
  31. package/dist/commands/registry.d.ts +1 -0
  32. package/dist/commands/registry.d.ts.map +1 -1
  33. package/dist/commands/system/fastfetch.d.ts +4 -0
  34. package/dist/commands/system/fastfetch.d.ts.map +1 -0
  35. package/dist/commands/system/kill.d.ts +2 -2
  36. package/dist/commands/system/kill.d.ts.map +1 -1
  37. package/dist/commands/system/lifo.d.ts +17 -0
  38. package/dist/commands/system/lifo.d.ts.map +1 -1
  39. package/dist/commands/system/logout.d.ts +5 -0
  40. package/dist/commands/system/logout.d.ts.map +1 -0
  41. package/dist/commands/system/man.d.ts.map +1 -1
  42. package/dist/commands/system/newtab.d.ts +8 -0
  43. package/dist/commands/system/newtab.d.ts.map +1 -0
  44. package/dist/commands/system/node.d.ts +2 -2
  45. package/dist/commands/system/node.d.ts.map +1 -1
  46. package/dist/commands/system/npm.d.ts +20 -7
  47. package/dist/commands/system/npm.d.ts.map +1 -1
  48. package/dist/commands/system/ps.d.ts +3 -2
  49. package/dist/commands/system/ps.d.ts.map +1 -1
  50. package/dist/commands/system/sha256sum.d.ts +4 -0
  51. package/dist/commands/system/sha256sum.d.ts.map +1 -0
  52. package/dist/commands/system/sl.d.ts +4 -0
  53. package/dist/commands/system/sl.d.ts.map +1 -0
  54. package/dist/commands/system/systemctl.d.ts +4 -0
  55. package/dist/commands/system/systemctl.d.ts.map +1 -0
  56. package/dist/commands/system/top.d.ts +2 -2
  57. package/dist/commands/system/top.d.ts.map +1 -1
  58. package/dist/commands/system/whoami.d.ts.map +1 -1
  59. package/dist/commands/text/base64.d.ts +4 -0
  60. package/dist/commands/text/base64.d.ts.map +1 -0
  61. package/dist/commands/text/less.d.ts +4 -0
  62. package/dist/commands/text/less.d.ts.map +1 -0
  63. package/dist/commands/text/nano.d.ts +4 -0
  64. package/dist/commands/text/nano.d.ts.map +1 -0
  65. package/dist/commands/text/seq.d.ts +4 -0
  66. package/dist/commands/text/seq.d.ts.map +1 -0
  67. package/dist/commands/text/strings.d.ts +4 -0
  68. package/dist/commands/text/strings.d.ts.map +1 -0
  69. package/dist/commands/text/tac.d.ts +4 -0
  70. package/dist/commands/text/tac.d.ts.map +1 -0
  71. package/dist/commands/types.d.ts +1 -0
  72. package/dist/commands/types.d.ts.map +1 -1
  73. package/dist/{cp-7dOXCu3Q.js → cp-DOXzF2_m.js} +1 -1
  74. package/dist/{cut-vn4vxL9L.js → cut-B4rQvMRc.js} +1 -1
  75. package/dist/{diff-DnKPewP-.js → diff-BndHU0Ne.js} +1 -1
  76. package/dist/{dirname-B3ciBZhS.js → dirname-wtPE8QZ6.js} +1 -1
  77. package/dist/{du-i2qiYYnL.js → du-BLkl3BkN.js} +1 -1
  78. package/dist/fastfetch-aPM9Z3ym.js +310 -0
  79. package/dist/{file-Dd6iLk05.js → file-DfmI5Gyk.js} +1 -1
  80. package/dist/{find-Cz4GdaPT.js → find-Wdkys9OU.js} +1 -1
  81. package/dist/{grep-DYSAPbxr.js → grep-xmx3I05f.js} +1 -1
  82. package/dist/{gunzip-BHAbNGHO.js → gunzip-Dbr2fm5t.js} +1 -1
  83. package/dist/{gzip-JLrrHn6u.js → gzip-D1GwSnNe.js} +1 -1
  84. package/dist/{head-bFamSv7p.js → head-DUXuKw3m.js} +1 -1
  85. package/dist/index-Djm2onjx.js +13915 -0
  86. package/dist/index.d.ts +28 -2
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +90 -65
  89. package/dist/kernel/ServiceManager.d.ts +51 -0
  90. package/dist/kernel/ServiceManager.d.ts.map +1 -0
  91. package/dist/kernel/index.d.ts +11 -0
  92. package/dist/kernel/index.d.ts.map +1 -1
  93. package/dist/kernel/network/Bridge.d.ts +110 -0
  94. package/dist/kernel/network/Bridge.d.ts.map +1 -0
  95. package/dist/kernel/network/DNSResolver.d.ts +55 -0
  96. package/dist/kernel/network/DNSResolver.d.ts.map +1 -0
  97. package/dist/kernel/network/NetworkInterface.d.ts +83 -0
  98. package/dist/kernel/network/NetworkInterface.d.ts.map +1 -0
  99. package/dist/kernel/network/NetworkNamespace.d.ts +98 -0
  100. package/dist/kernel/network/NetworkNamespace.d.ts.map +1 -0
  101. package/dist/kernel/network/NetworkStack.d.ts +178 -0
  102. package/dist/kernel/network/NetworkStack.d.ts.map +1 -0
  103. package/dist/kernel/network/NetworkStack.example.d.ts +8 -0
  104. package/dist/kernel/network/NetworkStack.example.d.ts.map +1 -0
  105. package/dist/kernel/network/NetworkStack.test.d.ts +2 -0
  106. package/dist/kernel/network/NetworkStack.test.d.ts.map +1 -0
  107. package/dist/kernel/network/PortBridge.d.ts +49 -0
  108. package/dist/kernel/network/PortBridge.d.ts.map +1 -0
  109. package/dist/kernel/network/RoutingTable.d.ts +55 -0
  110. package/dist/kernel/network/RoutingTable.d.ts.map +1 -0
  111. package/dist/kernel/network/Socket.d.ts +65 -0
  112. package/dist/kernel/network/Socket.d.ts.map +1 -0
  113. package/dist/kernel/network/index.d.ts +11 -0
  114. package/dist/kernel/network/index.d.ts.map +1 -0
  115. package/dist/kernel/network/tunnel/BaseTunnel.d.ts +55 -0
  116. package/dist/kernel/network/tunnel/BaseTunnel.d.ts.map +1 -0
  117. package/dist/kernel/network/tunnel/VETHPair.d.ts +71 -0
  118. package/dist/kernel/network/tunnel/VETHPair.d.ts.map +1 -0
  119. package/dist/kernel/network/tunnel/WebSocketTunnel.d.ts +89 -0
  120. package/dist/kernel/network/tunnel/WebSocketTunnel.d.ts.map +1 -0
  121. package/dist/kernel/network/types.d.ts +159 -0
  122. package/dist/kernel/network/types.d.ts.map +1 -0
  123. package/dist/kernel/storage/ContentStore.d.ts +3 -1
  124. package/dist/kernel/storage/ContentStore.d.ts.map +1 -1
  125. package/dist/kernel/unit-parser.d.ts +22 -0
  126. package/dist/kernel/unit-parser.d.ts.map +1 -0
  127. package/dist/less-VW-Lb-t9.js +230 -0
  128. package/dist/{ls-BSsn2qVd.js → ls-DjuSFYCA.js} +1 -1
  129. package/dist/{man-CJ5pI0_W.js → man-Dg26tZ-a.js} +19 -6
  130. package/dist/{mkdir-CF_ugDtu.js → mkdir-qMgrbMfK.js} +1 -1
  131. package/dist/{mktemp-CaEiJi87.js → mktemp-BNrdUgqA.js} +1 -1
  132. package/dist/{mv-BSS_QQM-.js → mv-DxovuvmA.js} +1 -1
  133. package/dist/nano-CVa6vpFX.js +304 -0
  134. package/dist/{nl-D30ka89P.js → nl-E4qmf3dZ.js} +1 -1
  135. package/dist/node-compat/crypto.d.ts +8 -1
  136. package/dist/node-compat/crypto.d.ts.map +1 -1
  137. package/dist/node-compat/dns.d.ts +117 -0
  138. package/dist/node-compat/dns.d.ts.map +1 -0
  139. package/dist/node-compat/esbuild.d.ts +10 -0
  140. package/dist/node-compat/esbuild.d.ts.map +1 -0
  141. package/dist/node-compat/fs.d.ts +25 -5
  142. package/dist/node-compat/fs.d.ts.map +1 -1
  143. package/dist/node-compat/http.d.ts +54 -9
  144. package/dist/node-compat/http.d.ts.map +1 -1
  145. package/dist/node-compat/index.d.ts.map +1 -1
  146. package/dist/node-compat/module.d.ts +55 -0
  147. package/dist/node-compat/module.d.ts.map +1 -0
  148. package/dist/node-compat/path.d.ts +28 -0
  149. package/dist/node-compat/path.d.ts.map +1 -1
  150. package/dist/node-compat/process.d.ts +67 -2
  151. package/dist/node-compat/process.d.ts.map +1 -1
  152. package/dist/node-compat/readline.d.ts +79 -0
  153. package/dist/node-compat/readline.d.ts.map +1 -0
  154. package/dist/node-compat/rimraf.d.ts +23 -0
  155. package/dist/node-compat/rimraf.d.ts.map +1 -0
  156. package/dist/node-compat/tty.d.ts +32 -0
  157. package/dist/node-compat/tty.d.ts.map +1 -0
  158. package/dist/node-compat/url.d.ts +4 -0
  159. package/dist/node-compat/url.d.ts.map +1 -1
  160. package/dist/node-compat/util.d.ts +21 -1
  161. package/dist/node-compat/util.d.ts.map +1 -1
  162. package/dist/{realpath-BWqrTa-J.js → realpath-BaYc6QSr.js} +1 -1
  163. package/dist/{rev-Cfja5xbl.js → rev-CtqOEUEH.js} +1 -1
  164. package/dist/{rm-DUR35EZn.js → rm-DtLSFhWn.js} +1 -1
  165. package/dist/{rmdir-DXjx17-Z.js → rmdir-k65U0Fef.js} +1 -1
  166. package/dist/sandbox/Sandbox.d.ts.map +1 -1
  167. package/dist/sandbox/types.d.ts +2 -2
  168. package/dist/sandbox/types.d.ts.map +1 -1
  169. package/dist/{sed-YKJ5wcuu.js → sed-BpypU_CO.js} +1 -1
  170. package/dist/seq-B01YKIbO.js +37 -0
  171. package/dist/sha256sum-x-mlDY9n.js +64 -0
  172. package/dist/shell/ProcessRegistry.d.ts +144 -0
  173. package/dist/shell/ProcessRegistry.d.ts.map +1 -0
  174. package/dist/shell/ProcessRegistry.example.d.ts +8 -0
  175. package/dist/shell/ProcessRegistry.example.d.ts.map +1 -0
  176. package/dist/shell/ProcessRegistry.test.d.ts +2 -0
  177. package/dist/shell/ProcessRegistry.test.d.ts.map +1 -0
  178. package/dist/shell/Shell.d.ts +10 -2
  179. package/dist/shell/Shell.d.ts.map +1 -1
  180. package/dist/shell/interpreter.d.ts +4 -0
  181. package/dist/shell/interpreter.d.ts.map +1 -1
  182. package/dist/shell/terminal-stdin.d.ts +4 -0
  183. package/dist/shell/terminal-stdin.d.ts.map +1 -1
  184. package/dist/sl-Dv4iPBN6.js +138 -0
  185. package/dist/{sort-C2sQ841N.js → sort-C1n7kWmJ.js} +1 -1
  186. package/dist/{stat-gLLpq3JZ.js → stat-Co_5pgto.js} +1 -1
  187. package/dist/strings-tFgYFAvp.js +42 -0
  188. package/dist/tac-BQvVvnoM.js +31 -0
  189. package/dist/{tail-FnC8M40k.js → tail-CLWVwfZD.js} +1 -1
  190. package/dist/{tar-tfiT1iFt.js → tar-wo7UUSK5.js} +1 -1
  191. package/dist/{tee-CoymtuKa.js → tee-DlyeS1Yd.js} +1 -1
  192. package/dist/{touch-C4pyouV6.js → touch-DVzPgqSy.js} +1 -1
  193. package/dist/{tree-DfPczgli.js → tree-DHBQhXD7.js} +1 -1
  194. package/dist/{uniq-Dhsoj7Lk.js → uniq-CmmP6k_t.js} +1 -1
  195. package/dist/{unzip-CqIKZ8NK.js → unzip-BIOvH2jT.js} +1 -1
  196. package/dist/{wc-DBPO6xRf.js → wc-DfI1Q3lo.js} +1 -1
  197. package/dist/{wget-CYImxeOz.js → wget-Dd25MxcO.js} +1 -1
  198. package/dist/whoami-C_q-p-Vo.js +25 -0
  199. package/dist/{zip-TPdwPkrA.js → zip-Cc3IoNSB.js} +1 -1
  200. package/package.json +6 -3
  201. package/dist/index-BVIfyOAv.js +0 -8578
  202. package/dist/whoami-B1237V5e.js +0 -8
@@ -1,4 +1,4 @@
1
- import { r as v, V as C } from "./index-BVIfyOAv.js";
1
+ import { r as v, V as C } from "./index-Djm2onjx.js";
2
2
  const P = async (t) => {
3
3
  let f = 1 / 0, a = !1, o = ".";
4
4
  for (let e = 0; e < t.args.length; e++) {
@@ -1,4 +1,4 @@
1
- import { r as f, i as c, c as g, V as d } from "./index-BVIfyOAv.js";
1
+ import { r as f, i as c, c as g, V as d } from "./index-Djm2onjx.js";
2
2
  const h = async (t) => {
3
3
  let o = !1, l = !1, a = !1;
4
4
  const s = [];
@@ -1,4 +1,4 @@
1
- import { r as d, m as f, k as p, V as w } from "./index-BVIfyOAv.js";
1
+ import { r as d, m as f, k as p, V as w } from "./index-Djm2onjx.js";
2
2
  const v = async (t) => {
3
3
  let u = !1, a = "", o = "";
4
4
  for (let r = 0; r < t.args.length; r++) {
@@ -1,4 +1,4 @@
1
- import { r as p, i as y, c as b, V as m } from "./index-BVIfyOAv.js";
1
+ import { r as p, i as y, c as b, V as m } from "./index-Djm2onjx.js";
2
2
  const v = async (s) => {
3
3
  let i = !1, o = !1, a = !1;
4
4
  const l = [];
@@ -1,4 +1,4 @@
1
- import { r as l } from "./index-BVIfyOAv.js";
1
+ import { r as l } from "./index-Djm2onjx.js";
2
2
  const w = async (e) => {
3
3
  let i, n = !1, s;
4
4
  const a = e.args;
@@ -0,0 +1,25 @@
1
+ const r = process.env.LIFO_BASE_URL || "https://lifo.sh", o = async (e) => {
2
+ const t = e.env.LIFO_AUTH_TOKEN;
3
+ if (!t)
4
+ return e.stdout.write((e.env.USER || "user") + `
5
+ `), 0;
6
+ try {
7
+ const s = await fetch(`${r}/api/me`, {
8
+ headers: { authorization: `Bearer ${t}` }
9
+ });
10
+ if (s.ok) {
11
+ const { email: n } = await s.json();
12
+ e.stdout.write(n + `
13
+ `);
14
+ } else
15
+ e.stdout.write((e.env.USER || "user") + `
16
+ `);
17
+ } catch {
18
+ e.stdout.write((e.env.USER || "user") + `
19
+ `);
20
+ }
21
+ return 0;
22
+ };
23
+ export {
24
+ o as default
25
+ };
@@ -1,4 +1,4 @@
1
- import { r as d, d as c, l as f, V as h } from "./index-BVIfyOAv.js";
1
+ import { r as d, d as c, l as f, V as h } from "./index-Djm2onjx.js";
2
2
  const g = async (r) => {
3
3
  if (r.args.length === 0 || r.args[0] === "--help")
4
4
  return r.stdout.write(`Usage: zip archive.zip file1 [file2 ...]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifo-sh/core",
3
- "version": "0.4.6",
3
+ "version": "0.5.5",
4
4
  "description": "Linux-like OS engine for JavaScript -- kernel, shell, VFS, and 60+ commands",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,9 +35,11 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "dependencies": {},
38
+ "dependencies": {
39
+ "ws": "^8.19.0"
40
+ },
39
41
  "peerDependencies": {
40
- "@lifo-sh/ui": "0.4.2"
42
+ "@lifo-sh/ui": "0.5.0"
41
43
  },
42
44
  "peerDependenciesMeta": {
43
45
  "@lifo-sh/ui": {
@@ -45,6 +47,7 @@
45
47
  }
46
48
  },
47
49
  "devDependencies": {
50
+ "@types/ws": "^8.18.1",
48
51
  "typescript": "^5.7.0",
49
52
  "vite": "^6.0.0",
50
53
  "vite-plugin-dts": "^4.5.0",