@lifo-sh/core 0.4.0 → 0.4.2

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 (47) hide show
  1. package/dist/{awk-CI8X5kVy.js → awk-C6CYe7-Y.js} +1 -1
  2. package/dist/{basename-D8VowKZK.js → basename-DWmNG86a.js} +1 -1
  3. package/dist/{cat-BPj_LHfi.js → cat-CJGzb2e3.js} +1 -1
  4. package/dist/{chmod-pNQSdBnq.js → chmod-jxQWlanu.js} +1 -1
  5. package/dist/{chown-BzpeyVqg.js → chown-B1-u84Sk.js} +1 -1
  6. package/dist/commands/registry.d.ts +1 -0
  7. package/dist/commands/registry.d.ts.map +1 -1
  8. package/dist/commands/system/lifo.d.ts +1 -1
  9. package/dist/commands/system/lifo.d.ts.map +1 -1
  10. package/dist/commands/system/npm.d.ts +7 -0
  11. package/dist/commands/system/npm.d.ts.map +1 -1
  12. package/dist/{cp-_rhci8W9.js → cp-DfLycDOs.js} +1 -1
  13. package/dist/{cut-Q5nQyrUo.js → cut-Cx3rJJBs.js} +1 -1
  14. package/dist/{diff-Dvc96Xgm.js → diff-BNTf3WBA.js} +1 -1
  15. package/dist/{dirname-B9Rm-O9I.js → dirname-BAkBrBEd.js} +1 -1
  16. package/dist/{du-Cv4zAsqm.js → du-z_BgTafK.js} +1 -1
  17. package/dist/{file-Cxgmm1Vo.js → file-BcMiRsYy.js} +1 -1
  18. package/dist/{find-BJNOna6S.js → find-CnuafYlN.js} +1 -1
  19. package/dist/{grep-vdjjGK6g.js → grep-CRKDa1ht.js} +1 -1
  20. package/dist/{gunzip-AmY9PUj2.js → gunzip-CQPu5wlU.js} +1 -1
  21. package/dist/{gzip-C_08tX3p.js → gzip-5Z4ubCZY.js} +1 -1
  22. package/dist/{head-DGXxKqPE.js → head-CHtqgY7i.js} +1 -1
  23. package/dist/{index-CvsPTm3-.js → index-CfhPq6Ru.js} +703 -655
  24. package/dist/index.js +1 -1
  25. package/dist/{ls-BOMe19Ls.js → ls-KhZ3RDtV.js} +1 -1
  26. package/dist/{mkdir-DE5ZBdl1.js → mkdir-CyaDOAjy.js} +1 -1
  27. package/dist/{mktemp-De1K5WCb.js → mktemp-BdOMKqeO.js} +1 -1
  28. package/dist/{mv-Cw8pg9wR.js → mv-BKse5fAw.js} +1 -1
  29. package/dist/{nl-C-osPl2N.js → nl-CR1TwNHf.js} +1 -1
  30. package/dist/{realpath-BSWdZLjf.js → realpath-Bn-E4jFG.js} +1 -1
  31. package/dist/{rev-3C5MtCkc.js → rev-zIT5u7gK.js} +1 -1
  32. package/dist/{rm-CR560cHz.js → rm-CwcGV_yP.js} +1 -1
  33. package/dist/{rmdir-BO4Jz3r5.js → rmdir-C0n1UKoB.js} +1 -1
  34. package/dist/{sed-DCUgJWcA.js → sed-Dpeoa9n0.js} +1 -1
  35. package/dist/{sort-or-F_iEY.js → sort-B0CyoWxT.js} +1 -1
  36. package/dist/{stat-MGHvbiS7.js → stat-CRPxoOhV.js} +1 -1
  37. package/dist/{tail-DheqHGe2.js → tail-X6H5EAuw.js} +1 -1
  38. package/dist/{tar-DhLtWtBV.js → tar-B8rlvBTm.js} +1 -1
  39. package/dist/{tee-D47GOzfR.js → tee-BNSgK_iU.js} +1 -1
  40. package/dist/{touch-D7Xd2vNM.js → touch-BePpbvnW.js} +1 -1
  41. package/dist/{tree-CRpLFDhe.js → tree-CgYdJHGr.js} +1 -1
  42. package/dist/{uniq-DwHCe--v.js → uniq-BCe-YCgo.js} +1 -1
  43. package/dist/{unzip-DPEg74Aq.js → unzip-ByMOFz0R.js} +1 -1
  44. package/dist/{wc-BUIoLfSN.js → wc-BoOwcYXR.js} +1 -1
  45. package/dist/{wget-BwmpusXQ.js → wget-D9TxbSi0.js} +1 -1
  46. package/dist/{zip-B4jRyQ7B.js → zip-ZGFNiBLk.js} +1 -1
  47. package/package.json +9 -9
@@ -1,4 +1,4 @@
1
- import { r as E, i as N, c as S, V as $ } from "./index-CvsPTm3-.js";
1
+ import { r as E, i as N, c as S, V as $ } from "./index-CfhPq6Ru.js";
2
2
  function W(e) {
3
3
  const o = [];
4
4
  let t = e.trim();
@@ -1,4 +1,4 @@
1
- import { b as a } from "./index-CvsPTm3-.js";
1
+ import { b as a } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as o, V as a } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as u, V as l } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
2
+ import { r as c, V as f } from "./index-CfhPq6Ru.js";
3
3
  const l = {
4
4
  recursive: { type: "boolean", short: "R" }
5
5
  }, d = async (s) => {
@@ -6,6 +6,7 @@ export declare class CommandRegistry {
6
6
  registerLazy(name: string, loader: () => Promise<{
7
7
  default: Command;
8
8
  }>): void;
9
+ unregister(name: string): void;
9
10
  resolve(name: string): Promise<Command | undefined>;
10
11
  list(): string[];
11
12
  }
@@ -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;IAIvE,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,CAoFvD"}
@@ -2,7 +2,7 @@ import { Command } from '../types.js';
2
2
  import { CommandRegistry } from '../registry.js';
3
3
  import { VFS } from '../../kernel/vfs/index.js';
4
4
  import { ShellExecuteFn } from './npm.js';
5
- export declare function createLifoPkgCommand(registry: CommandRegistry, shellExecute?: ShellExecuteFn): Command;
5
+ export declare function createLifoPkgCommand(registry: CommandRegistry, _shellExecute?: ShellExecuteFn): Command;
6
6
  /**
7
7
  * Boot-time loader: restores dev-linked commands + re-registers
8
8
  * installed lifo packages with the lifo runtime.
@@ -1 +1 @@
1
- {"version":3,"file":"lifo.d.ts","sourceRoot":"","sources":["../../../src/commands/system/lifo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAuC,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA4X/C,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,YAAY,CAAC,EAAE,cAAc,GAC5B,OAAO,CAkCT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAkC1E"}
1
+ {"version":3,"file":"lifo.d.ts","sourceRoot":"","sources":["../../../src/commands/system/lifo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAuC,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAwY/C,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,aAAa,CAAC,EAAE,cAAc,GAC7B,OAAO,CAkCT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAkC1E"}
@@ -2,4 +2,11 @@ import { Command, CommandContext } from '../types.js';
2
2
  import { CommandRegistry } from '../registry.js';
3
3
  export type ShellExecuteFn = (cmd: string, ctx: CommandContext) => Promise<number>;
4
4
  export declare function createNpmCommand(registry: CommandRegistry, shellExecute?: ShellExecuteFn): Command;
5
+ /**
6
+ * Install a single npm package globally into the VFS.
7
+ *
8
+ * Called directly by `lifo install` to avoid the shell.execute()
9
+ * round-trip which can silently swallow output and errors.
10
+ */
11
+ export declare function npmInstallGlobal(packageName: string, ctx: CommandContext, registry: CommandRegistry): Promise<number>;
5
12
  //# sourceMappingURL=npm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../../src/commands/system/npm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAyCtD,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,MAAM,CAAC,CAAC;AA2sBrB,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,OAAO,CA+ClG"}
1
+ {"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../../src/commands/system/npm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAyCtD,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,MAAM,CAAC,CAAC;AA2sBrB,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,OAAO,CA+ClG;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
@@ -1,4 +1,4 @@
1
- import { r as t, b as n, V as o } from "./index-CvsPTm3-.js";
1
+ import { r as t, b as n, V as o } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as d, i as c, c as u, V as g } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
2
+ import { r as g, i as m, c as C, V as y } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { k as a } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as y, V as g } from "./index-CfhPq6Ru.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
  }
@@ -1,4 +1,4 @@
1
- import { r as d, e as c, V as f } from "./index-CvsPTm3-.js";
1
+ import { r as d, e as c, V as f } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as m, V as d, g as p } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as W, i as E, c as S, V as j } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as u, j as d, V as l } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as p, j as l, h as u, V as c } from "./index-CfhPq6Ru.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-CvsPTm3-.js";
1
+ import { r as d, i as f, c as g, V as h } from "./index-CfhPq6Ru.js";
2
2
  const p = async (e) => {
3
3
  let n = 10;
4
4
  const r = [];