@vltpkg/cli-js 0.0.0-31 → 0.0.0-32
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/{build-LRDKUHJK.js → build-KMGMW3EZ.js} +8 -8
- package/{cache-I4JGFEM2.js → cache-PDCL2ZUG.js} +7 -7
- package/{chunk-ZF5MHRCT.js → chunk-2IYWVHBN.js} +5 -5
- package/{chunk-OUL7JE73.js → chunk-2UNCDUC4.js} +2 -2
- package/{chunk-EKBSQQ6W.js → chunk-3GMR34FM.js} +5 -5
- package/{chunk-SZ3KI24O.js → chunk-3T6A7YZ5.js} +2 -2
- package/{chunk-IDOEF6OJ.js → chunk-7FANUXII.js} +2 -2
- package/{chunk-5R5NSUCN.js → chunk-B3M3HY3X.js} +36 -36
- package/{chunk-5R5NSUCN.js.map → chunk-B3M3HY3X.js.map} +4 -4
- package/{chunk-JC4WASXA.js → chunk-B4MAUXR2.js} +195 -195
- package/{chunk-JC4WASXA.js.map → chunk-B4MAUXR2.js.map} +4 -4
- package/{chunk-N3Q26AXW.js → chunk-E64JLMRD.js} +2 -2
- package/{chunk-QEYM4UAU.js → chunk-J7HQZAES.js} +11 -6
- package/chunk-J7HQZAES.js.map +7 -0
- package/{chunk-EIOKPCZD.js → chunk-JYTPHQ4K.js} +4 -4
- package/{chunk-34YJRFHS.js → chunk-MHTZEJP3.js} +7 -7
- package/{chunk-BW4JKVB6.js → chunk-OY4QLBLS.js} +4 -4
- package/{chunk-NSZCBCC5.js → chunk-PALUZ2UX.js} +2 -2
- package/{chunk-IJH53F3B.js → chunk-PPT2YQ4P.js} +3 -3
- package/{chunk-DNNZSV6K.js → chunk-QEJDHVVK.js} +2 -2
- package/{chunk-2CGYSOAS.js → chunk-QI752L7R.js} +3 -3
- package/{chunk-SNQ4PO7Y.js → chunk-VNXRDROY.js} +2 -2
- package/{chunk-YVCRGHAO.js → chunk-WFRXX4YI.js} +5 -5
- package/chunk-XAUNNB4J.js +59 -0
- package/{chunk-K64USDHL.js.map → chunk-XAUNNB4J.js.map} +1 -1
- package/{chunk-P2BCNHZP.js → chunk-YQDU3VOE.js} +2 -1
- package/{chunk-P2BCNHZP.js.map → chunk-YQDU3VOE.js.map} +2 -2
- package/{chunk-MJ6IEING.js → chunk-ZVDNERGW.js} +9 -9
- package/{ci-37OJVYX5.js → ci-CWYKVWKH.js} +8 -8
- package/cli-package.json +2 -1
- package/{config-5A2CP5SV.js → config-JKPHMOZ5.js} +10 -10
- package/{config-VLHYTONG.js → config-TSS7Q2O4.js} +8 -8
- package/docs-ZQCCBSMY.js +2052 -0
- package/docs-ZQCCBSMY.js.map +7 -0
- package/{exec-ID3WRKLO.js → exec-ZX3PLEDA.js} +16 -16
- package/{exec-cache-A7HM5XPP.js → exec-cache-QPPQDNGW.js} +12 -12
- package/{exec-local-AXEJZE76.js → exec-local-N5MTZG4A.js} +15 -15
- package/{help-EI23EMPZ.js → help-ITLJK5ML.js} +4 -4
- package/{init-NB4R632S.js → init-HAPSHNV5.js} +7 -7
- package/{install-65NJ4HVW.js → install-NF7BKA7U.js} +9 -9
- package/{list-PYOZQWNI.js → list-ZH6NQGV5.js} +15 -15
- package/{login-UZO6WYY3.js → login-N4CQS2VA.js} +6 -6
- package/{logout-CGBNCC34.js → logout-LIDHTAZW.js} +6 -6
- package/{pack-F3ZVQYBI.js → pack-DD2Q2EFP.js} +14 -14
- package/package.json +1 -1
- package/{pkg-LHXQDKMQ.js → pkg-AQZBDQHR.js} +14 -14
- package/{publish-HTGCIY3S.js → publish-JG3QM654.js} +14 -14
- package/{query-6BHCY4RH.js → query-6ZXCB62J.js} +15 -15
- package/registry-client-package.json +1 -1
- package/{run-XHC3RPFG.js → run-S2GDX5LQ.js} +15 -15
- package/{run-exec-NF2PD6OG.js → run-exec-WKYKQ7YZ.js} +15 -15
- package/{serve-SPLWOC7D.js → serve-VPMETC7Q.js} +17 -17
- package/{src-XZR4K5W5.js → src-XYDPD2HX.js} +10 -10
- package/{token-KCFRIDIZ.js → token-X2QMBMYR.js} +6 -6
- package/{uninstall-4NT4N27K.js → uninstall-6HLK2PKW.js} +9 -9
- package/{update-YYJXOCPL.js → update-CFQEMARY.js} +8 -8
- package/{version-WO5L7MQP.js → version-QGOW3ROC.js} +13 -13
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-Q3S6RLSA.js → whoami-5J2DKCJX.js} +6 -6
- package/chunk-K64USDHL.js +0 -58
- package/chunk-QEYM4UAU.js.map +0 -7
- /package/{build-LRDKUHJK.js.map → build-KMGMW3EZ.js.map} +0 -0
- /package/{cache-I4JGFEM2.js.map → cache-PDCL2ZUG.js.map} +0 -0
- /package/{chunk-ZF5MHRCT.js.map → chunk-2IYWVHBN.js.map} +0 -0
- /package/{chunk-OUL7JE73.js.map → chunk-2UNCDUC4.js.map} +0 -0
- /package/{chunk-EKBSQQ6W.js.map → chunk-3GMR34FM.js.map} +0 -0
- /package/{chunk-SZ3KI24O.js.map → chunk-3T6A7YZ5.js.map} +0 -0
- /package/{chunk-IDOEF6OJ.js.map → chunk-7FANUXII.js.map} +0 -0
- /package/{chunk-N3Q26AXW.js.map → chunk-E64JLMRD.js.map} +0 -0
- /package/{chunk-EIOKPCZD.js.map → chunk-JYTPHQ4K.js.map} +0 -0
- /package/{chunk-34YJRFHS.js.map → chunk-MHTZEJP3.js.map} +0 -0
- /package/{chunk-BW4JKVB6.js.map → chunk-OY4QLBLS.js.map} +0 -0
- /package/{chunk-NSZCBCC5.js.map → chunk-PALUZ2UX.js.map} +0 -0
- /package/{chunk-IJH53F3B.js.map → chunk-PPT2YQ4P.js.map} +0 -0
- /package/{chunk-DNNZSV6K.js.map → chunk-QEJDHVVK.js.map} +0 -0
- /package/{chunk-2CGYSOAS.js.map → chunk-QI752L7R.js.map} +0 -0
- /package/{chunk-SNQ4PO7Y.js.map → chunk-VNXRDROY.js.map} +0 -0
- /package/{chunk-YVCRGHAO.js.map → chunk-WFRXX4YI.js.map} +0 -0
- /package/{chunk-MJ6IEING.js.map → chunk-ZVDNERGW.js.map} +0 -0
- /package/{ci-37OJVYX5.js.map → ci-CWYKVWKH.js.map} +0 -0
- /package/{config-5A2CP5SV.js.map → config-JKPHMOZ5.js.map} +0 -0
- /package/{config-VLHYTONG.js.map → config-TSS7Q2O4.js.map} +0 -0
- /package/{exec-ID3WRKLO.js.map → exec-ZX3PLEDA.js.map} +0 -0
- /package/{exec-cache-A7HM5XPP.js.map → exec-cache-QPPQDNGW.js.map} +0 -0
- /package/{exec-local-AXEJZE76.js.map → exec-local-N5MTZG4A.js.map} +0 -0
- /package/{help-EI23EMPZ.js.map → help-ITLJK5ML.js.map} +0 -0
- /package/{init-NB4R632S.js.map → init-HAPSHNV5.js.map} +0 -0
- /package/{install-65NJ4HVW.js.map → install-NF7BKA7U.js.map} +0 -0
- /package/{list-PYOZQWNI.js.map → list-ZH6NQGV5.js.map} +0 -0
- /package/{login-UZO6WYY3.js.map → login-N4CQS2VA.js.map} +0 -0
- /package/{logout-CGBNCC34.js.map → logout-LIDHTAZW.js.map} +0 -0
- /package/{pack-F3ZVQYBI.js.map → pack-DD2Q2EFP.js.map} +0 -0
- /package/{pkg-LHXQDKMQ.js.map → pkg-AQZBDQHR.js.map} +0 -0
- /package/{publish-HTGCIY3S.js.map → publish-JG3QM654.js.map} +0 -0
- /package/{query-6BHCY4RH.js.map → query-6ZXCB62J.js.map} +0 -0
- /package/{run-XHC3RPFG.js.map → run-S2GDX5LQ.js.map} +0 -0
- /package/{run-exec-NF2PD6OG.js.map → run-exec-WKYKQ7YZ.js.map} +0 -0
- /package/{serve-SPLWOC7D.js.map → serve-VPMETC7Q.js.map} +0 -0
- /package/{src-XZR4K5W5.js.map → src-XYDPD2HX.js.map} +0 -0
- /package/{token-KCFRIDIZ.js.map → token-X2QMBMYR.js.map} +0 -0
- /package/{uninstall-4NT4N27K.js.map → uninstall-6HLK2PKW.js.map} +0 -0
- /package/{update-YYJXOCPL.js.map → update-CFQEMARY.js.map} +0 -0
- /package/{version-WO5L7MQP.js.map → version-QGOW3ROC.js.map} +0 -0
- /package/{whoami-Q3S6RLSA.js.map → whoami-5J2DKCJX.js.map} +0 -0
|
@@ -5628,6 +5628,198 @@ function promiseSpawn(command, args, opts = {}, extra = {}) {
|
|
|
5628
5628
|
return new SpawnPromise(command, args, opts, extra);
|
|
5629
5629
|
}
|
|
5630
5630
|
|
|
5631
|
+
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/posix.js
|
|
5632
|
+
var posix_exports = {};
|
|
5633
|
+
__export(posix_exports, {
|
|
5634
|
+
isexe: () => isexe,
|
|
5635
|
+
sync: () => sync
|
|
5636
|
+
});
|
|
5637
|
+
import { statSync } from "node:fs";
|
|
5638
|
+
import { stat } from "node:fs/promises";
|
|
5639
|
+
var isexe = async (path2, options = {}) => {
|
|
5640
|
+
const { ignoreErrors = false } = options;
|
|
5641
|
+
try {
|
|
5642
|
+
return checkStat(await stat(path2), options);
|
|
5643
|
+
} catch (e) {
|
|
5644
|
+
const er = e;
|
|
5645
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
5646
|
+
return false;
|
|
5647
|
+
throw er;
|
|
5648
|
+
}
|
|
5649
|
+
};
|
|
5650
|
+
var sync = (path2, options = {}) => {
|
|
5651
|
+
const { ignoreErrors = false } = options;
|
|
5652
|
+
try {
|
|
5653
|
+
return checkStat(statSync(path2), options);
|
|
5654
|
+
} catch (e) {
|
|
5655
|
+
const er = e;
|
|
5656
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
5657
|
+
return false;
|
|
5658
|
+
throw er;
|
|
5659
|
+
}
|
|
5660
|
+
};
|
|
5661
|
+
var checkStat = (stat3, options) => stat3.isFile() && checkMode(stat3, options);
|
|
5662
|
+
var checkMode = (stat3, options) => {
|
|
5663
|
+
const myUid = options.uid ?? process.getuid?.();
|
|
5664
|
+
const myGroups = options.groups ?? process.getgroups?.() ?? [];
|
|
5665
|
+
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
|
|
5666
|
+
if (myUid === void 0 || myGid === void 0) {
|
|
5667
|
+
throw new Error("cannot get uid or gid");
|
|
5668
|
+
}
|
|
5669
|
+
const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]);
|
|
5670
|
+
const mod = stat3.mode;
|
|
5671
|
+
const uid = stat3.uid;
|
|
5672
|
+
const gid = stat3.gid;
|
|
5673
|
+
const u = parseInt("100", 8);
|
|
5674
|
+
const g = parseInt("010", 8);
|
|
5675
|
+
const o = parseInt("001", 8);
|
|
5676
|
+
const ug = u | g;
|
|
5677
|
+
return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0);
|
|
5678
|
+
};
|
|
5679
|
+
|
|
5680
|
+
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/win32.js
|
|
5681
|
+
var win32_exports = {};
|
|
5682
|
+
__export(win32_exports, {
|
|
5683
|
+
isexe: () => isexe2,
|
|
5684
|
+
sync: () => sync2
|
|
5685
|
+
});
|
|
5686
|
+
import { statSync as statSync2 } from "node:fs";
|
|
5687
|
+
import { stat as stat2 } from "node:fs/promises";
|
|
5688
|
+
var isexe2 = async (path2, options = {}) => {
|
|
5689
|
+
const { ignoreErrors = false } = options;
|
|
5690
|
+
try {
|
|
5691
|
+
return checkStat2(await stat2(path2), path2, options);
|
|
5692
|
+
} catch (e) {
|
|
5693
|
+
const er = e;
|
|
5694
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
5695
|
+
return false;
|
|
5696
|
+
throw er;
|
|
5697
|
+
}
|
|
5698
|
+
};
|
|
5699
|
+
var sync2 = (path2, options = {}) => {
|
|
5700
|
+
const { ignoreErrors = false } = options;
|
|
5701
|
+
try {
|
|
5702
|
+
return checkStat2(statSync2(path2), path2, options);
|
|
5703
|
+
} catch (e) {
|
|
5704
|
+
const er = e;
|
|
5705
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
5706
|
+
return false;
|
|
5707
|
+
throw er;
|
|
5708
|
+
}
|
|
5709
|
+
};
|
|
5710
|
+
var checkPathExt = (path2, options) => {
|
|
5711
|
+
const { pathExt = process.env.PATHEXT || "" } = options;
|
|
5712
|
+
const peSplit = pathExt.split(";");
|
|
5713
|
+
if (peSplit.indexOf("") !== -1) {
|
|
5714
|
+
return true;
|
|
5715
|
+
}
|
|
5716
|
+
for (let i = 0; i < peSplit.length; i++) {
|
|
5717
|
+
const p = peSplit[i].toLowerCase();
|
|
5718
|
+
const ext2 = path2.substring(path2.length - p.length).toLowerCase();
|
|
5719
|
+
if (p && ext2 === p) {
|
|
5720
|
+
return true;
|
|
5721
|
+
}
|
|
5722
|
+
}
|
|
5723
|
+
return false;
|
|
5724
|
+
};
|
|
5725
|
+
var checkStat2 = (stat3, path2, options) => stat3.isFile() && checkPathExt(path2, options);
|
|
5726
|
+
|
|
5727
|
+
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/index.js
|
|
5728
|
+
var platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
|
|
5729
|
+
var impl = platform === "win32" ? win32_exports : posix_exports;
|
|
5730
|
+
var isexe3 = impl.isexe;
|
|
5731
|
+
var sync3 = impl.sync;
|
|
5732
|
+
|
|
5733
|
+
// ../../src/which/src/index.ts
|
|
5734
|
+
import { delimiter, join, sep as sep2 } from "node:path";
|
|
5735
|
+
var isWindows = process.platform === "win32";
|
|
5736
|
+
var rSlash = sep2 === "/" ? /\// : /[\\/]/;
|
|
5737
|
+
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
5738
|
+
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
5739
|
+
var getPathInfo = (cmd, {
|
|
5740
|
+
path: optPath = process.env.PATH,
|
|
5741
|
+
pathExt: optPathExt = process.env.PATHEXT,
|
|
5742
|
+
delimiter: optDelimiter = delimiter
|
|
5743
|
+
}) => {
|
|
5744
|
+
const pathEnv = cmd.match(rSlash) ? [""] : [
|
|
5745
|
+
// windows always checks the cwd first
|
|
5746
|
+
/* c8 ignore next - platform-specific */
|
|
5747
|
+
...isWindows ? [process.cwd()] : [],
|
|
5748
|
+
...(optPath ?? /* c8 ignore next - very unusual */
|
|
5749
|
+
"").split(
|
|
5750
|
+
optDelimiter
|
|
5751
|
+
)
|
|
5752
|
+
];
|
|
5753
|
+
if (isWindows) {
|
|
5754
|
+
const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
|
|
5755
|
+
const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
|
|
5756
|
+
if (cmd.includes(".") && pathExt[0] !== "") {
|
|
5757
|
+
pathExt.unshift("");
|
|
5758
|
+
}
|
|
5759
|
+
return { pathEnv, pathExt, pathExtExe };
|
|
5760
|
+
}
|
|
5761
|
+
return { pathEnv, pathExt: [""] };
|
|
5762
|
+
};
|
|
5763
|
+
var getPathPart = (raw, cmd) => {
|
|
5764
|
+
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
5765
|
+
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
5766
|
+
return prefix + join(pathPart, cmd);
|
|
5767
|
+
};
|
|
5768
|
+
async function which(cmd, opt = {}) {
|
|
5769
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
5770
|
+
const found = [];
|
|
5771
|
+
for (const envPart of pathEnv) {
|
|
5772
|
+
const p = getPathPart(envPart, cmd);
|
|
5773
|
+
for (const ext2 of pathExt) {
|
|
5774
|
+
const withExt = p + ext2;
|
|
5775
|
+
const is = await isexe3(withExt, {
|
|
5776
|
+
pathExt: pathExtExe,
|
|
5777
|
+
ignoreErrors: true
|
|
5778
|
+
});
|
|
5779
|
+
if (is) {
|
|
5780
|
+
if (!opt.all) {
|
|
5781
|
+
return withExt;
|
|
5782
|
+
}
|
|
5783
|
+
found.push(withExt);
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
}
|
|
5787
|
+
if (opt.all && found.length) {
|
|
5788
|
+
return found;
|
|
5789
|
+
}
|
|
5790
|
+
if (opt.nothrow) {
|
|
5791
|
+
return null;
|
|
5792
|
+
}
|
|
5793
|
+
throw getNotFoundError(cmd);
|
|
5794
|
+
}
|
|
5795
|
+
function whichSync(cmd, opt = {}) {
|
|
5796
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
5797
|
+
const found = [];
|
|
5798
|
+
for (const pathEnvPart of pathEnv) {
|
|
5799
|
+
const p = getPathPart(pathEnvPart, cmd);
|
|
5800
|
+
for (const ext2 of pathExt) {
|
|
5801
|
+
const withExt = p + ext2;
|
|
5802
|
+
const is = sync3(withExt, {
|
|
5803
|
+
pathExt: pathExtExe,
|
|
5804
|
+
ignoreErrors: true
|
|
5805
|
+
});
|
|
5806
|
+
if (is) {
|
|
5807
|
+
if (!opt.all) {
|
|
5808
|
+
return withExt;
|
|
5809
|
+
}
|
|
5810
|
+
found.push(withExt);
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
if (opt.all && found.length) {
|
|
5815
|
+
return found;
|
|
5816
|
+
}
|
|
5817
|
+
if (opt.nothrow) {
|
|
5818
|
+
return null;
|
|
5819
|
+
}
|
|
5820
|
+
throw getNotFoundError(cmd);
|
|
5821
|
+
}
|
|
5822
|
+
|
|
5631
5823
|
// ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/glob.js
|
|
5632
5824
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
5633
5825
|
|
|
@@ -6668,14 +6860,14 @@ var iterateSync = globIterateSync;
|
|
|
6668
6860
|
var iterate = Object.assign(globIterate, {
|
|
6669
6861
|
sync: globIterateSync
|
|
6670
6862
|
});
|
|
6671
|
-
var
|
|
6863
|
+
var sync4 = Object.assign(globSync, {
|
|
6672
6864
|
stream: globStreamSync,
|
|
6673
6865
|
iterate: globIterateSync
|
|
6674
6866
|
});
|
|
6675
6867
|
var glob = Object.assign(glob_, {
|
|
6676
6868
|
glob: glob_,
|
|
6677
6869
|
globSync,
|
|
6678
|
-
sync,
|
|
6870
|
+
sync: sync4,
|
|
6679
6871
|
globStream,
|
|
6680
6872
|
stream,
|
|
6681
6873
|
globStreamSync,
|
|
@@ -6691,198 +6883,6 @@ var glob = Object.assign(glob_, {
|
|
|
6691
6883
|
});
|
|
6692
6884
|
glob.glob = glob;
|
|
6693
6885
|
|
|
6694
|
-
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/posix.js
|
|
6695
|
-
var posix_exports = {};
|
|
6696
|
-
__export(posix_exports, {
|
|
6697
|
-
isexe: () => isexe,
|
|
6698
|
-
sync: () => sync2
|
|
6699
|
-
});
|
|
6700
|
-
import { statSync } from "node:fs";
|
|
6701
|
-
import { stat } from "node:fs/promises";
|
|
6702
|
-
var isexe = async (path2, options = {}) => {
|
|
6703
|
-
const { ignoreErrors = false } = options;
|
|
6704
|
-
try {
|
|
6705
|
-
return checkStat(await stat(path2), options);
|
|
6706
|
-
} catch (e) {
|
|
6707
|
-
const er = e;
|
|
6708
|
-
if (ignoreErrors || er.code === "EACCES")
|
|
6709
|
-
return false;
|
|
6710
|
-
throw er;
|
|
6711
|
-
}
|
|
6712
|
-
};
|
|
6713
|
-
var sync2 = (path2, options = {}) => {
|
|
6714
|
-
const { ignoreErrors = false } = options;
|
|
6715
|
-
try {
|
|
6716
|
-
return checkStat(statSync(path2), options);
|
|
6717
|
-
} catch (e) {
|
|
6718
|
-
const er = e;
|
|
6719
|
-
if (ignoreErrors || er.code === "EACCES")
|
|
6720
|
-
return false;
|
|
6721
|
-
throw er;
|
|
6722
|
-
}
|
|
6723
|
-
};
|
|
6724
|
-
var checkStat = (stat3, options) => stat3.isFile() && checkMode(stat3, options);
|
|
6725
|
-
var checkMode = (stat3, options) => {
|
|
6726
|
-
const myUid = options.uid ?? process.getuid?.();
|
|
6727
|
-
const myGroups = options.groups ?? process.getgroups?.() ?? [];
|
|
6728
|
-
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
|
|
6729
|
-
if (myUid === void 0 || myGid === void 0) {
|
|
6730
|
-
throw new Error("cannot get uid or gid");
|
|
6731
|
-
}
|
|
6732
|
-
const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]);
|
|
6733
|
-
const mod = stat3.mode;
|
|
6734
|
-
const uid = stat3.uid;
|
|
6735
|
-
const gid = stat3.gid;
|
|
6736
|
-
const u = parseInt("100", 8);
|
|
6737
|
-
const g = parseInt("010", 8);
|
|
6738
|
-
const o = parseInt("001", 8);
|
|
6739
|
-
const ug = u | g;
|
|
6740
|
-
return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0);
|
|
6741
|
-
};
|
|
6742
|
-
|
|
6743
|
-
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/win32.js
|
|
6744
|
-
var win32_exports = {};
|
|
6745
|
-
__export(win32_exports, {
|
|
6746
|
-
isexe: () => isexe2,
|
|
6747
|
-
sync: () => sync3
|
|
6748
|
-
});
|
|
6749
|
-
import { statSync as statSync2 } from "node:fs";
|
|
6750
|
-
import { stat as stat2 } from "node:fs/promises";
|
|
6751
|
-
var isexe2 = async (path2, options = {}) => {
|
|
6752
|
-
const { ignoreErrors = false } = options;
|
|
6753
|
-
try {
|
|
6754
|
-
return checkStat2(await stat2(path2), path2, options);
|
|
6755
|
-
} catch (e) {
|
|
6756
|
-
const er = e;
|
|
6757
|
-
if (ignoreErrors || er.code === "EACCES")
|
|
6758
|
-
return false;
|
|
6759
|
-
throw er;
|
|
6760
|
-
}
|
|
6761
|
-
};
|
|
6762
|
-
var sync3 = (path2, options = {}) => {
|
|
6763
|
-
const { ignoreErrors = false } = options;
|
|
6764
|
-
try {
|
|
6765
|
-
return checkStat2(statSync2(path2), path2, options);
|
|
6766
|
-
} catch (e) {
|
|
6767
|
-
const er = e;
|
|
6768
|
-
if (ignoreErrors || er.code === "EACCES")
|
|
6769
|
-
return false;
|
|
6770
|
-
throw er;
|
|
6771
|
-
}
|
|
6772
|
-
};
|
|
6773
|
-
var checkPathExt = (path2, options) => {
|
|
6774
|
-
const { pathExt = process.env.PATHEXT || "" } = options;
|
|
6775
|
-
const peSplit = pathExt.split(";");
|
|
6776
|
-
if (peSplit.indexOf("") !== -1) {
|
|
6777
|
-
return true;
|
|
6778
|
-
}
|
|
6779
|
-
for (let i = 0; i < peSplit.length; i++) {
|
|
6780
|
-
const p = peSplit[i].toLowerCase();
|
|
6781
|
-
const ext2 = path2.substring(path2.length - p.length).toLowerCase();
|
|
6782
|
-
if (p && ext2 === p) {
|
|
6783
|
-
return true;
|
|
6784
|
-
}
|
|
6785
|
-
}
|
|
6786
|
-
return false;
|
|
6787
|
-
};
|
|
6788
|
-
var checkStat2 = (stat3, path2, options) => stat3.isFile() && checkPathExt(path2, options);
|
|
6789
|
-
|
|
6790
|
-
// ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/mjs/index.js
|
|
6791
|
-
var platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
|
|
6792
|
-
var impl = platform === "win32" ? win32_exports : posix_exports;
|
|
6793
|
-
var isexe3 = impl.isexe;
|
|
6794
|
-
var sync4 = impl.sync;
|
|
6795
|
-
|
|
6796
|
-
// ../../src/which/src/index.ts
|
|
6797
|
-
import { delimiter, join, sep as sep2 } from "node:path";
|
|
6798
|
-
var isWindows = process.platform === "win32";
|
|
6799
|
-
var rSlash = sep2 === "/" ? /\// : /[\\/]/;
|
|
6800
|
-
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
6801
|
-
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
6802
|
-
var getPathInfo = (cmd, {
|
|
6803
|
-
path: optPath = process.env.PATH,
|
|
6804
|
-
pathExt: optPathExt = process.env.PATHEXT,
|
|
6805
|
-
delimiter: optDelimiter = delimiter
|
|
6806
|
-
}) => {
|
|
6807
|
-
const pathEnv = cmd.match(rSlash) ? [""] : [
|
|
6808
|
-
// windows always checks the cwd first
|
|
6809
|
-
/* c8 ignore next - platform-specific */
|
|
6810
|
-
...isWindows ? [process.cwd()] : [],
|
|
6811
|
-
...(optPath ?? /* c8 ignore next - very unusual */
|
|
6812
|
-
"").split(
|
|
6813
|
-
optDelimiter
|
|
6814
|
-
)
|
|
6815
|
-
];
|
|
6816
|
-
if (isWindows) {
|
|
6817
|
-
const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
|
|
6818
|
-
const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
|
|
6819
|
-
if (cmd.includes(".") && pathExt[0] !== "") {
|
|
6820
|
-
pathExt.unshift("");
|
|
6821
|
-
}
|
|
6822
|
-
return { pathEnv, pathExt, pathExtExe };
|
|
6823
|
-
}
|
|
6824
|
-
return { pathEnv, pathExt: [""] };
|
|
6825
|
-
};
|
|
6826
|
-
var getPathPart = (raw, cmd) => {
|
|
6827
|
-
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
6828
|
-
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
6829
|
-
return prefix + join(pathPart, cmd);
|
|
6830
|
-
};
|
|
6831
|
-
async function which(cmd, opt = {}) {
|
|
6832
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
6833
|
-
const found = [];
|
|
6834
|
-
for (const envPart of pathEnv) {
|
|
6835
|
-
const p = getPathPart(envPart, cmd);
|
|
6836
|
-
for (const ext2 of pathExt) {
|
|
6837
|
-
const withExt = p + ext2;
|
|
6838
|
-
const is = await isexe3(withExt, {
|
|
6839
|
-
pathExt: pathExtExe,
|
|
6840
|
-
ignoreErrors: true
|
|
6841
|
-
});
|
|
6842
|
-
if (is) {
|
|
6843
|
-
if (!opt.all) {
|
|
6844
|
-
return withExt;
|
|
6845
|
-
}
|
|
6846
|
-
found.push(withExt);
|
|
6847
|
-
}
|
|
6848
|
-
}
|
|
6849
|
-
}
|
|
6850
|
-
if (opt.all && found.length) {
|
|
6851
|
-
return found;
|
|
6852
|
-
}
|
|
6853
|
-
if (opt.nothrow) {
|
|
6854
|
-
return null;
|
|
6855
|
-
}
|
|
6856
|
-
throw getNotFoundError(cmd);
|
|
6857
|
-
}
|
|
6858
|
-
function whichSync(cmd, opt = {}) {
|
|
6859
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
6860
|
-
const found = [];
|
|
6861
|
-
for (const pathEnvPart of pathEnv) {
|
|
6862
|
-
const p = getPathPart(pathEnvPart, cmd);
|
|
6863
|
-
for (const ext2 of pathExt) {
|
|
6864
|
-
const withExt = p + ext2;
|
|
6865
|
-
const is = sync4(withExt, {
|
|
6866
|
-
pathExt: pathExtExe,
|
|
6867
|
-
ignoreErrors: true
|
|
6868
|
-
});
|
|
6869
|
-
if (is) {
|
|
6870
|
-
if (!opt.all) {
|
|
6871
|
-
return withExt;
|
|
6872
|
-
}
|
|
6873
|
-
found.push(withExt);
|
|
6874
|
-
}
|
|
6875
|
-
}
|
|
6876
|
-
}
|
|
6877
|
-
if (opt.all && found.length) {
|
|
6878
|
-
return found;
|
|
6879
|
-
}
|
|
6880
|
-
if (opt.nothrow) {
|
|
6881
|
-
return null;
|
|
6882
|
-
}
|
|
6883
|
-
throw getNotFoundError(cmd);
|
|
6884
|
-
}
|
|
6885
|
-
|
|
6886
6886
|
export {
|
|
6887
6887
|
LRUCache,
|
|
6888
6888
|
promiseSpawn,
|
|
@@ -6894,4 +6894,4 @@ export {
|
|
|
6894
6894
|
globSync,
|
|
6895
6895
|
glob
|
|
6896
6896
|
};
|
|
6897
|
-
//# sourceMappingURL=chunk-
|
|
6897
|
+
//# sourceMappingURL=chunk-B4MAUXR2.js.map
|