@socketsecurity/lib 3.2.6 → 3.2.8
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/CHANGELOG.md +24 -1
- package/dist/constants/node.js +1 -1
- package/dist/constants/packages.js +4 -4
- package/dist/external/@inquirer/confirm.js +3199 -18
- package/dist/external/@inquirer/input.js +3223 -18
- package/dist/external/@inquirer/password.js +3331 -18
- package/dist/external/@inquirer/search.js +3328 -21
- package/dist/external/@inquirer/select.js +3445 -21
- package/dist/external/@npmcli/package-json/lib/read-package.js +149 -2
- package/dist/external/@npmcli/package-json/lib/sort.js +96 -1
- package/dist/external/@npmcli/package-json.js +16758 -13
- package/dist/external/@npmcli/promise-spawn.js +480 -1
- package/dist/external/@socketregistry/is-unicode-supported.js +42 -1
- package/dist/external/@socketregistry/packageurl-js.js +6493 -2
- package/dist/external/@socketregistry/yocto-spinner.js +460 -4
- package/dist/external/@yarnpkg/extensions.js +1025 -1
- package/dist/external/cacache.js +13016 -12
- package/dist/external/debug.js +27 -1
- package/dist/external/del.js +7088 -2
- package/dist/external/fast-glob.js +5721 -2
- package/dist/external/fast-sort.js +140 -1
- package/dist/external/get-east-asian-width.js +90 -1
- package/dist/external/libnpmexec.js +33 -1
- package/dist/external/libnpmpack.js +67595 -129
- package/dist/external/make-fetch-happen.js +22595 -21
- package/dist/external/normalize-package-data.js +4474 -2
- package/dist/external/npm-package-arg.js +4511 -2
- package/dist/external/pacote.js +50270 -57
- package/dist/external/picomatch.js +1520 -1
- package/dist/external/semver.js +1930 -1
- package/dist/external/spdx-correct.js +1380 -1
- package/dist/external/spdx-expression-parse.js +1043 -1
- package/dist/external/streaming-iterables.js +1056 -1
- package/dist/external/validate-npm-package-name.js +100 -1
- package/dist/external/which.js +258 -1
- package/dist/external/yargs-parser.js +1075 -1
- package/dist/external/yoctocolors-cjs.js +88 -1
- package/dist/external/zod.js +15207 -13
- package/dist/lifecycle-script-names.js +3 -4
- package/dist/maintained-node-versions.js +3 -4
- package/dist/package-default-node-range.js +4 -5
- package/dist/package-default-socket-categories.js +3 -4
- package/dist/package-extensions.js +3 -4
- package/dist/utils/get-ipc.js +3 -5
- package/package.json +1 -1
|
@@ -3,5 +3,152 @@
|
|
|
3
3
|
* Bundled from @npmcli/package-json/lib/read-package.js
|
|
4
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
7
|
-
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// node_modules/.pnpm/json-parse-even-better-errors@4.0.0/node_modules/json-parse-even-better-errors/lib/index.js
|
|
14
|
+
var require_lib = __commonJS({
|
|
15
|
+
"node_modules/.pnpm/json-parse-even-better-errors@4.0.0/node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
|
|
16
|
+
"use strict";
|
|
17
|
+
var INDENT = Symbol.for("indent");
|
|
18
|
+
var NEWLINE = Symbol.for("newline");
|
|
19
|
+
var DEFAULT_NEWLINE = "\n";
|
|
20
|
+
var DEFAULT_INDENT = " ";
|
|
21
|
+
var BOM = /^\uFEFF/;
|
|
22
|
+
var FORMAT = /^\s*[{[]((?:\r?\n)+)([\s\t]*)/;
|
|
23
|
+
var EMPTY = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
|
|
24
|
+
var UNEXPECTED_TOKEN = /^Unexpected token '?(.)'?(,)? /i;
|
|
25
|
+
var hexify = /* @__PURE__ */ __name((char) => {
|
|
26
|
+
const h = char.charCodeAt(0).toString(16).toUpperCase();
|
|
27
|
+
return `0x${h.length % 2 ? "0" : ""}${h}`;
|
|
28
|
+
}, "hexify");
|
|
29
|
+
var stripBOM = /* @__PURE__ */ __name((txt) => String(txt).replace(BOM, ""), "stripBOM");
|
|
30
|
+
var makeParsedError = /* @__PURE__ */ __name((msg, parsing, position = 0) => ({
|
|
31
|
+
message: `${msg} while parsing ${parsing}`,
|
|
32
|
+
position
|
|
33
|
+
}), "makeParsedError");
|
|
34
|
+
var parseError = /* @__PURE__ */ __name((e, txt, context = 20) => {
|
|
35
|
+
let msg = e.message;
|
|
36
|
+
if (!txt) {
|
|
37
|
+
return makeParsedError(msg, "empty string");
|
|
38
|
+
}
|
|
39
|
+
const badTokenMatch = msg.match(UNEXPECTED_TOKEN);
|
|
40
|
+
const badIndexMatch = msg.match(/ position\s+(\d+)/i);
|
|
41
|
+
if (badTokenMatch) {
|
|
42
|
+
msg = msg.replace(
|
|
43
|
+
UNEXPECTED_TOKEN,
|
|
44
|
+
`Unexpected token ${JSON.stringify(badTokenMatch[1])} (${hexify(badTokenMatch[1])})$2 `
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
let errIdx;
|
|
48
|
+
if (badIndexMatch) {
|
|
49
|
+
errIdx = +badIndexMatch[1];
|
|
50
|
+
} else if (msg.match(/^Unexpected end of JSON.*/i)) {
|
|
51
|
+
errIdx = txt.length - 1;
|
|
52
|
+
}
|
|
53
|
+
if (errIdx == null) {
|
|
54
|
+
return makeParsedError(msg, `'${txt.slice(0, context * 2)}'`);
|
|
55
|
+
}
|
|
56
|
+
const start = errIdx <= context ? 0 : errIdx - context;
|
|
57
|
+
const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
|
|
58
|
+
const slice = `${start ? "..." : ""}${txt.slice(start, end)}${end === txt.length ? "" : "..."}`;
|
|
59
|
+
return makeParsedError(
|
|
60
|
+
msg,
|
|
61
|
+
`${txt === slice ? "" : "near "}${JSON.stringify(slice)}`,
|
|
62
|
+
errIdx
|
|
63
|
+
);
|
|
64
|
+
}, "parseError");
|
|
65
|
+
var JSONParseError = class extends SyntaxError {
|
|
66
|
+
static {
|
|
67
|
+
__name(this, "JSONParseError");
|
|
68
|
+
}
|
|
69
|
+
constructor(er, txt, context, caller) {
|
|
70
|
+
const metadata = parseError(er, txt, context);
|
|
71
|
+
super(metadata.message);
|
|
72
|
+
Object.assign(this, metadata);
|
|
73
|
+
this.code = "EJSONPARSE";
|
|
74
|
+
this.systemError = er;
|
|
75
|
+
Error.captureStackTrace(this, caller || this.constructor);
|
|
76
|
+
}
|
|
77
|
+
get name() {
|
|
78
|
+
return this.constructor.name;
|
|
79
|
+
}
|
|
80
|
+
set name(n) {
|
|
81
|
+
}
|
|
82
|
+
get [Symbol.toStringTag]() {
|
|
83
|
+
return this.constructor.name;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var parseJson = /* @__PURE__ */ __name((txt, reviver) => {
|
|
87
|
+
const result = JSON.parse(txt, reviver);
|
|
88
|
+
if (result && typeof result === "object") {
|
|
89
|
+
const match = txt.match(EMPTY) || txt.match(FORMAT) || [null, "", ""];
|
|
90
|
+
result[NEWLINE] = match[1] ?? DEFAULT_NEWLINE;
|
|
91
|
+
result[INDENT] = match[2] ?? DEFAULT_INDENT;
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}, "parseJson");
|
|
95
|
+
var parseJsonError = /* @__PURE__ */ __name((raw, reviver, context) => {
|
|
96
|
+
const txt = stripBOM(raw);
|
|
97
|
+
try {
|
|
98
|
+
return parseJson(txt, reviver);
|
|
99
|
+
} catch (e) {
|
|
100
|
+
if (typeof raw !== "string" && !Buffer.isBuffer(raw)) {
|
|
101
|
+
const msg = Array.isArray(raw) && raw.length === 0 ? "an empty array" : String(raw);
|
|
102
|
+
throw Object.assign(
|
|
103
|
+
new TypeError(`Cannot parse ${msg}`),
|
|
104
|
+
{ code: "EJSONPARSE", systemError: e }
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
throw new JSONParseError(e, txt, context, parseJsonError);
|
|
108
|
+
}
|
|
109
|
+
}, "parseJsonError");
|
|
110
|
+
module2.exports = parseJsonError;
|
|
111
|
+
parseJsonError.JSONParseError = JSONParseError;
|
|
112
|
+
parseJsonError.noExceptions = (raw, reviver) => {
|
|
113
|
+
try {
|
|
114
|
+
return parseJson(stripBOM(raw), reviver);
|
|
115
|
+
} catch {
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/read-package.js
|
|
122
|
+
var { readFile } = require("fs/promises");
|
|
123
|
+
var parseJSON = require_lib();
|
|
124
|
+
async function read(filename) {
|
|
125
|
+
try {
|
|
126
|
+
const data = await readFile(filename, "utf8");
|
|
127
|
+
return data;
|
|
128
|
+
} catch (err) {
|
|
129
|
+
err.message = `Could not read package.json: ${err}`;
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
__name(read, "read");
|
|
134
|
+
function parse(data) {
|
|
135
|
+
try {
|
|
136
|
+
const content = parseJSON(data);
|
|
137
|
+
return content;
|
|
138
|
+
} catch (err) {
|
|
139
|
+
err.message = `Invalid package.json: ${err}`;
|
|
140
|
+
throw err;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
__name(parse, "parse");
|
|
144
|
+
async function readPackage(filename) {
|
|
145
|
+
const data = await read(filename);
|
|
146
|
+
const content = parse(data);
|
|
147
|
+
return content;
|
|
148
|
+
}
|
|
149
|
+
__name(readPackage, "readPackage");
|
|
150
|
+
module.exports = {
|
|
151
|
+
read,
|
|
152
|
+
parse,
|
|
153
|
+
readPackage
|
|
154
|
+
};
|
|
@@ -3,4 +3,99 @@
|
|
|
3
3
|
* Bundled from @npmcli/package-json/lib/sort.js
|
|
4
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
|
|
9
|
+
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/sort.js
|
|
10
|
+
function packageSort(json) {
|
|
11
|
+
const {
|
|
12
|
+
name,
|
|
13
|
+
version,
|
|
14
|
+
private: isPrivate,
|
|
15
|
+
description,
|
|
16
|
+
keywords,
|
|
17
|
+
homepage,
|
|
18
|
+
bugs,
|
|
19
|
+
repository,
|
|
20
|
+
funding,
|
|
21
|
+
license,
|
|
22
|
+
author,
|
|
23
|
+
maintainers,
|
|
24
|
+
contributors,
|
|
25
|
+
type,
|
|
26
|
+
imports,
|
|
27
|
+
exports: exports2,
|
|
28
|
+
main,
|
|
29
|
+
browser,
|
|
30
|
+
types,
|
|
31
|
+
bin,
|
|
32
|
+
man,
|
|
33
|
+
directories,
|
|
34
|
+
files,
|
|
35
|
+
workspaces,
|
|
36
|
+
scripts,
|
|
37
|
+
config,
|
|
38
|
+
dependencies,
|
|
39
|
+
devDependencies,
|
|
40
|
+
peerDependencies,
|
|
41
|
+
peerDependenciesMeta,
|
|
42
|
+
optionalDependencies,
|
|
43
|
+
bundledDependencies,
|
|
44
|
+
bundleDependencies,
|
|
45
|
+
engines,
|
|
46
|
+
os,
|
|
47
|
+
cpu,
|
|
48
|
+
publishConfig,
|
|
49
|
+
devEngines,
|
|
50
|
+
licenses,
|
|
51
|
+
overrides,
|
|
52
|
+
...rest
|
|
53
|
+
} = json;
|
|
54
|
+
return {
|
|
55
|
+
...typeof name !== "undefined" ? { name } : {},
|
|
56
|
+
...typeof version !== "undefined" ? { version } : {},
|
|
57
|
+
...typeof isPrivate !== "undefined" ? { private: isPrivate } : {},
|
|
58
|
+
...typeof description !== "undefined" ? { description } : {},
|
|
59
|
+
...typeof keywords !== "undefined" ? { keywords } : {},
|
|
60
|
+
...typeof homepage !== "undefined" ? { homepage } : {},
|
|
61
|
+
...typeof bugs !== "undefined" ? { bugs } : {},
|
|
62
|
+
...typeof repository !== "undefined" ? { repository } : {},
|
|
63
|
+
...typeof funding !== "undefined" ? { funding } : {},
|
|
64
|
+
...typeof license !== "undefined" ? { license } : {},
|
|
65
|
+
...typeof author !== "undefined" ? { author } : {},
|
|
66
|
+
...typeof maintainers !== "undefined" ? { maintainers } : {},
|
|
67
|
+
...typeof contributors !== "undefined" ? { contributors } : {},
|
|
68
|
+
...typeof type !== "undefined" ? { type } : {},
|
|
69
|
+
...typeof imports !== "undefined" ? { imports } : {},
|
|
70
|
+
...typeof exports2 !== "undefined" ? { exports: exports2 } : {},
|
|
71
|
+
...typeof main !== "undefined" ? { main } : {},
|
|
72
|
+
...typeof browser !== "undefined" ? { browser } : {},
|
|
73
|
+
...typeof types !== "undefined" ? { types } : {},
|
|
74
|
+
...typeof bin !== "undefined" ? { bin } : {},
|
|
75
|
+
...typeof man !== "undefined" ? { man } : {},
|
|
76
|
+
...typeof directories !== "undefined" ? { directories } : {},
|
|
77
|
+
...typeof files !== "undefined" ? { files } : {},
|
|
78
|
+
...typeof workspaces !== "undefined" ? { workspaces } : {},
|
|
79
|
+
...typeof scripts !== "undefined" ? { scripts } : {},
|
|
80
|
+
...typeof config !== "undefined" ? { config } : {},
|
|
81
|
+
...typeof dependencies !== "undefined" ? { dependencies } : {},
|
|
82
|
+
...typeof devDependencies !== "undefined" ? { devDependencies } : {},
|
|
83
|
+
...typeof peerDependencies !== "undefined" ? { peerDependencies } : {},
|
|
84
|
+
...typeof peerDependenciesMeta !== "undefined" ? { peerDependenciesMeta } : {},
|
|
85
|
+
...typeof optionalDependencies !== "undefined" ? { optionalDependencies } : {},
|
|
86
|
+
...typeof bundledDependencies !== "undefined" ? { bundledDependencies } : {},
|
|
87
|
+
...typeof bundleDependencies !== "undefined" ? { bundleDependencies } : {},
|
|
88
|
+
...typeof engines !== "undefined" ? { engines } : {},
|
|
89
|
+
...typeof os !== "undefined" ? { os } : {},
|
|
90
|
+
...typeof cpu !== "undefined" ? { cpu } : {},
|
|
91
|
+
...typeof publishConfig !== "undefined" ? { publishConfig } : {},
|
|
92
|
+
...typeof devEngines !== "undefined" ? { devEngines } : {},
|
|
93
|
+
...typeof licenses !== "undefined" ? { licenses } : {},
|
|
94
|
+
...typeof overrides !== "undefined" ? { overrides } : {},
|
|
95
|
+
...rest
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
__name(packageSort, "packageSort");
|
|
99
|
+
module.exports = {
|
|
100
|
+
packageSort
|
|
101
|
+
};
|