@socketsecurity/lib 5.23.0 → 5.24.0
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 +12 -0
- package/dist/constants/socket.js +1 -1
- package/dist/external/@npmcli/package-json.js +3968 -9
- package/dist/external/npm-pack.js +6988 -4099
- package/package.json +2 -6
- package/dist/env/socket-cli-shadow.d.ts +0 -77
- package/dist/env/socket-cli-shadow.js +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/lib",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"packageManager": "pnpm@11.0.0-rc.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Core utilities and infrastructure for Socket.dev security tools",
|
|
@@ -351,10 +351,6 @@
|
|
|
351
351
|
"types": "./dist/env/socket-cli.d.ts",
|
|
352
352
|
"default": "./dist/env/socket-cli.js"
|
|
353
353
|
},
|
|
354
|
-
"./env/socket-cli-shadow": {
|
|
355
|
-
"types": "./dist/env/socket-cli-shadow.d.ts",
|
|
356
|
-
"default": "./dist/env/socket-cli-shadow.js"
|
|
357
|
-
},
|
|
358
354
|
"./env/temp-dir": {
|
|
359
355
|
"types": "./dist/env/temp-dir.d.ts",
|
|
360
356
|
"default": "./dist/env/temp-dir.js"
|
|
@@ -724,7 +720,7 @@
|
|
|
724
720
|
"@socketregistry/is-unicode-supported": "1.0.5",
|
|
725
721
|
"@socketregistry/packageurl-js": "1.4.2",
|
|
726
722
|
"@socketregistry/yocto-spinner": "1.0.25",
|
|
727
|
-
"@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.
|
|
723
|
+
"@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.23.0",
|
|
728
724
|
"@types/node": "24.9.2",
|
|
729
725
|
"@typescript/native-preview": "7.0.0-dev.20260415.1",
|
|
730
726
|
"@vitest/coverage-v8": "4.0.3",
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Socket CLI shadow mode environment variables.
|
|
3
|
-
* Provides typed getters for SOCKET_CLI_SHADOW_* environment variables.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Controls Socket CLI shadow mode risk acceptance.
|
|
7
|
-
*
|
|
8
|
-
* @returns Whether to accept all risks in shadow mode
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```typescript
|
|
12
|
-
* import { getSocketCliShadowAcceptRisks } from '@socketsecurity/lib/env/socket-cli-shadow'
|
|
13
|
-
*
|
|
14
|
-
* if (getSocketCliShadowAcceptRisks()) {
|
|
15
|
-
* console.log('Shadow mode risks accepted')
|
|
16
|
-
* }
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare function getSocketCliShadowAcceptRisks(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* API token for Socket CLI shadow mode.
|
|
22
|
-
*
|
|
23
|
-
* @returns Shadow mode API token or undefined
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```typescript
|
|
27
|
-
* import { getSocketCliShadowApiToken } from '@socketsecurity/lib/env/socket-cli-shadow'
|
|
28
|
-
*
|
|
29
|
-
* const token = getSocketCliShadowApiToken()
|
|
30
|
-
* // e.g. 'sk_shadow_abc123...' or undefined
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function getSocketCliShadowApiToken(): string | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Binary path for Socket CLI shadow mode.
|
|
36
|
-
*
|
|
37
|
-
* @returns Shadow mode binary path or undefined
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* import { getSocketCliShadowBin } from '@socketsecurity/lib/env/socket-cli-shadow'
|
|
42
|
-
*
|
|
43
|
-
* const bin = getSocketCliShadowBin()
|
|
44
|
-
* // e.g. '/usr/local/bin/socket-shadow' or undefined
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export declare function getSocketCliShadowBin(): string | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Controls Socket CLI shadow mode progress display.
|
|
50
|
-
*
|
|
51
|
-
* @returns Whether to show progress in shadow mode
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```typescript
|
|
55
|
-
* import { getSocketCliShadowProgress } from '@socketsecurity/lib/env/socket-cli-shadow'
|
|
56
|
-
*
|
|
57
|
-
* if (getSocketCliShadowProgress()) {
|
|
58
|
-
* console.log('Shadow mode progress enabled')
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export declare function getSocketCliShadowProgress(): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Controls Socket CLI shadow mode silent operation.
|
|
65
|
-
*
|
|
66
|
-
* @returns Whether shadow mode should operate silently
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* import { getSocketCliShadowSilent } from '@socketsecurity/lib/env/socket-cli-shadow'
|
|
71
|
-
*
|
|
72
|
-
* if (getSocketCliShadowSilent()) {
|
|
73
|
-
* console.log('Shadow mode is silent')
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
export declare function getSocketCliShadowSilent(): boolean;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Socket Lib - Built with esbuild */
|
|
3
|
-
"use strict";
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var socket_cli_shadow_exports = {};
|
|
22
|
-
__export(socket_cli_shadow_exports, {
|
|
23
|
-
getSocketCliShadowAcceptRisks: () => getSocketCliShadowAcceptRisks,
|
|
24
|
-
getSocketCliShadowApiToken: () => getSocketCliShadowApiToken,
|
|
25
|
-
getSocketCliShadowBin: () => getSocketCliShadowBin,
|
|
26
|
-
getSocketCliShadowProgress: () => getSocketCliShadowProgress,
|
|
27
|
-
getSocketCliShadowSilent: () => getSocketCliShadowSilent
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(socket_cli_shadow_exports);
|
|
30
|
-
var import_helpers = require("./helpers");
|
|
31
|
-
var import_rewire = require("./rewire");
|
|
32
|
-
// @__NO_SIDE_EFFECTS__
|
|
33
|
-
function getSocketCliShadowAcceptRisks() {
|
|
34
|
-
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_ACCEPT_RISKS"));
|
|
35
|
-
}
|
|
36
|
-
// @__NO_SIDE_EFFECTS__
|
|
37
|
-
function getSocketCliShadowApiToken() {
|
|
38
|
-
return (0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_API_TOKEN");
|
|
39
|
-
}
|
|
40
|
-
// @__NO_SIDE_EFFECTS__
|
|
41
|
-
function getSocketCliShadowBin() {
|
|
42
|
-
return (0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_BIN");
|
|
43
|
-
}
|
|
44
|
-
// @__NO_SIDE_EFFECTS__
|
|
45
|
-
function getSocketCliShadowProgress() {
|
|
46
|
-
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_PROGRESS"));
|
|
47
|
-
}
|
|
48
|
-
// @__NO_SIDE_EFFECTS__
|
|
49
|
-
function getSocketCliShadowSilent() {
|
|
50
|
-
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_SILENT"));
|
|
51
|
-
}
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {
|
|
54
|
-
getSocketCliShadowAcceptRisks,
|
|
55
|
-
getSocketCliShadowApiToken,
|
|
56
|
-
getSocketCliShadowBin,
|
|
57
|
-
getSocketCliShadowProgress,
|
|
58
|
-
getSocketCliShadowSilent
|
|
59
|
-
});
|