@socketsecurity/lib 6.0.5 → 6.0.6
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 +18 -0
- package/dist/ai/discover.js +3 -2
- package/dist/ai/spawn.js +8 -5
- package/dist/ai/worktree.js +11 -6
- package/dist/ansi/strip.js +2 -2
- package/dist/archives/_internal.js +4 -4
- package/dist/archives/zip.js +1 -1
- package/dist/arrays/_internal.js +2 -2
- package/dist/arrays/chunk.js +1 -1
- package/dist/arrays/join.js +2 -2
- package/dist/arrays/unique.js +1 -1
- package/dist/bin/acorn-bindgen.cjs +769 -0
- package/dist/bin/acorn.wasm +0 -0
- package/dist/bin/check-primordials.js +3 -2
- package/dist/bin/check.js +3 -2
- package/dist/bin/exec.js +1 -1
- package/dist/bin/prim.cjs +39064 -0
- package/dist/bin/resolve.js +1 -1
- package/dist/colors/socket-palette.js +2 -2
- package/dist/compression/_internal.js +3 -2
- package/dist/compression/brotli.js +5 -12
- package/dist/compression/gzip.js +5 -13
- package/dist/constants/agents.js +4 -4
- package/dist/constants/packages.js +6 -6
- package/dist/constants/socket.js +1 -1
- package/dist/crypto/hash.js +2 -2
- package/dist/debug/_internal.js +2 -2
- package/dist/debug/caller-info.js +1 -1
- package/dist/debug/namespace.js +5 -5
- package/dist/debug/output.js +3 -3
- package/dist/dlx/binary-download.js +3 -2
- package/dist/eco/npm/npm/flags.js +5 -5
- package/dist/eco/npm/pnpm/flags.js +3 -3
- package/dist/env/boolean.js +1 -1
- package/dist/env/ci.js +1 -1
- package/dist/env/debug.js +1 -1
- package/dist/env/github.js +8 -8
- package/dist/env/home.js +1 -1
- package/dist/env/locale.js +3 -3
- package/dist/env/node-auth-token.js +1 -1
- package/dist/env/node-env.js +1 -1
- package/dist/env/npm.js +5 -5
- package/dist/env/number.js +1 -1
- package/dist/env/package-manager.js +3 -3
- package/dist/env/path.js +1 -1
- package/dist/env/pre-commit.js +1 -1
- package/dist/env/rewire.js +2 -2
- package/dist/env/shell.js +1 -1
- package/dist/env/socket-cli.js +13 -13
- package/dist/env/socket.js +33 -32
- package/dist/env/string.js +1 -1
- package/dist/env/temp-dir.js +3 -3
- package/dist/env/term.js +1 -1
- package/dist/env/test.js +3 -3
- package/dist/env/windows.js +4 -4
- package/dist/env/xdg.js +3 -3
- package/dist/events/exit/_internal.js +5 -5
- package/dist/events/exit/handler.js +1 -1
- package/dist/events/exit/intercept.js +2 -2
- package/dist/events/exit/lifecycle.js +3 -3
- package/dist/events/exit/signals.js +1 -1
- package/dist/external/@sinclair/typebox/value.js +5 -1
- package/dist/external/@sinclair/typebox.js +5 -1
- package/dist/external/@socketregistry/packageurl-js.js +27 -0
- package/dist/external-tools/bazel/resolve.js +2 -1
- package/dist/external-tools/cdxgen/resolve.js +2 -1
- package/dist/external-tools/from-pip-venv.d.ts +73 -0
- package/dist/external-tools/from-pip-venv.js +98 -0
- package/dist/external-tools/janus/asset-names.js +1 -1
- package/dist/external-tools/janus/from-download.js +3 -5
- package/dist/external-tools/janus/resolve.js +2 -1
- package/dist/external-tools/jre/from-download.js +2 -1
- package/dist/external-tools/jre/resolve.js +2 -1
- package/dist/external-tools/manifest.js +7 -5
- package/dist/external-tools/opengrep/resolve.js +2 -1
- package/dist/external-tools/sbt/resolve.js +2 -1
- package/dist/external-tools/skillspector/from-dlx.d.ts +24 -0
- package/dist/external-tools/skillspector/from-dlx.js +41 -0
- package/dist/external-tools/skillspector/from-path.d.ts +8 -0
- package/dist/external-tools/skillspector/from-path.js +32 -0
- package/dist/external-tools/skillspector/from-vfs.d.ts +8 -0
- package/dist/external-tools/skillspector/from-vfs.js +27 -0
- package/dist/external-tools/skillspector/resolve.d.ts +34 -0
- package/dist/external-tools/skillspector/resolve.js +53 -0
- package/dist/external-tools/skillspector/types.d.ts +24 -0
- package/dist/external-tools/skillspector/types.js +2 -0
- package/dist/external-tools/synp/resolve.js +2 -1
- package/dist/external-tools/trivy/resolve.js +2 -1
- package/dist/external-tools/trufflehog/resolve.js +2 -1
- package/dist/external-tools/uv/resolve.js +2 -1
- package/dist/fs/access.js +4 -4
- package/dist/fs/encoding.js +2 -2
- package/dist/fs/find-up.js +2 -2
- package/dist/fs/inspect.js +6 -6
- package/dist/fs/read-dir.js +3 -3
- package/dist/fs/read-file.js +6 -6
- package/dist/fs/read-json.js +2 -2
- package/dist/fs/safe.js +2 -2
- package/dist/fs/unique.js +1 -1
- package/dist/fs/validate.js +1 -1
- package/dist/fs/write-json.js +1 -1
- package/dist/git/_internal.js +2 -1
- package/dist/globs/_internal.js +4 -4
- package/dist/globs/match.js +4 -3
- package/dist/globs/matcher.js +2 -2
- package/dist/globs/stream.js +1 -1
- package/dist/http-request/browser.js +17 -11
- package/dist/http-request/download.js +1 -1
- package/dist/http-request/headers.d.ts +32 -3
- package/dist/http-request/headers.js +42 -13
- package/dist/http-request/request-attempt.js +1 -0
- package/dist/http-request/request-types.d.ts +5 -0
- package/dist/http-request/request.js +32 -15
- package/dist/http-request/response-reader.d.ts +12 -1
- package/dist/http-request/response-reader.js +22 -2
- package/dist/http-request/user-agent.js +1 -1
- package/dist/json/edit.js +1 -1
- package/dist/json/parse.js +4 -4
- package/dist/logger/colors.js +2 -2
- package/dist/logger/console.js +1 -1
- package/dist/logger/symbols.js +1 -1
- package/dist/node/async-hooks.js +2 -2
- package/dist/node/child-process.js +2 -2
- package/dist/node/crypto.js +2 -2
- package/dist/node/events.js +2 -2
- package/dist/node/fs-promises.js +2 -2
- package/dist/node/fs.js +2 -2
- package/dist/node/http.js +2 -2
- package/dist/node/https.js +2 -2
- package/dist/node/module.js +3 -3
- package/dist/node/os.js +2 -2
- package/dist/node/path.js +2 -2
- package/dist/node/timers-promises.js +2 -2
- package/dist/node/url.js +2 -2
- package/dist/node/util.js +2 -2
- package/dist/objects/getters.js +2 -2
- package/dist/objects/inspect.js +3 -3
- package/dist/objects/mutate.js +1 -1
- package/dist/objects/predicates.js +4 -4
- package/dist/objects/sort.js +4 -4
- package/dist/packages/edit-class.js +1 -1
- package/dist/packages/edit.js +2 -2
- package/dist/packages/exports.js +6 -6
- package/dist/packages/licenses.js +8 -8
- package/dist/packages/manifest.js +3 -3
- package/dist/packages/normalize.js +4 -4
- package/dist/packages/operations.js +11 -11
- package/dist/packages/provenance.d.ts +6 -0
- package/dist/packages/provenance.js +12 -3
- package/dist/packages/specs.js +5 -5
- package/dist/packages/validation.js +3 -3
- package/dist/paths/_internal.js +3 -3
- package/dist/paths/conversion.js +4 -4
- package/dist/paths/normalize.js +3 -1
- package/dist/paths/packages.js +3 -3
- package/dist/paths/predicates.js +7 -7
- package/dist/paths/resolve.js +3 -3
- package/dist/process/spawn/_internal.js +3 -3
- package/dist/process/spawn/errors.js +2 -2
- package/dist/process/spawn/stdio.js +1 -1
- package/dist/promises/_internal.js +1 -1
- package/dist/promises/iterate.js +5 -5
- package/dist/promises/options.js +3 -3
- package/dist/promises/retry.js +1 -1
- package/dist/secrets/_internal.js +3 -2
- package/dist/secrets/keychain.js +5 -4
- package/dist/secrets/linux.js +6 -4
- package/dist/secrets/macos.js +5 -3
- package/dist/secrets/rc.js +9 -6
- package/dist/secrets/windows.js +7 -4
- package/dist/shell/parse.d.ts +108 -1
- package/dist/shell/parse.js +168 -2
- package/dist/smol/detect.js +1 -1
- package/dist/smol/http.js +1 -1
- package/dist/smol/https.js +1 -1
- package/dist/smol/manifest.js +1 -1
- package/dist/smol/path.js +1 -1
- package/dist/smol/primordial.js +1 -1
- package/dist/smol/purl.js +1 -1
- package/dist/smol/versions.js +1 -1
- package/dist/smol/vfs.js +1 -1
- package/dist/sorts/_internal.js +4 -4
- package/dist/sorts/natural.js +3 -3
- package/dist/sorts/semver.js +1 -1
- package/dist/sorts/strings.js +1 -1
- package/dist/spinner/default.js +1 -1
- package/dist/spinner/spinner.js +1 -1
- package/dist/ssri/convert.js +2 -2
- package/dist/ssri/parse.js +1 -1
- package/dist/ssri/validate.js +2 -2
- package/dist/stdio/prompts.js +1 -1
- package/dist/streams/parallel.js +2 -2
- package/dist/streams/transform.js +1 -1
- package/dist/strings/format.js +4 -4
- package/dist/strings/predicates.js +2 -2
- package/dist/strings/search.js +1 -1
- package/dist/strings/transform.js +3 -3
- package/dist/strings/width.js +2 -2
- package/dist/temporal/instant.js +4 -2
- package/dist/temporal/slots.js +3 -2
- package/dist/themes/context.js +2 -2
- package/dist/url/parse.js +2 -2
- package/dist/url/predicates.js +1 -1
- package/dist/url/search-params.js +6 -6
- package/dist/words/article.js +1 -1
- package/dist/words/capitalize.js +1 -1
- package/dist/words/pluralize.d.ts +24 -2
- package/dist/words/pluralize.js +37 -2
- package/dist/words/types.d.ts +25 -2
- package/package.json +44 -4
package/dist/bin/resolve.js
CHANGED
|
@@ -40,7 +40,7 @@ const require_bin_which = require('./which.js');
|
|
|
40
40
|
* // e.g. '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
44
44
|
function resolveRealBinSync(binPath) {
|
|
45
45
|
const fs = /* @__PURE__ */ require_node_fs.getNodeFs();
|
|
46
46
|
const path = /* @__PURE__ */ require_node_path.getNodePath();
|
|
@@ -43,7 +43,7 @@ const HEX_BY_THEME = {
|
|
|
43
43
|
* `\x1b[39m` resets fg to the terminal default — using `[0m` would also clear
|
|
44
44
|
* bg / styles, which the caller may have set deliberately.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
47
47
|
function colorizer(hex) {
|
|
48
48
|
const prefix = `\x1b[38;2;${parseInt(hex.slice(1, 3), 16)};${parseInt(hex.slice(3, 5), 16)};${parseInt(hex.slice(5, 7), 16)}m`;
|
|
49
49
|
const suffix = "\x1B[39m";
|
|
@@ -61,7 +61,7 @@ function colorizer(hex) {
|
|
|
61
61
|
* process.stdout.write(palette.success('Build complete\n'))
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
65
65
|
function getPalette(theme = "dark") {
|
|
66
66
|
const hex = HEX_BY_THEME[theme];
|
|
67
67
|
return {
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
5
5
|
const require_primordials_error = require('../primordials/error.js');
|
|
6
6
|
const require_primordials_string = require('../primordials/string.js');
|
|
7
|
+
const require_primordials_object = require('../primordials/object.js');
|
|
7
8
|
let node_path = require("node:path");
|
|
8
9
|
node_path = require_runtime.__toESM(node_path);
|
|
9
10
|
|
|
@@ -41,14 +42,14 @@ function stripExt(filePath, exts) {
|
|
|
41
42
|
function resolveFileArgs(fnName, srcPath, destOrOptions, maybeOptions, computeInPlaceDest) {
|
|
42
43
|
if (typeof destOrOptions === "string") {
|
|
43
44
|
if (srcPath === destOrOptions) throw new require_primordials_error.ErrorCtor(`${fnName}: srcPath and destPath must differ; got ${srcPath}`);
|
|
44
|
-
return
|
|
45
|
+
return require_primordials_object.ObjectFreeze({
|
|
45
46
|
__proto__: null,
|
|
46
47
|
destPath: destOrOptions,
|
|
47
48
|
options: maybeOptions,
|
|
48
49
|
inPlace: false
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
if (destOrOptions?.inPlace) return
|
|
52
|
+
if (destOrOptions?.inPlace) return require_primordials_object.ObjectFreeze({
|
|
52
53
|
__proto__: null,
|
|
53
54
|
destPath: computeInPlaceDest(srcPath),
|
|
54
55
|
options: destOrOptions,
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
/* Socket Lib - Built with rolldown */
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
5
|
+
const require_primordials_buffer = require('../primordials/buffer.js');
|
|
5
6
|
const require_primordials_error = require('../primordials/error.js');
|
|
6
7
|
const require_primordials_string = require('../primordials/string.js');
|
|
8
|
+
const require_primordials_map_set = require('../primordials/map-set.js');
|
|
7
9
|
const require_fs_safe = require('../fs/safe.js');
|
|
8
10
|
const require_compression__internal = require('./_internal.js');
|
|
9
11
|
let node_fs = require("node:fs");
|
|
@@ -12,17 +14,8 @@ node_path = require_runtime.__toESM(node_path);
|
|
|
12
14
|
let node_util = require("node:util");
|
|
13
15
|
let node_stream_promises = require("node:stream/promises");
|
|
14
16
|
let node_zlib = require("node:zlib");
|
|
15
|
-
let node_buffer = require("node:buffer");
|
|
16
17
|
|
|
17
18
|
//#region src/compression/brotli.ts
|
|
18
|
-
/**
|
|
19
|
-
* @file Brotli compression / decompression — in-memory, file-to-file, and
|
|
20
|
-
* raw-stream variants. Default quality is 11 (max compression, slow) on the
|
|
21
|
-
* assumption these are one-shot CLI calls. Override via `options.level` for
|
|
22
|
-
* hot paths. await compressBrotli(JSON.stringify(payload)) await
|
|
23
|
-
* compressBrotliFile('input.json', 'input.json.br')
|
|
24
|
-
* readable.pipe(createBrotliCompressor()).pipe(writable)
|
|
25
|
-
*/
|
|
26
19
|
const brotliCompressAsync = (0, node_util.promisify)(node_zlib.brotliCompress);
|
|
27
20
|
const brotliDecompressAsync = (0, node_util.promisify)(node_zlib.brotliDecompress);
|
|
28
21
|
/**
|
|
@@ -42,7 +35,7 @@ function resolveBrotliOptions(options) {
|
|
|
42
35
|
* compression — pass an explicit Buffer if you have non-UTF-8 input.
|
|
43
36
|
*/
|
|
44
37
|
async function compressBrotli(input, options) {
|
|
45
|
-
const buf = typeof input === "string" ?
|
|
38
|
+
const buf = typeof input === "string" ? require_primordials_buffer.BufferFrom(input, "utf8") : input;
|
|
46
39
|
const opts = resolveBrotliOptions(options);
|
|
47
40
|
if (opts.params[node_zlib.constants.BROTLI_PARAM_SIZE_HINT] === void 0) opts.params[node_zlib.constants.BROTLI_PARAM_SIZE_HINT] = buf.byteLength;
|
|
48
41
|
return await brotliCompressAsync(buf, opts);
|
|
@@ -90,9 +83,9 @@ const BROTLI_MIN_LEN = 4;
|
|
|
90
83
|
* `decompressBrotli(buf)` succeeding. Use for UI hints, not correctness.
|
|
91
84
|
*/
|
|
92
85
|
function isBrotliCompressed(input) {
|
|
93
|
-
return
|
|
86
|
+
return require_primordials_buffer.BufferIsBuffer(input) && input.byteLength >= BROTLI_MIN_LEN;
|
|
94
87
|
}
|
|
95
|
-
const BROTLI_EXTS = new
|
|
88
|
+
const BROTLI_EXTS = new require_primordials_map_set.SetCtor([".br", ".brotli"]);
|
|
96
89
|
/**
|
|
97
90
|
* Extension check for brotli paths — matches `.br` / `.brotli`
|
|
98
91
|
* (case-insensitive). Naming follows node:path's `extname`.
|
package/dist/compression/gzip.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
/* Socket Lib - Built with rolldown */
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
5
|
+
const require_primordials_buffer = require('../primordials/buffer.js');
|
|
5
6
|
const require_primordials_error = require('../primordials/error.js');
|
|
6
7
|
const require_primordials_string = require('../primordials/string.js');
|
|
8
|
+
const require_primordials_map_set = require('../primordials/map-set.js');
|
|
7
9
|
const require_fs_safe = require('../fs/safe.js');
|
|
8
10
|
const require_compression__internal = require('./_internal.js');
|
|
9
11
|
let node_fs = require("node:fs");
|
|
@@ -12,18 +14,8 @@ node_path = require_runtime.__toESM(node_path);
|
|
|
12
14
|
let node_util = require("node:util");
|
|
13
15
|
let node_stream_promises = require("node:stream/promises");
|
|
14
16
|
let node_zlib = require("node:zlib");
|
|
15
|
-
let node_buffer = require("node:buffer");
|
|
16
17
|
|
|
17
18
|
//#region src/compression/gzip.ts
|
|
18
|
-
/**
|
|
19
|
-
* @file Gzip compression / decompression — same calling shapes as brotli:
|
|
20
|
-
* in-memory, file-to-file, and raw-stream variants. Default level is 6 (zlib
|
|
21
|
-
* default). The decompress-file helper recognises `.gz` / `.gzip` / `.tgz`,
|
|
22
|
-
* and special-cases `.tgz` back to `.tar` on inPlace decompress so a
|
|
23
|
-
* round-trip stays lossless. await compressGzip(JSON.stringify(payload))
|
|
24
|
-
* await compressGzipFile('input.json', 'input.json.gz')
|
|
25
|
-
* readable.pipe(createGzipCompressor()).pipe(writable)
|
|
26
|
-
*/
|
|
27
19
|
const gzipAsync = (0, node_util.promisify)(node_zlib.gzip);
|
|
28
20
|
const gunzipAsync = (0, node_util.promisify)(node_zlib.gunzip);
|
|
29
21
|
/**
|
|
@@ -45,7 +37,7 @@ function resolveGzipOptions(options) {
|
|
|
45
37
|
* compression. Default level is 6 (zlib default).
|
|
46
38
|
*/
|
|
47
39
|
async function compressGzip(input, options) {
|
|
48
|
-
return await gzipAsync(typeof input === "string" ?
|
|
40
|
+
return await gzipAsync(typeof input === "string" ? require_primordials_buffer.BufferFrom(input, "utf8") : input, resolveGzipOptions(options));
|
|
49
41
|
}
|
|
50
42
|
/**
|
|
51
43
|
* Decompress a gzip-compressed Buffer.
|
|
@@ -88,9 +80,9 @@ const GZIP_MAGIC_1 = 139;
|
|
|
88
80
|
* spec's 0x1f 0x8b signature. Authoritative.
|
|
89
81
|
*/
|
|
90
82
|
function isGzipCompressed(input) {
|
|
91
|
-
return
|
|
83
|
+
return require_primordials_buffer.BufferIsBuffer(input) && input.byteLength >= 2 && input[0] === GZIP_MAGIC_0 && input[1] === GZIP_MAGIC_1;
|
|
92
84
|
}
|
|
93
|
-
const GZIP_EXTS = new
|
|
85
|
+
const GZIP_EXTS = new require_primordials_map_set.SetCtor([
|
|
94
86
|
".gz",
|
|
95
87
|
".gzip",
|
|
96
88
|
".tgz"
|
package/dist/constants/agents.js
CHANGED
|
@@ -17,7 +17,7 @@ const YARN = "yarn";
|
|
|
17
17
|
const BUN = "bun";
|
|
18
18
|
const VLT = "vlt";
|
|
19
19
|
const NPX = "npx";
|
|
20
|
-
const _npmBinPath =
|
|
20
|
+
const _npmBinPath = /*@__PURE__*/ (() => {
|
|
21
21
|
try {
|
|
22
22
|
return src_external_which.default.sync("npm", { nothrow: true }) || void 0;
|
|
23
23
|
} catch {
|
|
@@ -26,14 +26,14 @@ const _npmBinPath = /* @__PURE__ */ (() => {
|
|
|
26
26
|
/* c8 ignore stop */
|
|
27
27
|
})();
|
|
28
28
|
const NPM_BIN_PATH = _npmBinPath || "npm";
|
|
29
|
-
const NPM_REAL_EXEC_PATH =
|
|
29
|
+
const NPM_REAL_EXEC_PATH = /*@__PURE__*/ (() => {
|
|
30
30
|
try {
|
|
31
31
|
/* c8 ignore start - Module-init IIFE; only reachable when
|
|
32
32
|
which.sync returns null at module load. */
|
|
33
33
|
if (!_npmBinPath) return;
|
|
34
34
|
/* c8 ignore stop */
|
|
35
|
-
const { existsSync } =
|
|
36
|
-
const path =
|
|
35
|
+
const { existsSync } = /*@__PURE__*/ require("node:fs");
|
|
36
|
+
const path = /*@__PURE__*/ require("node:path");
|
|
37
37
|
const npmDir = path.dirname(_npmBinPath);
|
|
38
38
|
const nodeModulesPath = path.join(npmDir, "..", "lib", "node_modules", "npm", "lib", "cli.js");
|
|
39
39
|
if (existsSync(nodeModulesPath)) return nodeModulesPath;
|
|
@@ -38,22 +38,22 @@ function clearPackumentCache() {
|
|
|
38
38
|
/* c8 ignore next 3 */
|
|
39
39
|
if (_packumentCache !== void 0) _packumentCache.clear();
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
42
42
|
function getLifecycleScriptNames() {
|
|
43
43
|
if (_lifecycleScriptNames === void 0) _lifecycleScriptNames = require_primordials_array.ArrayFrom(require_constants_lifecycle_script_names.lifecycleScriptNames);
|
|
44
44
|
return _lifecycleScriptNames;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
47
47
|
function getPackageDefaultNodeRange() {
|
|
48
48
|
if (_packageDefaultNodeRange === void 0) _packageDefaultNodeRange = require_constants_package_default_node_range.packageDefaultNodeRange;
|
|
49
49
|
return _packageDefaultNodeRange;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
52
52
|
function getPackageDefaultSocketCategories() {
|
|
53
53
|
if (_packageDefaultSocketCategories === void 0) _packageDefaultSocketCategories = require_constants_package_default_socket_categories.packageDefaultSocketCategories;
|
|
54
54
|
return _packageDefaultSocketCategories;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
57
57
|
function getPackageExtensions() {
|
|
58
58
|
if (_packageExtensions === void 0) _packageExtensions = require_primordials_object.ObjectEntries(require_pkg_ext_data.packageExtensions);
|
|
59
59
|
return _packageExtensions;
|
|
@@ -71,12 +71,12 @@ var BoundedPackumentCache = class extends Map {
|
|
|
71
71
|
return super.set(key, value);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
75
75
|
function getPackumentCache() {
|
|
76
76
|
if (_packumentCache === void 0) _packumentCache = new BoundedPackumentCache();
|
|
77
77
|
return _packumentCache;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
80
80
|
function getPacoteCachePath() {
|
|
81
81
|
if (_pacoteCachePath === void 0) try {
|
|
82
82
|
const PacoteFetcherBase = require_primordials_reflect.ReflectGetPrototypeOf(src_external_pacote.default.RegistryFetcher.prototype)?.constructor;
|
package/dist/constants/socket.js
CHANGED
|
@@ -33,7 +33,7 @@ const SOCKET_REGISTRY_APP_NAME = "registry";
|
|
|
33
33
|
const SOCKET_WHEELHOUSE_APP_NAME = "wheelhouse";
|
|
34
34
|
const SOCKET_APP_PREFIX = "_";
|
|
35
35
|
const SOCKET_LIB_NAME = "@socketsecurity/lib";
|
|
36
|
-
const SOCKET_LIB_VERSION = "6.0.
|
|
36
|
+
const SOCKET_LIB_VERSION = "6.0.6";
|
|
37
37
|
const SOCKET_IPC_HANDSHAKE = "SOCKET_IPC_HANDSHAKE";
|
|
38
38
|
const CACHE_SOCKET_API_DIR = "socket-api";
|
|
39
39
|
const REGISTRY = "registry";
|
package/dist/crypto/hash.js
CHANGED
|
@@ -33,7 +33,7 @@ let _hashProbed = false;
|
|
|
33
33
|
* // 'z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg=='
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
37
37
|
function hash(algorithm, data, outputEncoding) {
|
|
38
38
|
const native = /* @__PURE__ */ nativeHash();
|
|
39
39
|
if (native !== void 0) return native(algorithm, data, outputEncoding);
|
|
@@ -46,7 +46,7 @@ function hash(algorithm, data, outputEncoding) {
|
|
|
46
46
|
*
|
|
47
47
|
* @internal
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
50
50
|
function nativeHash() {
|
|
51
51
|
if (!_hashProbed) {
|
|
52
52
|
const fn = (/* @__PURE__ */ require_node_crypto.getNodeCrypto()).hash;
|
package/dist/debug/_internal.js
CHANGED
|
@@ -32,7 +32,7 @@ let _pointingTriangle;
|
|
|
32
32
|
only fires when debugJs emits, which requires DEBUG=* env var
|
|
33
33
|
set at the right module-load timing. Tests use the SOCKET_DEBUG
|
|
34
34
|
path which writes via logger.info directly. */
|
|
35
|
-
|
|
35
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
36
36
|
function customLog(...args) {
|
|
37
37
|
const util = /* @__PURE__ */ require_node_util.getNodeUtil();
|
|
38
38
|
const inspectOpts = src_external_debug.default.inspectOpts ? {
|
|
@@ -53,7 +53,7 @@ function customLog(...args) {
|
|
|
53
53
|
/* c8 ignore start - First-call init for module-level glyph; only
|
|
54
54
|
one of the 5 debug functions hits the body. The unicode-fallback
|
|
55
55
|
arm also fires only on terminals without unicode support. */
|
|
56
|
-
|
|
56
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
57
57
|
function getPointingTriangle() {
|
|
58
58
|
if (_pointingTriangle === void 0) _pointingTriangle = (0, src_external__socketregistry_is_unicode_supported.default)() ? "▸" : ">";
|
|
59
59
|
return _pointingTriangle;
|
|
@@ -16,7 +16,7 @@ const require_objects_predicates = require('../objects/predicates.js');
|
|
|
16
16
|
*
|
|
17
17
|
* @private
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
20
20
|
function getCallerInfo(stackOffset = 3) {
|
|
21
21
|
let name = "";
|
|
22
22
|
const captureStackTrace = Error.captureStackTrace;
|
package/dist/debug/namespace.js
CHANGED
|
@@ -23,7 +23,7 @@ src_external_debug = require_runtime.__toESM(src_external_debug);
|
|
|
23
23
|
*
|
|
24
24
|
* @private
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
27
27
|
function extractOptions(namespaces) {
|
|
28
28
|
return namespaces !== null && typeof namespaces === "object" ? {
|
|
29
29
|
__proto__: null,
|
|
@@ -38,7 +38,7 @@ function extractOptions(namespaces) {
|
|
|
38
38
|
*
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
42
42
|
function getDebugJsInstance(namespace) {
|
|
43
43
|
let inst = require_debug__internal.debugByNamespace.get(namespace);
|
|
44
44
|
/* c8 ignore start */
|
|
@@ -54,14 +54,14 @@ function getDebugJsInstance(namespace) {
|
|
|
54
54
|
/**
|
|
55
55
|
* Check if debug mode is enabled.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
58
58
|
function isDebug() {
|
|
59
59
|
return !!/* @__PURE__ */ require_env_socket.getSocketDebug();
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Check if debug mode is enabled.
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
65
65
|
function isDebugNs(namespaces) {
|
|
66
66
|
return !!/* @__PURE__ */ require_env_socket.getSocketDebug() && /* @__PURE__ */ isEnabled(namespaces);
|
|
67
67
|
}
|
|
@@ -70,7 +70,7 @@ function isDebugNs(namespaces) {
|
|
|
70
70
|
*
|
|
71
71
|
* @private
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
74
74
|
function isEnabled(namespaces) {
|
|
75
75
|
if (!/* @__PURE__ */ require_env_socket.getSocketDebug()) return false;
|
|
76
76
|
if (typeof namespaces !== "string" || !namespaces || namespaces === "*") return true;
|
package/dist/debug/output.js
CHANGED
|
@@ -39,7 +39,7 @@ function debug(...args) {
|
|
|
39
39
|
* debugCache('miss', 'socket-sdk:scans:xyz', { ttl: 60000 })
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
43
43
|
function debugCache(operation, key, meta) {
|
|
44
44
|
if (!/* @__PURE__ */ require_env_socket.getSocketDebug()) return;
|
|
45
45
|
const prefix = `[CACHE] ${/* @__PURE__ */ require_debug_caller_info.getCallerInfo(3) || "cache"} ${/* @__PURE__ */ require_debug__internal.getPointingTriangle()} ${operation}: ${key}`;
|
|
@@ -147,7 +147,7 @@ function debugNs(namespacesOrOpts, ...args) {
|
|
|
147
147
|
* Create a Node.js util.debuglog compatible function. Returns a function that
|
|
148
148
|
* conditionally writes debug messages to stderr.
|
|
149
149
|
*/
|
|
150
|
-
|
|
150
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
151
151
|
function debuglog(section) {
|
|
152
152
|
return (/* @__PURE__ */ require_node_util.getNodeUtil()).debuglog(section);
|
|
153
153
|
}
|
|
@@ -155,7 +155,7 @@ function debuglog(section) {
|
|
|
155
155
|
* Create timing functions for measuring code execution time. Returns an object
|
|
156
156
|
* with start() and end() methods, plus a callable function.
|
|
157
157
|
*/
|
|
158
|
-
|
|
158
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
159
159
|
function debugtime(label) {
|
|
160
160
|
const util = /* @__PURE__ */ require_node_util.getNodeUtil();
|
|
161
161
|
let startTime;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
5
5
|
const require_node_crypto = require('../node/crypto.js');
|
|
6
6
|
const require_crypto_hash = require('../crypto/hash.js');
|
|
7
|
+
const require_primordials_buffer = require('../primordials/buffer.js');
|
|
7
8
|
const require_primordials_error = require('../primordials/error.js');
|
|
8
9
|
const require_integrity = require('../integrity.js');
|
|
9
10
|
const require_constants_platform = require('../constants/platform.js');
|
|
@@ -134,7 +135,7 @@ async function downloadBinaryFile(url, destPath, integrity, sha256) {
|
|
|
134
135
|
const lockPath = path.join(cacheEntryDir, "concurrency.lock");
|
|
135
136
|
const verifyIntegrity = async (actualIntegrity) => {
|
|
136
137
|
if (!integrity) return;
|
|
137
|
-
if (!(actualIntegrity.length === integrity.length && crypto.timingSafeEqual(
|
|
138
|
+
if (!(actualIntegrity.length === integrity.length && crypto.timingSafeEqual(require_primordials_buffer.BufferFrom(actualIntegrity), Buffer.from(integrity)))) {
|
|
138
139
|
await require_fs_safe.safeDelete(destPath);
|
|
139
140
|
throw new require_primordials_error.ErrorCtor(`Integrity mismatch: expected ${integrity}, got ${actualIntegrity}`);
|
|
140
141
|
}
|
|
@@ -142,7 +143,7 @@ async function downloadBinaryFile(url, destPath, integrity, sha256) {
|
|
|
142
143
|
const verifyCachedSha256 = async (fileBuffer) => {
|
|
143
144
|
if (!sha256) return;
|
|
144
145
|
const actualSha256 = /* @__PURE__ */ require_crypto_hash.hash("sha256", fileBuffer, "hex");
|
|
145
|
-
if (!(actualSha256.length === sha256.length && crypto.timingSafeEqual(
|
|
146
|
+
if (!(actualSha256.length === sha256.length && crypto.timingSafeEqual(require_primordials_buffer.BufferFrom(actualSha256), Buffer.from(sha256.toLowerCase())))) {
|
|
146
147
|
await require_fs_safe.safeDelete(destPath);
|
|
147
148
|
throw new require_primordials_error.ErrorCtor(`SHA-256 mismatch: expected ${sha256}, got ${actualSha256}`);
|
|
148
149
|
}
|
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
19
19
|
* isNpmAuditFlag('--save') // false
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
23
23
|
function isNpmAuditFlag(cmdArg) {
|
|
24
24
|
return /^--(no-)?audit(=.*)?$/.test(cmdArg);
|
|
25
25
|
}
|
|
@@ -33,7 +33,7 @@ function isNpmAuditFlag(cmdArg) {
|
|
|
33
33
|
* isNpmFundFlag('--save') // false
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
37
37
|
function isNpmFundFlag(cmdArg) {
|
|
38
38
|
return /^--(no-)?fund(=.*)?$/.test(cmdArg);
|
|
39
39
|
}
|
|
@@ -48,7 +48,7 @@ function isNpmFundFlag(cmdArg) {
|
|
|
48
48
|
* isNpmLoglevelFlag('--save') // false
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
52
52
|
function isNpmLoglevelFlag(cmdArg) {
|
|
53
53
|
if (/^--loglevel(=.*)?$/.test(cmdArg)) return true;
|
|
54
54
|
if (/^--(silent|verbose|info|warn|error|quiet)$/.test(cmdArg)) return true;
|
|
@@ -64,7 +64,7 @@ function isNpmLoglevelFlag(cmdArg) {
|
|
|
64
64
|
* isNpmNodeOptionsFlag('--save') // false
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
68
68
|
function isNpmNodeOptionsFlag(cmdArg) {
|
|
69
69
|
return /^--node-options(=.*)?$/.test(cmdArg);
|
|
70
70
|
}
|
|
@@ -78,7 +78,7 @@ function isNpmNodeOptionsFlag(cmdArg) {
|
|
|
78
78
|
* isNpmProgressFlag('--save') // false
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
82
82
|
function isNpmProgressFlag(cmdArg) {
|
|
83
83
|
return /^--(no-)?progress(=.*)?$/.test(cmdArg);
|
|
84
84
|
}
|
|
@@ -23,7 +23,7 @@ const pnpmInstallCommands = new require_primordials_map_set.SetCtor(["install",
|
|
|
23
23
|
* isPnpmFrozenLockfileFlag('--save') // false
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
27
27
|
function isPnpmFrozenLockfileFlag(cmdArg) {
|
|
28
28
|
return pnpmFrozenLockfileFlags.has(cmdArg);
|
|
29
29
|
}
|
|
@@ -37,7 +37,7 @@ function isPnpmFrozenLockfileFlag(cmdArg) {
|
|
|
37
37
|
* isPnpmIgnoreScriptsFlag('--save') // false
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
41
41
|
function isPnpmIgnoreScriptsFlag(cmdArg) {
|
|
42
42
|
return pnpmIgnoreScriptsFlags.has(cmdArg);
|
|
43
43
|
}
|
|
@@ -51,7 +51,7 @@ function isPnpmIgnoreScriptsFlag(cmdArg) {
|
|
|
51
51
|
* isPnpmInstallCommand('run') // false
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
55
55
|
function isPnpmInstallCommand(cmdArg) {
|
|
56
56
|
return pnpmInstallCommands.has(cmdArg);
|
|
57
57
|
}
|
package/dist/env/boolean.js
CHANGED
|
@@ -28,7 +28,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
28
28
|
* @returns `true` if value is '1', 'true', or 'yes' (case-insensitive), `false`
|
|
29
29
|
* otherwise.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
32
32
|
function envAsBoolean(value, defaultValueOrOptions = false) {
|
|
33
33
|
const { defaultValue = false, trim = true } = typeof defaultValueOrOptions === "boolean" ? { defaultValue: defaultValueOrOptions } : defaultValueOrOptions ?? {};
|
|
34
34
|
if (typeof value === "string") {
|
package/dist/env/ci.js
CHANGED
|
@@ -23,7 +23,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
23
23
|
*
|
|
24
24
|
* @returns `true` if running in a CI environment, `false` otherwise
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
27
27
|
function getCI() {
|
|
28
28
|
return require_env_rewire.isInEnv("CI");
|
|
29
29
|
}
|
package/dist/env/debug.js
CHANGED
|
@@ -22,7 +22,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
22
22
|
*
|
|
23
23
|
* @returns The debug filter string, or `undefined` if not set
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
26
26
|
function getDebug() {
|
|
27
27
|
return require_env_rewire.getEnvValue("DEBUG");
|
|
28
28
|
}
|
package/dist/env/github.js
CHANGED
|
@@ -22,7 +22,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
22
22
|
*
|
|
23
23
|
* @returns The GH CLI token, or `undefined` if not set
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
26
26
|
function getGhToken() {
|
|
27
27
|
return require_env_rewire.getEnvValue("GH_TOKEN");
|
|
28
28
|
}
|
|
@@ -40,7 +40,7 @@ function getGhToken() {
|
|
|
40
40
|
*
|
|
41
41
|
* @returns The GitHub API URL, or `undefined` if not set
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
44
44
|
function getGithubApiUrl() {
|
|
45
45
|
return require_env_rewire.getEnvValue("GITHUB_API_URL");
|
|
46
46
|
}
|
|
@@ -57,7 +57,7 @@ function getGithubApiUrl() {
|
|
|
57
57
|
*
|
|
58
58
|
* @returns The pull request base branch name, or `undefined` if not set
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
61
61
|
function getGithubBaseRef() {
|
|
62
62
|
return require_env_rewire.getEnvValue("GITHUB_BASE_REF");
|
|
63
63
|
}
|
|
@@ -74,7 +74,7 @@ function getGithubBaseRef() {
|
|
|
74
74
|
*
|
|
75
75
|
* @returns The branch or tag name, or `undefined` if not set
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
78
78
|
function getGithubRefName() {
|
|
79
79
|
return require_env_rewire.getEnvValue("GITHUB_REF_NAME");
|
|
80
80
|
}
|
|
@@ -91,7 +91,7 @@ function getGithubRefName() {
|
|
|
91
91
|
*
|
|
92
92
|
* @returns The ref type ('branch' or 'tag'), or `undefined` if not set
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
95
95
|
function getGithubRefType() {
|
|
96
96
|
return require_env_rewire.getEnvValue("GITHUB_REF_TYPE");
|
|
97
97
|
}
|
|
@@ -109,7 +109,7 @@ function getGithubRefType() {
|
|
|
109
109
|
*
|
|
110
110
|
* @returns The repository name, or `undefined` if not set
|
|
111
111
|
*/
|
|
112
|
-
|
|
112
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
113
113
|
function getGithubRepository() {
|
|
114
114
|
return require_env_rewire.getEnvValue("GITHUB_REPOSITORY");
|
|
115
115
|
}
|
|
@@ -127,7 +127,7 @@ function getGithubRepository() {
|
|
|
127
127
|
*
|
|
128
128
|
* @returns The GitHub server URL, or `undefined` if not set
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
131
131
|
function getGithubServerUrl() {
|
|
132
132
|
return require_env_rewire.getEnvValue("GITHUB_SERVER_URL");
|
|
133
133
|
}
|
|
@@ -145,7 +145,7 @@ function getGithubServerUrl() {
|
|
|
145
145
|
*
|
|
146
146
|
* @returns The GitHub token, or `undefined` if not set
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
149
149
|
function getGithubToken() {
|
|
150
150
|
return require_env_rewire.getEnvValue("GITHUB_TOKEN");
|
|
151
151
|
}
|
package/dist/env/home.js
CHANGED
|
@@ -32,7 +32,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
32
32
|
*
|
|
33
33
|
* @returns The user's home directory path, or `undefined` if not resolvable
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
36
36
|
function getHome() {
|
|
37
37
|
return require_env_rewire.getEnvValue("HOME") ?? require_env_rewire.getEnvValue("USERPROFILE");
|
|
38
38
|
}
|
package/dist/env/locale.js
CHANGED
|
@@ -21,7 +21,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
21
21
|
*
|
|
22
22
|
* @returns The system locale string, or `undefined` if not set
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
25
25
|
function getLang() {
|
|
26
26
|
return require_env_rewire.getEnvValue("LANG");
|
|
27
27
|
}
|
|
@@ -38,7 +38,7 @@ function getLang() {
|
|
|
38
38
|
*
|
|
39
39
|
* @returns The locale override string, or `undefined` if not set
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
42
42
|
function getLcAll() {
|
|
43
43
|
return require_env_rewire.getEnvValue("LC_ALL");
|
|
44
44
|
}
|
|
@@ -55,7 +55,7 @@ function getLcAll() {
|
|
|
55
55
|
*
|
|
56
56
|
* @returns The messages locale string, or `undefined` if not set
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
59
59
|
function getLcMessages() {
|
|
60
60
|
return require_env_rewire.getEnvValue("LC_MESSAGES");
|
|
61
61
|
}
|
|
@@ -22,7 +22,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
22
22
|
*
|
|
23
23
|
* @returns The Node.js registry auth token, or `undefined` if not set
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
26
26
|
function getNodeAuthToken() {
|
|
27
27
|
return require_env_rewire.getEnvValue("NODE_AUTH_TOKEN");
|
|
28
28
|
}
|
package/dist/env/node-env.js
CHANGED
|
@@ -22,7 +22,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
22
22
|
*
|
|
23
23
|
* @returns The Node.js environment mode, or `undefined` if not set
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
26
26
|
function getNodeEnv() {
|
|
27
27
|
return require_env_rewire.getEnvValue("NODE_ENV");
|
|
28
28
|
}
|
package/dist/env/npm.js
CHANGED
|
@@ -22,7 +22,7 @@ const require_env_rewire = require('./rewire.js');
|
|
|
22
22
|
*
|
|
23
23
|
* @returns The configured NPM registry URL, or `undefined` if not set
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
26
26
|
function getNpmConfigRegistry() {
|
|
27
27
|
return require_env_rewire.getEnvValue("npm_config_registry");
|
|
28
28
|
}
|
|
@@ -40,7 +40,7 @@ function getNpmConfigRegistry() {
|
|
|
40
40
|
*
|
|
41
41
|
* @returns The package manager user agent string, or `undefined` if not set
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
44
44
|
function getNpmConfigUserAgent() {
|
|
45
45
|
return require_env_rewire.getEnvValue("npm_config_user_agent");
|
|
46
46
|
}
|
|
@@ -58,7 +58,7 @@ function getNpmConfigUserAgent() {
|
|
|
58
58
|
*
|
|
59
59
|
* @returns The current lifecycle event name, or `undefined` if not set
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
62
62
|
function getNpmLifecycleEvent() {
|
|
63
63
|
return require_env_rewire.getEnvValue("npm_lifecycle_event");
|
|
64
64
|
}
|
|
@@ -75,7 +75,7 @@ function getNpmLifecycleEvent() {
|
|
|
75
75
|
*
|
|
76
76
|
* @returns The NPM registry URL override, or `undefined` if not set
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
79
79
|
function getNpmRegistry() {
|
|
80
80
|
return require_env_rewire.getEnvValue("NPM_REGISTRY");
|
|
81
81
|
}
|
|
@@ -92,7 +92,7 @@ function getNpmRegistry() {
|
|
|
92
92
|
*
|
|
93
93
|
* @returns The NPM auth token, or `undefined` if not set
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
96
96
|
function getNpmToken() {
|
|
97
97
|
return require_env_rewire.getEnvValue("NPM_TOKEN");
|
|
98
98
|
}
|