+1458
-56
lines changedFilter options
+1458
-56
lines changed Original file line number Diff line number Diff line change
@@ -18,6 +18,11 @@
18
18
!/@npmcli/agent
19
19
!/@npmcli/fs
20
20
!/@npmcli/git
21
+
!/@npmcli/git/node_modules/
22
+
/@npmcli/git/node_modules/*
23
+
!/@npmcli/git/node_modules/@npmcli/
24
+
/@npmcli/git/node_modules/@npmcli/*
25
+
!/@npmcli/git/node_modules/@npmcli/promise-spawn
21
26
!/@npmcli/installed-package-contents
22
27
!/@npmcli/map-workspaces
23
28
!/@npmcli/map-workspaces/node_modules/
@@ -34,7 +39,6 @@
34
39
!/@npmcli/package-json/node_modules/@npmcli/
35
40
/@npmcli/package-json/node_modules/@npmcli/*
36
41
!/@npmcli/package-json/node_modules/@npmcli/git
37
-
!/@npmcli/package-json/node_modules/@npmcli/promise-spawn
38
42
!/@npmcli/package-json/node_modules/hosted-git-info
39
43
!/@npmcli/package-json/node_modules/ini
40
44
!/@npmcli/package-json/node_modules/isexe
@@ -48,6 +52,10 @@
48
52
!/@npmcli/package-json/node_modules/validate-npm-package-name
49
53
!/@npmcli/package-json/node_modules/which
50
54
!/@npmcli/promise-spawn
55
+
!/@npmcli/promise-spawn/node_modules/
56
+
/@npmcli/promise-spawn/node_modules/*
57
+
!/@npmcli/promise-spawn/node_modules/isexe
58
+
!/@npmcli/promise-spawn/node_modules/which
51
59
!/@npmcli/query
52
60
!/@npmcli/redact
53
61
!/@npmcli/run-script
@@ -56,6 +64,7 @@
56
64
!/@npmcli/run-script/node_modules/@npmcli/
57
65
/@npmcli/run-script/node_modules/@npmcli/*
58
66
!/@npmcli/run-script/node_modules/@npmcli/package-json
67
+
!/@npmcli/run-script/node_modules/@npmcli/promise-spawn
59
68
!/@pkgjs/
60
69
/@pkgjs/*
61
70
!/@pkgjs/parseargs
@@ -194,6 +203,7 @@
194
203
!/pacote/node_modules/@npmcli/
195
204
/pacote/node_modules/@npmcli/*
196
205
!/pacote/node_modules/@npmcli/package-json
206
+
!/pacote/node_modules/@npmcli/promise-spawn
197
207
!/parse-conflict-json
198
208
!/path-key
199
209
!/path-scurry
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
1
+
{
2
+
"name": "@npmcli/promise-spawn",
3
+
"version": "7.0.2",
4
+
"files": [
5
+
"bin/",
6
+
"lib/"
7
+
],
8
+
"main": "./lib/index.js",
9
+
"description": "spawn processes the way the npm cli likes to do",
10
+
"repository": {
11
+
"type": "git",
12
+
"url": "git+https://github.com/npm/promise-spawn.git"
13
+
},
14
+
"author": "GitHub Inc.",
15
+
"license": "ISC",
16
+
"scripts": {
17
+
"test": "tap",
18
+
"snap": "tap",
19
+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
20
+
"lintfix": "npm run lint -- --fix",
21
+
"posttest": "npm run lint",
22
+
"postsnap": "npm run lintfix --",
23
+
"postlint": "template-oss-check",
24
+
"template-oss-apply": "template-oss-apply --force"
25
+
},
26
+
"tap": {
27
+
"check-coverage": true,
28
+
"nyc-arg": [
29
+
"--exclude",
30
+
"tap-snapshots/**"
31
+
]
32
+
},
33
+
"devDependencies": {
34
+
"@npmcli/eslint-config": "^4.0.0",
35
+
"@npmcli/template-oss": "4.22.0",
36
+
"spawk": "^1.7.1",
37
+
"tap": "^16.0.1"
38
+
},
39
+
"engines": {
40
+
"node": "^16.14.0 || >=18.0.0"
41
+
},
42
+
"templateOSS": {
43
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
44
+
"version": "4.22.0",
45
+
"publish": true
46
+
},
47
+
"dependencies": {
48
+
"which": "^4.0.0"
49
+
}
50
+
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
1
+
The ISC License
2
+
3
+
Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors
4
+
5
+
Permission to use, copy, modify, and/or distribute this software for any
6
+
purpose with or without fee is hereby granted, provided that the above
7
+
copyright notice and this permission notice appear in all copies.
8
+
9
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
1
+
"use strict";
2
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+
if (k2 === undefined) k2 = k;
4
+
var desc = Object.getOwnPropertyDescriptor(m, k);
5
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+
desc = { enumerable: true, get: function() { return m[k]; } };
7
+
}
8
+
Object.defineProperty(o, k2, desc);
9
+
}) : (function(o, m, k, k2) {
10
+
if (k2 === undefined) k2 = k;
11
+
o[k2] = m[k];
12
+
}));
13
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+
}) : function(o, v) {
16
+
o["default"] = v;
17
+
});
18
+
var __importStar = (this && this.__importStar) || function (mod) {
19
+
if (mod && mod.__esModule) return mod;
20
+
var result = {};
21
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+
__setModuleDefault(result, mod);
23
+
return result;
24
+
};
25
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+
};
28
+
Object.defineProperty(exports, "__esModule", { value: true });
29
+
exports.sync = exports.isexe = exports.posix = exports.win32 = void 0;
30
+
const posix = __importStar(require("./posix.js"));
31
+
exports.posix = posix;
32
+
const win32 = __importStar(require("./win32.js"));
33
+
exports.win32 = win32;
34
+
__exportStar(require("./options.js"), exports);
35
+
const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
36
+
const impl = platform === 'win32' ? win32 : posix;
37
+
/**
38
+
* Determine whether a path is executable on the current platform.
39
+
*/
40
+
exports.isexe = impl.isexe;
41
+
/**
42
+
* Synchronously determine whether a path is executable on the
43
+
* current platform.
44
+
*/
45
+
exports.sync = impl.sync;
46
+
//# sourceMappingURL=index.js.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1
+
"use strict";
2
+
Object.defineProperty(exports, "__esModule", { value: true });
3
+
//# sourceMappingURL=options.js.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1
+
{
2
+
"type": "commonjs"
3
+
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
1
+
"use strict";
2
+
/**
3
+
* This is the Posix implementation of isexe, which uses the file
4
+
* mode and uid/gid values.
5
+
*
6
+
* @module
7
+
*/
8
+
Object.defineProperty(exports, "__esModule", { value: true });
9
+
exports.sync = exports.isexe = void 0;
10
+
const fs_1 = require("fs");
11
+
const promises_1 = require("fs/promises");
12
+
/**
13
+
* Determine whether a path is executable according to the mode and
14
+
* current (or specified) user and group IDs.
15
+
*/
16
+
const isexe = async (path, options = {}) => {
17
+
const { ignoreErrors = false } = options;
18
+
try {
19
+
return checkStat(await (0, promises_1.stat)(path), options);
20
+
}
21
+
catch (e) {
22
+
const er = e;
23
+
if (ignoreErrors || er.code === 'EACCES')
24
+
return false;
25
+
throw er;
26
+
}
27
+
};
28
+
exports.isexe = isexe;
29
+
/**
30
+
* Synchronously determine whether a path is executable according to
31
+
* the mode and current (or specified) user and group IDs.
32
+
*/
33
+
const sync = (path, options = {}) => {
34
+
const { ignoreErrors = false } = options;
35
+
try {
36
+
return checkStat((0, fs_1.statSync)(path), options);
37
+
}
38
+
catch (e) {
39
+
const er = e;
40
+
if (ignoreErrors || er.code === 'EACCES')
41
+
return false;
42
+
throw er;
43
+
}
44
+
};
45
+
exports.sync = sync;
46
+
const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);
47
+
const checkMode = (stat, options) => {
48
+
const myUid = options.uid ?? process.getuid?.();
49
+
const myGroups = options.groups ?? process.getgroups?.() ?? [];
50
+
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
51
+
if (myUid === undefined || myGid === undefined) {
52
+
throw new Error('cannot get uid or gid');
53
+
}
54
+
const groups = new Set([myGid, ...myGroups]);
55
+
const mod = stat.mode;
56
+
const uid = stat.uid;
57
+
const gid = stat.gid;
58
+
const u = parseInt('100', 8);
59
+
const g = parseInt('010', 8);
60
+
const o = parseInt('001', 8);
61
+
const ug = u | g;
62
+
return !!(mod & o ||
63
+
(mod & g && groups.has(gid)) ||
64
+
(mod & u && uid === myUid) ||
65
+
(mod & ug && myUid === 0));
66
+
};
67
+
//# sourceMappingURL=posix.js.map
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4