@lifo-sh/core 0.4.6 → 0.5.0

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 (86) hide show
  1. package/dist/{awk-BFrGImnt.js → awk-CC_Qo0hQ.js} +1 -1
  2. package/dist/base64-BBckAmkE.js +72 -0
  3. package/dist/{basename-MGz8cBxd.js → basename-BIICW06y.js} +1 -1
  4. package/dist/{cat-BnEyWWFr.js → cat-Jv35D4BV.js} +1 -1
  5. package/dist/{chmod-CdrI3hZV.js → chmod-Bh-u8XOr.js} +1 -1
  6. package/dist/{chown-7yY3iC6J.js → chown-Dv7xfl2a.js} +1 -1
  7. package/dist/commands/registry.d.ts.map +1 -1
  8. package/dist/commands/system/fastfetch.d.ts +4 -0
  9. package/dist/commands/system/fastfetch.d.ts.map +1 -0
  10. package/dist/commands/system/logout.d.ts +5 -0
  11. package/dist/commands/system/logout.d.ts.map +1 -0
  12. package/dist/commands/system/man.d.ts.map +1 -1
  13. package/dist/commands/system/sha256sum.d.ts +4 -0
  14. package/dist/commands/system/sha256sum.d.ts.map +1 -0
  15. package/dist/commands/system/sl.d.ts +4 -0
  16. package/dist/commands/system/sl.d.ts.map +1 -0
  17. package/dist/commands/system/whoami.d.ts.map +1 -1
  18. package/dist/commands/text/base64.d.ts +4 -0
  19. package/dist/commands/text/base64.d.ts.map +1 -0
  20. package/dist/commands/text/less.d.ts +4 -0
  21. package/dist/commands/text/less.d.ts.map +1 -0
  22. package/dist/commands/text/nano.d.ts +4 -0
  23. package/dist/commands/text/nano.d.ts.map +1 -0
  24. package/dist/commands/text/seq.d.ts +4 -0
  25. package/dist/commands/text/seq.d.ts.map +1 -0
  26. package/dist/commands/text/strings.d.ts +4 -0
  27. package/dist/commands/text/strings.d.ts.map +1 -0
  28. package/dist/commands/text/tac.d.ts +4 -0
  29. package/dist/commands/text/tac.d.ts.map +1 -0
  30. package/dist/commands/types.d.ts +1 -0
  31. package/dist/commands/types.d.ts.map +1 -1
  32. package/dist/{cp-7dOXCu3Q.js → cp-CB-sGTRH.js} +1 -1
  33. package/dist/{cut-vn4vxL9L.js → cut-B79kgCm4.js} +1 -1
  34. package/dist/{diff-DnKPewP-.js → diff-D5Ej-JEe.js} +1 -1
  35. package/dist/{dirname-B3ciBZhS.js → dirname-w2Y6csox.js} +1 -1
  36. package/dist/{du-i2qiYYnL.js → du-UupzdKc_.js} +1 -1
  37. package/dist/fastfetch-aPM9Z3ym.js +310 -0
  38. package/dist/{file-Dd6iLk05.js → file-DOl4Wjtc.js} +1 -1
  39. package/dist/{find-Cz4GdaPT.js → find-C0T-P7sl.js} +1 -1
  40. package/dist/{grep-DYSAPbxr.js → grep-Blwrv9k5.js} +1 -1
  41. package/dist/{gunzip-BHAbNGHO.js → gunzip-R7EtgP15.js} +1 -1
  42. package/dist/{gzip-JLrrHn6u.js → gzip-BxF7M1np.js} +1 -1
  43. package/dist/{head-bFamSv7p.js → head-CJwcsX18.js} +1 -1
  44. package/dist/{index-BVIfyOAv.js → index-BjKSFBDg.js} +392 -330
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +32 -31
  48. package/dist/kernel/index.d.ts.map +1 -1
  49. package/dist/less-B0gFLJ_7.js +230 -0
  50. package/dist/{ls-BSsn2qVd.js → ls-YnhMRefh.js} +1 -1
  51. package/dist/{man-CJ5pI0_W.js → man-Dg26tZ-a.js} +19 -6
  52. package/dist/{mkdir-CF_ugDtu.js → mkdir-DY1P3Jxj.js} +1 -1
  53. package/dist/{mktemp-CaEiJi87.js → mktemp-BRzo2c8y.js} +1 -1
  54. package/dist/{mv-BSS_QQM-.js → mv-bH08L-F_.js} +1 -1
  55. package/dist/nano-CueO2oS0.js +304 -0
  56. package/dist/{nl-D30ka89P.js → nl-D26SSOD4.js} +1 -1
  57. package/dist/{realpath-BWqrTa-J.js → realpath-BH29Lem_.js} +1 -1
  58. package/dist/{rev-Cfja5xbl.js → rev-ySwmRf_K.js} +1 -1
  59. package/dist/{rm-DUR35EZn.js → rm-D7iWUUE2.js} +1 -1
  60. package/dist/{rmdir-DXjx17-Z.js → rmdir-BLtdNjt1.js} +1 -1
  61. package/dist/{sed-YKJ5wcuu.js → sed-DwBPYYFb.js} +1 -1
  62. package/dist/seq-B01YKIbO.js +37 -0
  63. package/dist/sha256sum-DED6ePiU.js +64 -0
  64. package/dist/shell/Shell.d.ts +1 -0
  65. package/dist/shell/Shell.d.ts.map +1 -1
  66. package/dist/shell/interpreter.d.ts.map +1 -1
  67. package/dist/shell/terminal-stdin.d.ts +4 -0
  68. package/dist/shell/terminal-stdin.d.ts.map +1 -1
  69. package/dist/sl-Dv4iPBN6.js +138 -0
  70. package/dist/{sort-C2sQ841N.js → sort-OXqZY83v.js} +1 -1
  71. package/dist/{stat-gLLpq3JZ.js → stat-BvwNpE5B.js} +1 -1
  72. package/dist/strings-BesRwUt_.js +42 -0
  73. package/dist/tac-D4BMSdj9.js +31 -0
  74. package/dist/{tail-FnC8M40k.js → tail-xVmLkzJK.js} +1 -1
  75. package/dist/{tar-tfiT1iFt.js → tar-BHRJ0-4j.js} +1 -1
  76. package/dist/{tee-CoymtuKa.js → tee-DxygINEJ.js} +1 -1
  77. package/dist/{touch-C4pyouV6.js → touch-DCb9Qn5q.js} +1 -1
  78. package/dist/{tree-DfPczgli.js → tree-4QpgsnA0.js} +1 -1
  79. package/dist/{uniq-Dhsoj7Lk.js → uniq-xmgE0zRj.js} +1 -1
  80. package/dist/{unzip-CqIKZ8NK.js → unzip-CDKcoB0B.js} +1 -1
  81. package/dist/{wc-DBPO6xRf.js → wc-B-jNRfLa.js} +1 -1
  82. package/dist/{wget-CYImxeOz.js → wget-CO-45JoL.js} +1 -1
  83. package/dist/whoami-Y18wqme3.js +25 -0
  84. package/dist/{zip-TPdwPkrA.js → zip-Cu1DzbAu.js} +1 -1
  85. package/package.json +2 -2
  86. package/dist/whoami-B1237V5e.js +0 -8
@@ -1,4 +1,4 @@
1
- import { r as E, i as N, c as S, V as $ } from "./index-BVIfyOAv.js";
1
+ import { r as E, i as N, c as S, V as $ } from "./index-BjKSFBDg.js";
2
2
  function W(e) {
3
3
  const o = [];
4
4
  let t = e.trim();
@@ -0,0 +1,72 @@
1
+ import { r as l, V as f } from "./index-BjKSFBDg.js";
2
+ function g(e) {
3
+ let i = "";
4
+ for (let s = 0; s < e.length; s++)
5
+ i += String.fromCharCode(e[s]);
6
+ return btoa(i);
7
+ }
8
+ function u(e) {
9
+ try {
10
+ return atob(e.replace(/\s/g, ""));
11
+ } catch {
12
+ throw new Error("invalid input");
13
+ }
14
+ }
15
+ const p = async (e) => {
16
+ let i = !1, s = 76;
17
+ const a = [];
18
+ for (let r = 0; r < e.args.length; r++) {
19
+ const t = e.args[r];
20
+ t === "-d" || t === "--decode" ? i = !0 : t === "-w" && r + 1 < e.args.length || t === "--wrap" && r + 1 < e.args.length ? s = parseInt(e.args[++r], 10) : (!t.startsWith("-") || t === "-") && a.push(t);
21
+ }
22
+ let n;
23
+ if (a.length === 1 && a[0] === "-")
24
+ if (e.stdin)
25
+ n = await e.stdin.readAll();
26
+ else
27
+ return e.stderr.write(`base64: missing input
28
+ `), 1;
29
+ else {
30
+ if (a.length === 0)
31
+ return e.stderr.write(`Usage: base64 [-d] [-w COLS] [FILE]
32
+ `), e.stderr.write(`Encode or decode base64. Use '-' to read from stdin.
33
+ `), 1;
34
+ {
35
+ const r = l(e.cwd, a[0]);
36
+ try {
37
+ i ? n = e.vfs.readFileString(r) : n = e.vfs.readFile(r);
38
+ } catch (t) {
39
+ if (t instanceof f)
40
+ return e.stderr.write(`base64: ${a[0]}: ${t.message}
41
+ `), 1;
42
+ throw t;
43
+ }
44
+ }
45
+ }
46
+ if (i)
47
+ try {
48
+ const r = typeof n == "string" ? n : new TextDecoder().decode(n);
49
+ e.stdout.write(u(r));
50
+ } catch {
51
+ return e.stderr.write(`base64: invalid input
52
+ `), 1;
53
+ }
54
+ else {
55
+ let r;
56
+ typeof n == "string" ? r = new TextEncoder().encode(n) : r = n;
57
+ let t = g(r);
58
+ if (s > 0) {
59
+ const d = [];
60
+ for (let o = 0; o < t.length; o += s)
61
+ d.push(t.slice(o, o + s));
62
+ t = d.join(`
63
+ `);
64
+ }
65
+ e.stdout.write(t + `
66
+ `);
67
+ }
68
+ return 0;
69
+ };
70
+ export {
71
+ p as default
72
+ };
@@ -1,4 +1,4 @@
1
- import { b as a } from "./index-BVIfyOAv.js";
1
+ import { b as a } from "./index-BjKSFBDg.js";
2
2
  const t = async (s) => {
3
3
  if (s.args.length === 0)
4
4
  return s.stderr.write(`basename: missing operand
@@ -1,4 +1,4 @@
1
- import { r as o, V as a } from "./index-BVIfyOAv.js";
1
+ import { r as o, V as a } from "./index-BjKSFBDg.js";
2
2
  const d = async (r) => {
3
3
  if (r.args.length === 0) {
4
4
  if (r.stdin) {
@@ -1,4 +1,4 @@
1
- import { r as u, V as l } from "./index-BVIfyOAv.js";
1
+ import { r as u, V as l } from "./index-BjKSFBDg.js";
2
2
  function h(t, d) {
3
3
  if (/^[0-7]+$/.test(t))
4
4
  return parseInt(t, 8);
@@ -1,5 +1,5 @@
1
1
  import { p as i } from "./args-CG6b9cZt.js";
2
- import { r as c, V as f } from "./index-BVIfyOAv.js";
2
+ import { r as c, V as f } from "./index-BjKSFBDg.js";
3
3
  const l = {
4
4
  recursive: { type: "boolean", short: "R" }
5
5
  }, d = async (s) => {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/commands/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,IAAI,CAA0D;IAEtE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAI9C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI;IAI7E,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKxB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAezD,IAAI,IAAI,MAAM,EAAE;CAIjB;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAoFvD"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/commands/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,IAAI,CAA0D;IAEtE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAI9C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI;IAI7E,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKxB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAezD,IAAI,IAAI,MAAM,EAAE;CAIjB;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CA8FvD"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=fastfetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastfetch.d.ts","sourceRoot":"","sources":["../../../src/commands/system/fastfetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAqT3C,QAAA,MAAM,OAAO,EAAE,OAoHd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from '../types.js';
2
+ export declare function createLogoutCommand(deleteToken: () => void, onExit: () => void): Command;
3
+ declare const _default: Command;
4
+ export default _default;
5
+ //# sourceMappingURL=logout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/commands/system/logout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAYxF;;AAED,wBAAuD"}
@@ -1 +1 @@
1
- {"version":3,"file":"man.d.ts","sourceRoot":"","sources":["../../../src/commands/system/man.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAqG3C,QAAA,MAAM,OAAO,EAAE,OA+Cd,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"man.d.ts","sourceRoot":"","sources":["../../../src/commands/system/man.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAqH3C,QAAA,MAAM,OAAO,EAAE,OA+Cd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=sha256sum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sha256sum.d.ts","sourceRoot":"","sources":["../../../src/commands/system/sha256sum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAc3C,QAAA,MAAM,OAAO,EAAE,OAwEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=sl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sl.d.ts","sourceRoot":"","sources":["../../../src/commands/system/sl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAoH3C,QAAA,MAAM,OAAO,EAAE,OAkId,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/commands/system/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,QAAA,MAAM,OAAO,EAAE,OAId,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/commands/system/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,QAAA,MAAM,OAAO,EAAE,OAwBd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=base64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/commands/text/base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAoB3C,QAAA,MAAM,OAAO,EAAE,OA+Ed,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=less.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../src/commands/text/less.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuB,MAAM,aAAa,CAAC;AAyPhE,QAAA,MAAM,OAAO,EAAE,OAmFd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=nano.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nano.d.ts","sourceRoot":"","sources":["../../../src/commands/text/nano.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuC,MAAM,aAAa,CAAC;AAsbhF,QAAA,MAAM,OAAO,EAAE,OAwEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=seq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seq.d.ts","sourceRoot":"","sources":["../../../src/commands/text/seq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,QAAA,MAAM,OAAO,EAAE,OAuEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=strings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/commands/text/strings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA2B3C,QAAA,MAAM,OAAO,EAAE,OA2Cd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '../types.js';
2
+ declare const command: Command;
3
+ export default command;
4
+ //# sourceMappingURL=tac.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tac.d.ts","sourceRoot":"","sources":["../../../src/commands/text/tac.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,QAAA,MAAM,OAAO,EAAE,OA8Bd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -15,6 +15,7 @@ export interface CommandContext {
15
15
  stderr: CommandOutputStream;
16
16
  signal: AbortSignal;
17
17
  stdin?: CommandInputStream;
18
+ setRawMode?: (enabled: boolean) => void;
18
19
  }
19
20
  export type Command = (ctx: CommandContext) => Promise<number>;
20
21
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/commands/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/commands/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { r as t, b as n, V as o } from "./index-BVIfyOAv.js";
1
+ import { r as t, b as n, V as o } from "./index-BjKSFBDg.js";
2
2
  const f = async (s) => {
3
3
  if (s.args.length < 2)
4
4
  return s.stderr.write(`cp: missing operand
@@ -1,4 +1,4 @@
1
- import { r as d, i as c, c as u, V as g } from "./index-BVIfyOAv.js";
1
+ import { r as d, i as c, c as u, V as g } from "./index-BjKSFBDg.js";
2
2
  function h(e) {
3
3
  const i = [];
4
4
  for (const r of e.split(",")) {
@@ -1,5 +1,5 @@
1
1
  import { p as k } from "./args-CG6b9cZt.js";
2
- import { r as g, i as m, c as C, V as y } from "./index-BVIfyOAv.js";
2
+ import { r as g, i as m, c as C, V as y } from "./index-BjKSFBDg.js";
3
3
  const S = {
4
4
  unified: { type: "boolean", short: "u" }
5
5
  };
@@ -1,4 +1,4 @@
1
- import { k as a } from "./index-BVIfyOAv.js";
1
+ import { k as a } from "./index-BjKSFBDg.js";
2
2
  const s = async (r) => {
3
3
  if (r.args.length === 0)
4
4
  return r.stderr.write(`dirname: missing operand
@@ -1,4 +1,4 @@
1
- import { r as y, V as g } from "./index-BVIfyOAv.js";
1
+ import { r as y, V as g } from "./index-BjKSFBDg.js";
2
2
  function u(t) {
3
3
  return t < 1024 ? t + "B" : t < 1024 * 1024 ? (t / 1024).toFixed(1) + "K" : t < 1024 * 1024 * 1024 ? (t / (1024 * 1024)).toFixed(1) + "M" : (t / (1024 * 1024 * 1024)).toFixed(1) + "G";
4
4
  }
@@ -0,0 +1,310 @@
1
+ const s = "\x1B[0m", w = "\x1B[1m";
2
+ function c(e) {
3
+ return `\x1B[38;5;${e}m`;
4
+ }
5
+ function y(e) {
6
+ return `\x1B[48;5;${e}m`;
7
+ }
8
+ function m(e, n, o) {
9
+ return `\x1B[38;2;${e};${n};${o}m`;
10
+ }
11
+ const b = {
12
+ black: c(0),
13
+ red: c(1),
14
+ green: c(2),
15
+ yellow: c(3),
16
+ blue: c(4),
17
+ magenta: c(5),
18
+ cyan: c(6),
19
+ white: c(7),
20
+ brightblack: c(8),
21
+ brightred: c(9),
22
+ brightgreen: c(10),
23
+ brightyellow: c(11),
24
+ brightblue: c(12),
25
+ brightmagenta: c(13),
26
+ brightcyan: c(14),
27
+ brightwhite: c(15)
28
+ };
29
+ function M(e) {
30
+ if (b[e]) return b[e];
31
+ const n = parseInt(e, 10);
32
+ return !isNaN(n) && n >= 0 && n <= 255 ? c(n) : c(14);
33
+ }
34
+ function k(e) {
35
+ const n = e, o = m(80, 200, 255), t = m(60, 160, 240), r = m(100, 120, 255), l = m(160, 100, 255), i = c(8);
36
+ return { lines: [
37
+ `${n} ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄${s}`,
38
+ `${n} ▄██${o}▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀${n}██▄${s}`,
39
+ `${n} ▄██${o}▀ ${n}██▄${s}`,
40
+ `${n} ██${o}▀ ${o}██ ▀ ████ ████ ${n}██${s}`,
41
+ `${n} ██${t} ${t}██ █ █▀ █ █ ${n}██${s}`,
42
+ `${n} ██${r} ${r}██ █ ███ █ █ ${n}██${s}`,
43
+ `${n} ██${r} ${r}██ █ █▄ █ █ ${n}██${s}`,
44
+ `${n} ██${l} ${l}██████ █ ██ ████ ${n}██${s}`,
45
+ `${n} ▀██${l}▄ ${n}██▀${s}`,
46
+ `${n} ▀██${l}▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄${n}██▀${s}`,
47
+ `${n} ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀${s}`,
48
+ `${i} the browser is the${s}`,
49
+ `${i} kernel${s}`
50
+ ], width: 38 };
51
+ }
52
+ function N(e) {
53
+ const n = e;
54
+ return { lines: [
55
+ `${n} ▗▖ ▀ ▗▀▀ ▗▀▀▖${s}`,
56
+ `${n} ▐▌ █ ▐▀ ▐ ▐${s}`,
57
+ `${n} ▐▙▄▖ █ ▐ ▝▀▀▘${s}`
58
+ ], width: 24 };
59
+ }
60
+ function O() {
61
+ return { lines: [], width: 0 };
62
+ }
63
+ function A(e, n) {
64
+ const o = e.split(`
65
+ `).map((r) => `${n}${r}${s}`);
66
+ let t = 0;
67
+ for (const r of e.split(`
68
+ `))
69
+ r.length > t && (t = r.length);
70
+ return { lines: o, width: t + 2 };
71
+ }
72
+ const g = {
73
+ logo: "default",
74
+ color: "brightcyan",
75
+ separator: "",
76
+ modules: [
77
+ "title",
78
+ "separator",
79
+ "os",
80
+ "host",
81
+ "kernel",
82
+ "uptime",
83
+ "packages",
84
+ "shell",
85
+ "terminal",
86
+ "cpu",
87
+ "memory",
88
+ "disk",
89
+ "locale",
90
+ "break",
91
+ "colors"
92
+ ]
93
+ };
94
+ function U(e) {
95
+ const n = [
96
+ "/home/user/.config/fastfetch/config.json",
97
+ "/home/user/.fastfetchrc"
98
+ ];
99
+ for (const o of n)
100
+ try {
101
+ const t = e.readFileString(o), r = JSON.parse(t);
102
+ return {
103
+ logo: r.logo ?? g.logo,
104
+ color: r.color ?? g.color,
105
+ separator: r.separator ?? g.separator,
106
+ modules: Array.isArray(r.modules) ? r.modules : g.modules
107
+ };
108
+ } catch {
109
+ }
110
+ return g;
111
+ }
112
+ function F() {
113
+ const e = performance.now(), n = Math.floor(e / 1e3), o = Math.floor(n / 86400), t = Math.floor(n % 86400 / 3600), r = Math.floor(n % 3600 / 60), l = [];
114
+ return o > 0 && l.push(`${o} day${o !== 1 ? "s" : ""}`), t > 0 && l.push(`${t} hour${t !== 1 ? "s" : ""}`), l.push(`${r} min${r !== 1 ? "s" : ""}`), l.join(", ");
115
+ }
116
+ function p(e) {
117
+ return e < 1024 ? e + " B" : e < 1024 * 1024 ? (e / 1024).toFixed(1) + " KiB" : e < 1024 * 1024 * 1024 ? (e / (1024 * 1024)).toFixed(1) + " MiB" : (e / (1024 * 1024 * 1024)).toFixed(2) + " GiB";
118
+ }
119
+ function I() {
120
+ const e = performance;
121
+ if (e.memory) {
122
+ const n = e.memory.usedJSHeapSize, o = e.memory.jsHeapSizeLimit, t = Math.round(n / o * 100);
123
+ return `${p(n)} / ${p(o)} (${t}%)`;
124
+ }
125
+ return "N/A";
126
+ }
127
+ function B(e) {
128
+ let n = 0, o = 0;
129
+ function t(l) {
130
+ try {
131
+ for (const i of e.readdir(l)) {
132
+ const u = l === "/" ? "/" + i.name : l + "/" + i.name;
133
+ i.type === "file" ? (o++, n += e.stat(u).size) : t(u);
134
+ }
135
+ } catch {
136
+ }
137
+ }
138
+ t("/");
139
+ const r = 256 * 1024 * 1024;
140
+ return `${p(n)} / ${p(r)} (${o} files)`;
141
+ }
142
+ function P() {
143
+ if (typeof navigator > "u") return "Unknown";
144
+ const e = navigator.userAgent;
145
+ if (e.includes("Firefox/")) {
146
+ const n = e.match(/Firefox\/([\d.]+)/);
147
+ return n ? `Firefox ${n[1]}` : "Firefox";
148
+ }
149
+ if (e.includes("Edg/")) {
150
+ const n = e.match(/Edg\/([\d.]+)/);
151
+ return n ? `Edge ${n[1]}` : "Edge";
152
+ }
153
+ if (e.includes("Chrome/")) {
154
+ const n = e.match(/Chrome\/([\d.]+)/);
155
+ return n ? `Chrome ${n[1]}` : "Chrome";
156
+ }
157
+ if (e.includes("Safari/")) {
158
+ const n = e.match(/Version\/([\d.]+)/);
159
+ return n ? `Safari ${n[1]}` : "Safari";
160
+ }
161
+ return "Unknown";
162
+ }
163
+ function T() {
164
+ if (typeof navigator > "u") return "Unknown";
165
+ const e = navigator.userAgent;
166
+ if (e.includes("Mac OS X")) {
167
+ const n = e.match(/Mac OS X ([\d_]+)/);
168
+ return n ? `macOS ${n[1].replace(/_/g, ".")}` : "macOS";
169
+ }
170
+ if (e.includes("Windows NT")) {
171
+ const n = e.match(/Windows NT ([\d.]+)/), o = n ? n[1] : "";
172
+ return o === "10.0" ? "Windows 10+" : `Windows NT ${o}`;
173
+ }
174
+ return e.includes("Linux") ? "Linux" : e.includes("Android") ? "Android" : e.includes("iPhone") || e.includes("iPad") ? "iOS" : "Unknown";
175
+ }
176
+ function j() {
177
+ return typeof navigator < "u" && navigator.hardwareConcurrency ? `${navigator.hardwareConcurrency} cores` : "N/A";
178
+ }
179
+ function D() {
180
+ return typeof navigator < "u" && navigator.language ? navigator.language : "en-US";
181
+ }
182
+ function z(e) {
183
+ try {
184
+ return e.readdir("/bin").length + 20;
185
+ } catch {
186
+ return 80;
187
+ }
188
+ }
189
+ function H() {
190
+ let e = "", n = "";
191
+ for (let o = 0; o < 8; o++) e += `${y(o)} ${s}`;
192
+ for (let o = 8; o < 16; o++) n += `${y(o)} ${s}`;
193
+ return [e, n];
194
+ }
195
+ function K(e, n, o, t) {
196
+ const r = (i, u) => `${w}${o}${i.padEnd(u)}${s}${t}`;
197
+ switch (e) {
198
+ case "title":
199
+ return `${w}${o}${n.user}${s}@${w}${o}${n.hostname}${s}`;
200
+ case "separator":
201
+ return `${c(8)}${"─".repeat(n.user.length + 1 + n.hostname.length)}${s}`;
202
+ case "os":
203
+ return `${r("OS", 10)}Lifo 1.0.0 (wasm)`;
204
+ case "host":
205
+ return `${r("Host", 10)}${P()} on ${T()}`;
206
+ case "kernel":
207
+ return `${r("Kernel", 10)}Lifo vfs+shell 1.0.0`;
208
+ case "uptime":
209
+ return `${r("Uptime", 10)}${F()}`;
210
+ case "packages":
211
+ return `${r("Packages", 10)}${z(n.vfs)} (builtins + commands)`;
212
+ case "shell":
213
+ return `${r("Shell", 10)}lifo-sh`;
214
+ case "terminal":
215
+ return `${r("Terminal", 10)}xterm.js (${n.cols}x${n.rows})`;
216
+ case "cpu":
217
+ return `${r("CPU", 10)}${j()}`;
218
+ case "memory":
219
+ return `${r("Memory", 10)}${I()}`;
220
+ case "disk":
221
+ return `${r("Disk (/)", 10)}${B(n.vfs)}`;
222
+ case "locale":
223
+ return `${r("Locale", 10)}${D()}`;
224
+ case "colors": {
225
+ const [i, u] = H();
226
+ return i + `
227
+ ` + u;
228
+ }
229
+ case "break":
230
+ return "";
231
+ default:
232
+ return null;
233
+ }
234
+ }
235
+ const R = async (e) => {
236
+ const n = U(e.vfs);
237
+ if (e.args.includes("--help") || e.args.includes("-h"))
238
+ return e.stdout.write(`Usage: fastfetch [--logo default|small|none] [--color COLOR]
239
+
240
+ Config file: ~/.config/fastfetch/config.json
241
+
242
+ Example config:
243
+ {
244
+ "logo": "default",
245
+ "color": "brightcyan",
246
+ "separator": "",
247
+ "modules": [
248
+ "title", "separator", "os", "host", "kernel",
249
+ "uptime", "packages", "shell", "terminal",
250
+ "cpu", "memory", "disk", "locale",
251
+ "break", "colors"
252
+ ]
253
+ }
254
+
255
+ Available modules:
256
+ title, separator, os, host, kernel, uptime, packages,
257
+ shell, terminal, cpu, memory, disk, locale, colors, break
258
+
259
+ Available logos: default, small, none (or put custom ASCII in config)
260
+
261
+ Colors: black, red, green, yellow, blue, magenta, cyan, white,
262
+ brightblack, brightred, brightgreen, brightyellow,
263
+ brightblue, brightmagenta, brightcyan, brightwhite,
264
+ or a number 0-255 for 256-color palette
265
+ `), 0;
266
+ let o = n.logo, t = n.color;
267
+ for (let a = 0; a < e.args.length; a++)
268
+ (e.args[a] === "--logo" || e.args[a] === "-l") && a + 1 < e.args.length && (o = e.args[++a]), (e.args[a] === "--color" || e.args[a] === "-c") && a + 1 < e.args.length && (t = e.args[++a]);
269
+ b[t] !== void 0 || !isNaN(parseInt(t, 10)) && parseInt(t, 10) >= 0 && parseInt(t, 10) <= 255 || e.stderr.write(`fastfetch: unknown color '${t}', using default (brightcyan)
270
+ `);
271
+ const l = M(t);
272
+ let i;
273
+ if (o === "default")
274
+ i = k(l);
275
+ else if (o === "small")
276
+ i = N(l);
277
+ else if (o === "none")
278
+ i = O();
279
+ else
280
+ try {
281
+ const a = e.vfs.readFileString(o);
282
+ i = A(a, l);
283
+ } catch {
284
+ i = k(l);
285
+ }
286
+ const u = e.env.USER || "user", C = e.env.HOSTNAME || "lifo", v = parseInt(e.env.COLUMNS || "80", 10), L = parseInt(e.env.LINES || "24", 10), W = { user: u, hostname: C, cols: v, rows: L, vfs: e.vfs }, d = [];
287
+ for (const a of n.modules) {
288
+ const h = K(a, W, l, n.separator);
289
+ if (h !== null)
290
+ for (const $ of h.split(`
291
+ `))
292
+ d.push($);
293
+ }
294
+ const E = Math.max(i.lines.length, d.length);
295
+ let f = `
296
+ `;
297
+ const S = " ";
298
+ for (let a = 0; a < E; a++) {
299
+ const h = a < i.lines.length ? i.lines[a] : "", $ = a < d.length ? d[a] : "";
300
+ i.width > 0 ? a < i.lines.length ? f += h + S + $ + `
301
+ ` : f += " ".repeat(i.width) + S + $ + `
302
+ ` : f += $ + `
303
+ `;
304
+ }
305
+ return f += `
306
+ `, e.stdout.write(f), 0;
307
+ };
308
+ export {
309
+ R as default
310
+ };
@@ -1,4 +1,4 @@
1
- import { r as d, e as c, V as f } from "./index-BVIfyOAv.js";
1
+ import { r as d, e as c, V as f } from "./index-BjKSFBDg.js";
2
2
  const n = {
3
3
  ".txt": "ASCII text",
4
4
  ".md": "Markdown text",
@@ -1,4 +1,4 @@
1
- import { r as m, V as d, g as p } from "./index-BVIfyOAv.js";
1
+ import { r as m, V as d, g as p } from "./index-BjKSFBDg.js";
2
2
  const c = async (t) => {
3
3
  let f = ".", i = "", a = "", l = 1 / 0;
4
4
  for (let e = 0; e < t.args.length; e++) {
@@ -1,4 +1,4 @@
1
- import { r as W, i as E, c as S, V as j } from "./index-BVIfyOAv.js";
1
+ import { r as W, i as E, c as S, V as j } from "./index-BjKSFBDg.js";
2
2
  const C = async (r) => {
3
3
  const c = r.args;
4
4
  let w = !1, y = !1, b = !1, u = !1, k = !1, p = !1, m = !1, o = "";
@@ -1,4 +1,4 @@
1
- import { r as u, j as d, V as l } from "./index-BVIfyOAv.js";
1
+ import { r as u, j as d, V as l } from "./index-BjKSFBDg.js";
2
2
  const g = async (e) => {
3
3
  let o = !1;
4
4
  const t = [];
@@ -1,4 +1,4 @@
1
- import { r as p, j as l, h as u, V as c } from "./index-BVIfyOAv.js";
1
+ import { r as p, j as l, h as u, V as c } from "./index-BjKSFBDg.js";
2
2
  const g = async (e) => {
3
3
  let t = !1, d = !1;
4
4
  const o = [];
@@ -1,4 +1,4 @@
1
- import { r as d, i as f, c as g, V as h } from "./index-BVIfyOAv.js";
1
+ import { r as d, i as f, c as g, V as h } from "./index-BjKSFBDg.js";
2
2
  const p = async (e) => {
3
3
  let n = 10;
4
4
  const r = [];