@socketsecurity/lib 3.3.0 → 3.3.2

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +3 -2
  3. package/dist/agent.d.ts +0 -4
  4. package/dist/agent.js +3 -7
  5. package/dist/constants/node.js +1 -1
  6. package/dist/constants/packages.d.ts +7 -0
  7. package/dist/constants/packages.js +13 -6
  8. package/dist/constants/socket.d.ts +1 -0
  9. package/dist/constants/socket.js +3 -0
  10. package/dist/dlx-package.js +27 -0
  11. package/dist/env/ci.d.ts +1 -0
  12. package/dist/env/ci.js +1 -0
  13. package/dist/env/debug.d.ts +1 -0
  14. package/dist/env/debug.js +1 -0
  15. package/dist/env/github.d.ts +8 -0
  16. package/dist/env/github.js +8 -0
  17. package/dist/env/helpers.d.ts +3 -0
  18. package/dist/env/helpers.js +3 -0
  19. package/dist/env/home.d.ts +1 -0
  20. package/dist/env/home.js +1 -0
  21. package/dist/env/locale.d.ts +3 -0
  22. package/dist/env/locale.js +3 -0
  23. package/dist/env/node-auth-token.d.ts +1 -0
  24. package/dist/env/node-auth-token.js +1 -0
  25. package/dist/env/node-env.d.ts +1 -0
  26. package/dist/env/node-env.js +1 -0
  27. package/dist/env/npm.d.ts +5 -0
  28. package/dist/env/npm.js +5 -0
  29. package/dist/env/package-manager.d.ts +3 -0
  30. package/dist/env/package-manager.js +5 -2
  31. package/dist/env/path.d.ts +1 -0
  32. package/dist/env/path.js +1 -0
  33. package/dist/env/pre-commit.d.ts +1 -0
  34. package/dist/env/pre-commit.js +1 -0
  35. package/dist/env/shell.d.ts +1 -0
  36. package/dist/env/shell.js +1 -0
  37. package/dist/env/socket-cli-shadow.d.ts +5 -0
  38. package/dist/env/socket-cli-shadow.js +5 -0
  39. package/dist/env/socket-cli.d.ts +14 -0
  40. package/dist/env/socket-cli.js +14 -0
  41. package/dist/env/socket.d.ts +15 -0
  42. package/dist/env/socket.js +15 -0
  43. package/dist/env/temp-dir.d.ts +3 -0
  44. package/dist/env/temp-dir.js +3 -0
  45. package/dist/env/term.d.ts +1 -0
  46. package/dist/env/term.js +1 -0
  47. package/dist/env/test.d.ts +3 -0
  48. package/dist/env/test.js +4 -1
  49. package/dist/env/windows.d.ts +4 -0
  50. package/dist/env/windows.js +4 -0
  51. package/dist/env/xdg.d.ts +3 -0
  52. package/dist/env/xdg.js +3 -0
  53. package/dist/external/@inquirer/checkbox.js +3361 -3
  54. package/dist/external/@inquirer/confirm.js +1 -0
  55. package/dist/external/@inquirer/input.js +1 -0
  56. package/dist/external/@inquirer/password.js +1 -0
  57. package/dist/external/@inquirer/search.js +1 -0
  58. package/dist/external/@inquirer/select.js +1 -0
  59. package/dist/external/@npmcli/arborist.js +5 -0
  60. package/dist/external/@yarnpkg/extensions.js +2 -2
  61. package/dist/external/cacache.js +4 -13036
  62. package/dist/external/libnpmpack.js +4 -67685
  63. package/dist/external/make-fetch-happen.js +4 -22639
  64. package/dist/external/normalize-package-data.js +4 -4478
  65. package/dist/external/npm-core.js +6588 -0
  66. package/dist/external/npm-pack.js +87518 -0
  67. package/dist/external/npm-package-arg.js +4 -4515
  68. package/dist/external/pacote.js +4 -50314
  69. package/dist/external/semver.js +4 -1934
  70. package/dist/fs.d.ts +0 -6
  71. package/dist/fs.js +0 -6
  72. package/dist/lifecycle-script-names.d.ts +1 -2
  73. package/dist/lifecycle-script-names.js +2 -4
  74. package/dist/logger.d.ts +4 -0
  75. package/dist/logger.js +4 -1
  76. package/dist/maintained-node-versions.d.ts +1 -2
  77. package/dist/maintained-node-versions.js +2 -4
  78. package/dist/package-default-node-range.d.ts +1 -2
  79. package/dist/package-default-node-range.js +3 -5
  80. package/dist/package-default-socket-categories.d.ts +1 -2
  81. package/dist/package-default-socket-categories.js +2 -4
  82. package/dist/package-extensions.d.ts +1 -2
  83. package/dist/package-extensions.js +2 -4
  84. package/dist/path.d.ts +11 -0
  85. package/dist/stdio/prompts.d.ts +17 -0
  86. package/dist/stdio/prompts.js +10 -11
  87. package/package.json +78 -73
  88. package/dist/external/@inquirer/core.js +0 -4
  89. package/dist/external/@inquirer/prompts.js +0 -4
package/dist/env/shell.js CHANGED
@@ -23,6 +23,7 @@ __export(shell_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(shell_exports);
25
25
  var import_rewire = require("#env/rewire");
26
+ // @__NO_SIDE_EFFECTS__
26
27
  function getShell() {
27
28
  return (0, import_rewire.getEnvValue)("SHELL");
28
29
  }
@@ -3,28 +3,33 @@
3
3
  *
4
4
  * @returns Whether to accept all risks in shadow mode
5
5
  */
6
+ /*@__NO_SIDE_EFFECTS__*/
6
7
  export declare function getSocketCliShadowAcceptRisks(): boolean;
7
8
  /**
8
9
  * API token for Socket CLI shadow mode.
9
10
  *
10
11
  * @returns Shadow mode API token or undefined
11
12
  */
13
+ /*@__NO_SIDE_EFFECTS__*/
12
14
  export declare function getSocketCliShadowApiToken(): string | undefined;
13
15
  /**
14
16
  * Binary path for Socket CLI shadow mode.
15
17
  *
16
18
  * @returns Shadow mode binary path or undefined
17
19
  */
20
+ /*@__NO_SIDE_EFFECTS__*/
18
21
  export declare function getSocketCliShadowBin(): string | undefined;
19
22
  /**
20
23
  * Controls Socket CLI shadow mode progress display.
21
24
  *
22
25
  * @returns Whether to show progress in shadow mode
23
26
  */
27
+ /*@__NO_SIDE_EFFECTS__*/
24
28
  export declare function getSocketCliShadowProgress(): boolean;
25
29
  /**
26
30
  * Controls Socket CLI shadow mode silent operation.
27
31
  *
28
32
  * @returns Whether shadow mode should operate silently
29
33
  */
34
+ /*@__NO_SIDE_EFFECTS__*/
30
35
  export declare function getSocketCliShadowSilent(): boolean;
@@ -28,18 +28,23 @@ __export(socket_cli_shadow_exports, {
28
28
  module.exports = __toCommonJS(socket_cli_shadow_exports);
29
29
  var import_helpers = require("#env/helpers");
30
30
  var import_rewire = require("#env/rewire");
31
+ // @__NO_SIDE_EFFECTS__
31
32
  function getSocketCliShadowAcceptRisks() {
32
33
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_ACCEPT_RISKS"));
33
34
  }
35
+ // @__NO_SIDE_EFFECTS__
34
36
  function getSocketCliShadowApiToken() {
35
37
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_API_TOKEN");
36
38
  }
39
+ // @__NO_SIDE_EFFECTS__
37
40
  function getSocketCliShadowBin() {
38
41
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_BIN");
39
42
  }
43
+ // @__NO_SIDE_EFFECTS__
40
44
  function getSocketCliShadowProgress() {
41
45
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_PROGRESS"));
42
46
  }
47
+ // @__NO_SIDE_EFFECTS__
43
48
  function getSocketCliShadowSilent() {
44
49
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_SILENT"));
45
50
  }
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @returns Whether to accept all risks
5
5
  */
6
+ /*@__NO_SIDE_EFFECTS__*/
6
7
  export declare function getSocketCliAcceptRisks(): boolean;
7
8
  /**
8
9
  * Socket CLI API base URL (alternative name).
@@ -10,6 +11,7 @@ export declare function getSocketCliAcceptRisks(): boolean;
10
11
  *
11
12
  * @returns API base URL or undefined
12
13
  */
14
+ /*@__NO_SIDE_EFFECTS__*/
13
15
  export declare function getSocketCliApiBaseUrl(): string | undefined;
14
16
  /**
15
17
  * Proxy URL for Socket CLI API requests (alternative name).
@@ -18,12 +20,14 @@ export declare function getSocketCliApiBaseUrl(): string | undefined;
18
20
  *
19
21
  * @returns API proxy URL or undefined
20
22
  */
23
+ /*@__NO_SIDE_EFFECTS__*/
21
24
  export declare function getSocketCliApiProxy(): string | undefined;
22
25
  /**
23
26
  * Timeout in milliseconds for Socket CLI API requests (alternative name).
24
27
  *
25
28
  * @returns API timeout in milliseconds
26
29
  */
30
+ /*@__NO_SIDE_EFFECTS__*/
27
31
  export declare function getSocketCliApiTimeout(): number;
28
32
  /**
29
33
  * Socket CLI API authentication token (alternative name).
@@ -32,30 +36,35 @@ export declare function getSocketCliApiTimeout(): number;
32
36
  *
33
37
  * @returns API token or undefined
34
38
  */
39
+ /*@__NO_SIDE_EFFECTS__*/
35
40
  export declare function getSocketCliApiToken(): string | undefined;
36
41
  /**
37
42
  * Socket CLI configuration file path (alternative name).
38
43
  *
39
44
  * @returns Config file path or undefined
40
45
  */
46
+ /*@__NO_SIDE_EFFECTS__*/
41
47
  export declare function getSocketCliConfig(): string | undefined;
42
48
  /**
43
49
  * Controls Socket CLI fix mode.
44
50
  *
45
51
  * @returns Fix mode value or undefined
46
52
  */
53
+ /*@__NO_SIDE_EFFECTS__*/
47
54
  export declare function getSocketCliFix(): string | undefined;
48
55
  /**
49
56
  * Whether to skip Socket CLI API token requirement (alternative name).
50
57
  *
51
58
  * @returns Whether to skip API token requirement
52
59
  */
60
+ /*@__NO_SIDE_EFFECTS__*/
53
61
  export declare function getSocketCliNoApiToken(): boolean;
54
62
  /**
55
63
  * Controls Socket CLI optimization mode.
56
64
  *
57
65
  * @returns Whether optimization mode is enabled
58
66
  */
67
+ /*@__NO_SIDE_EFFECTS__*/
59
68
  export declare function getSocketCliOptimize(): boolean;
60
69
  /**
61
70
  * Socket CLI organization slug identifier (alternative name).
@@ -63,12 +72,14 @@ export declare function getSocketCliOptimize(): boolean;
63
72
  *
64
73
  * @returns Organization slug or undefined
65
74
  */
75
+ /*@__NO_SIDE_EFFECTS__*/
66
76
  export declare function getSocketCliOrgSlug(): string | undefined;
67
77
  /**
68
78
  * Whether to view all Socket CLI risks (alternative name).
69
79
  *
70
80
  * @returns Whether to view all risks
71
81
  */
82
+ /*@__NO_SIDE_EFFECTS__*/
72
83
  export declare function getSocketCliViewAllRisks(): boolean;
73
84
  /**
74
85
  * Socket CLI GitHub authentication token.
@@ -76,6 +87,7 @@ export declare function getSocketCliViewAllRisks(): boolean;
76
87
  *
77
88
  * @returns GitHub token or undefined
78
89
  */
90
+ /*@__NO_SIDE_EFFECTS__*/
79
91
  export declare function getSocketCliGithubToken(): string | undefined;
80
92
  /**
81
93
  * Bootstrap package spec (e.g., @socketsecurity/cli@^2.0.11).
@@ -83,6 +95,7 @@ export declare function getSocketCliGithubToken(): string | undefined;
83
95
  *
84
96
  * @returns Bootstrap package spec or undefined
85
97
  */
98
+ /*@__NO_SIDE_EFFECTS__*/
86
99
  export declare function getSocketCliBootstrapSpec(): string | undefined;
87
100
  /**
88
101
  * Bootstrap cache directory path.
@@ -90,4 +103,5 @@ export declare function getSocketCliBootstrapSpec(): string | undefined;
90
103
  *
91
104
  * @returns Bootstrap cache directory or undefined
92
105
  */
106
+ /*@__NO_SIDE_EFFECTS__*/
93
107
  export declare function getSocketCliBootstrapCacheDir(): string | undefined;
@@ -37,45 +37,59 @@ __export(socket_cli_exports, {
37
37
  module.exports = __toCommonJS(socket_cli_exports);
38
38
  var import_helpers = require("#env/helpers");
39
39
  var import_rewire = require("#env/rewire");
40
+ // @__NO_SIDE_EFFECTS__
40
41
  function getSocketCliAcceptRisks() {
41
42
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_ACCEPT_RISKS"));
42
43
  }
44
+ // @__NO_SIDE_EFFECTS__
43
45
  function getSocketCliApiBaseUrl() {
44
46
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_API_BASE_URL") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_BASE_URL");
45
47
  }
48
+ // @__NO_SIDE_EFFECTS__
46
49
  function getSocketCliApiProxy() {
47
50
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_API_PROXY") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_PROXY") || (0, import_rewire.getEnvValue)("HTTPS_PROXY") || (0, import_rewire.getEnvValue)("https_proxy") || (0, import_rewire.getEnvValue)("HTTP_PROXY") || (0, import_rewire.getEnvValue)("http_proxy");
48
51
  }
52
+ // @__NO_SIDE_EFFECTS__
49
53
  function getSocketCliApiTimeout() {
50
54
  return (0, import_helpers.envAsNumber)((0, import_rewire.getEnvValue)("SOCKET_CLI_API_TIMEOUT"));
51
55
  }
56
+ // @__NO_SIDE_EFFECTS__
52
57
  function getSocketCliApiToken() {
53
58
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_API_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_CLI_API_KEY") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_KEY");
54
59
  }
60
+ // @__NO_SIDE_EFFECTS__
55
61
  function getSocketCliConfig() {
56
62
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_CONFIG");
57
63
  }
64
+ // @__NO_SIDE_EFFECTS__
58
65
  function getSocketCliFix() {
59
66
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_FIX");
60
67
  }
68
+ // @__NO_SIDE_EFFECTS__
61
69
  function getSocketCliNoApiToken() {
62
70
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_NO_API_TOKEN"));
63
71
  }
72
+ // @__NO_SIDE_EFFECTS__
64
73
  function getSocketCliOptimize() {
65
74
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_OPTIMIZE"));
66
75
  }
76
+ // @__NO_SIDE_EFFECTS__
67
77
  function getSocketCliOrgSlug() {
68
78
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_ORG_SLUG") || (0, import_rewire.getEnvValue)("SOCKET_ORG_SLUG");
69
79
  }
80
+ // @__NO_SIDE_EFFECTS__
70
81
  function getSocketCliViewAllRisks() {
71
82
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_VIEW_ALL_RISKS"));
72
83
  }
84
+ // @__NO_SIDE_EFFECTS__
73
85
  function getSocketCliGithubToken() {
74
86
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_GITHUB_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_GITHUB_PAT") || (0, import_rewire.getEnvValue)("GITHUB_TOKEN");
75
87
  }
88
+ // @__NO_SIDE_EFFECTS__
76
89
  function getSocketCliBootstrapSpec() {
77
90
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_BOOTSTRAP_SPEC");
78
91
  }
92
+ // @__NO_SIDE_EFFECTS__
79
93
  function getSocketCliBootstrapCacheDir() {
80
94
  return (0, import_rewire.getEnvValue)("SOCKET_CLI_BOOTSTRAP_CACHE_DIR");
81
95
  }
@@ -2,74 +2,89 @@
2
2
  * SOCKET_ACCEPT_RISKS environment variable getter.
3
3
  * Whether to accept all Socket Security risks.
4
4
  */
5
+ /*@__NO_SIDE_EFFECTS__*/
5
6
  export declare function getSocketAcceptRisks(): boolean;
6
7
  /**
7
8
  * SOCKET_API_BASE_URL environment variable getter.
8
9
  * Socket Security API base URL.
9
10
  */
11
+ /*@__NO_SIDE_EFFECTS__*/
10
12
  export declare function getSocketApiBaseUrl(): string | undefined;
11
13
  /**
12
14
  * SOCKET_API_PROXY environment variable getter.
13
15
  * Proxy URL for Socket Security API requests.
14
16
  */
17
+ /*@__NO_SIDE_EFFECTS__*/
15
18
  export declare function getSocketApiProxy(): string | undefined;
16
19
  /**
17
20
  * SOCKET_API_TIMEOUT environment variable getter.
18
21
  * Timeout in milliseconds for Socket Security API requests.
19
22
  */
23
+ /*@__NO_SIDE_EFFECTS__*/
20
24
  export declare function getSocketApiTimeout(): number;
21
25
  /**
22
26
  * SOCKET_API_TOKEN environment variable getter.
23
27
  * Socket Security API authentication token.
24
28
  */
29
+ /*@__NO_SIDE_EFFECTS__*/
25
30
  export declare function getSocketApiToken(): string | undefined;
26
31
  /**
27
32
  * SOCKET_CACACHE_DIR environment variable getter.
28
33
  * Overrides the default Socket cacache directory location.
29
34
  */
35
+ /*@__NO_SIDE_EFFECTS__*/
30
36
  export declare function getSocketCacacheDir(): string | undefined;
31
37
  /**
32
38
  * SOCKET_CONFIG environment variable getter.
33
39
  * Socket Security configuration file path.
34
40
  */
41
+ /*@__NO_SIDE_EFFECTS__*/
35
42
  export declare function getSocketConfig(): string | undefined;
36
43
  /**
37
44
  * SOCKET_DEBUG environment variable getter.
38
45
  * Controls Socket-specific debug output.
39
46
  */
47
+ /*@__NO_SIDE_EFFECTS__*/
40
48
  export declare function getSocketDebug(): string | undefined;
41
49
  /**
42
50
  * SOCKET_DLX_DIR environment variable getter.
43
51
  * Overrides the default Socket DLX directory location.
44
52
  */
53
+ /*@__NO_SIDE_EFFECTS__*/
45
54
  export declare function getSocketDlxDirEnv(): string | undefined;
46
55
  /**
47
56
  * SOCKET_HOME environment variable getter.
48
57
  * Socket Security home directory path.
49
58
  */
59
+ /*@__NO_SIDE_EFFECTS__*/
50
60
  export declare function getSocketHome(): string | undefined;
51
61
  /**
52
62
  * SOCKET_NO_API_TOKEN environment variable getter.
53
63
  * Whether to skip Socket Security API token requirement.
54
64
  */
65
+ /*@__NO_SIDE_EFFECTS__*/
55
66
  export declare function getSocketNoApiToken(): boolean;
56
67
  /**
57
68
  * SOCKET_NPM_REGISTRY environment variable getter.
58
69
  * Socket NPM registry URL (alternative name).
59
70
  */
71
+ /*@__NO_SIDE_EFFECTS__*/
60
72
  export declare function getSocketNpmRegistry(): string | undefined;
61
73
  /**
62
74
  * SOCKET_ORG_SLUG environment variable getter.
63
75
  * Socket Security organization slug identifier.
64
76
  */
77
+ /*@__NO_SIDE_EFFECTS__*/
65
78
  export declare function getSocketOrgSlug(): string | undefined;
66
79
  /**
67
80
  * SOCKET_REGISTRY_URL environment variable getter.
68
81
  * Socket Registry URL for package installation.
69
82
  */
83
+ /*@__NO_SIDE_EFFECTS__*/
70
84
  export declare function getSocketRegistryUrl(): string | undefined;
71
85
  /**
72
86
  * SOCKET_VIEW_ALL_RISKS environment variable getter.
73
87
  * Whether to view all Socket Security risks.
74
88
  */
89
+ /*@__NO_SIDE_EFFECTS__*/
75
90
  export declare function getSocketViewAllRisks(): boolean;
@@ -38,48 +38,63 @@ __export(socket_exports, {
38
38
  module.exports = __toCommonJS(socket_exports);
39
39
  var import_helpers = require("#env/helpers");
40
40
  var import_rewire = require("#env/rewire");
41
+ // @__NO_SIDE_EFFECTS__
41
42
  function getSocketAcceptRisks() {
42
43
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_ACCEPT_RISKS"));
43
44
  }
45
+ // @__NO_SIDE_EFFECTS__
44
46
  function getSocketApiBaseUrl() {
45
47
  return (0, import_rewire.getEnvValue)("SOCKET_API_BASE_URL");
46
48
  }
49
+ // @__NO_SIDE_EFFECTS__
47
50
  function getSocketApiProxy() {
48
51
  return (0, import_rewire.getEnvValue)("SOCKET_API_PROXY");
49
52
  }
53
+ // @__NO_SIDE_EFFECTS__
50
54
  function getSocketApiTimeout() {
51
55
  return (0, import_helpers.envAsNumber)((0, import_rewire.getEnvValue)("SOCKET_API_TIMEOUT"));
52
56
  }
57
+ // @__NO_SIDE_EFFECTS__
53
58
  function getSocketApiToken() {
54
59
  return (0, import_rewire.getEnvValue)("SOCKET_API_TOKEN");
55
60
  }
61
+ // @__NO_SIDE_EFFECTS__
56
62
  function getSocketCacacheDir() {
57
63
  return (0, import_rewire.getEnvValue)("SOCKET_CACACHE_DIR");
58
64
  }
65
+ // @__NO_SIDE_EFFECTS__
59
66
  function getSocketConfig() {
60
67
  return (0, import_rewire.getEnvValue)("SOCKET_CONFIG");
61
68
  }
69
+ // @__NO_SIDE_EFFECTS__
62
70
  function getSocketDebug() {
63
71
  return (0, import_rewire.getEnvValue)("SOCKET_DEBUG");
64
72
  }
73
+ // @__NO_SIDE_EFFECTS__
65
74
  function getSocketDlxDirEnv() {
66
75
  return (0, import_rewire.getEnvValue)("SOCKET_DLX_DIR");
67
76
  }
77
+ // @__NO_SIDE_EFFECTS__
68
78
  function getSocketHome() {
69
79
  return (0, import_rewire.getEnvValue)("SOCKET_HOME");
70
80
  }
81
+ // @__NO_SIDE_EFFECTS__
71
82
  function getSocketNoApiToken() {
72
83
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_NO_API_TOKEN"));
73
84
  }
85
+ // @__NO_SIDE_EFFECTS__
74
86
  function getSocketNpmRegistry() {
75
87
  return (0, import_rewire.getEnvValue)("SOCKET_NPM_REGISTRY");
76
88
  }
89
+ // @__NO_SIDE_EFFECTS__
77
90
  function getSocketOrgSlug() {
78
91
  return (0, import_rewire.getEnvValue)("SOCKET_ORG_SLUG");
79
92
  }
93
+ // @__NO_SIDE_EFFECTS__
80
94
  function getSocketRegistryUrl() {
81
95
  return (0, import_rewire.getEnvValue)("SOCKET_REGISTRY_URL");
82
96
  }
97
+ // @__NO_SIDE_EFFECTS__
83
98
  function getSocketViewAllRisks() {
84
99
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_VIEW_ALL_RISKS"));
85
100
  }
@@ -2,14 +2,17 @@
2
2
  * TMPDIR environment variable.
3
3
  * Unix/macOS temporary directory path.
4
4
  */
5
+ /*@__NO_SIDE_EFFECTS__*/
5
6
  export declare function getTmpdir(): string | undefined;
6
7
  /**
7
8
  * TEMP environment variable.
8
9
  * Windows temporary directory path.
9
10
  */
11
+ /*@__NO_SIDE_EFFECTS__*/
10
12
  export declare function getTemp(): string | undefined;
11
13
  /**
12
14
  * TMP environment variable.
13
15
  * Alternative temporary directory path.
14
16
  */
17
+ /*@__NO_SIDE_EFFECTS__*/
15
18
  export declare function getTmp(): string | undefined;
@@ -25,12 +25,15 @@ __export(temp_dir_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(temp_dir_exports);
27
27
  var import_rewire = require("#env/rewire");
28
+ // @__NO_SIDE_EFFECTS__
28
29
  function getTmpdir() {
29
30
  return (0, import_rewire.getEnvValue)("TMPDIR");
30
31
  }
32
+ // @__NO_SIDE_EFFECTS__
31
33
  function getTemp() {
32
34
  return (0, import_rewire.getEnvValue)("TEMP");
33
35
  }
36
+ // @__NO_SIDE_EFFECTS__
34
37
  function getTmp() {
35
38
  return (0, import_rewire.getEnvValue)("TMP");
36
39
  }
@@ -1 +1,2 @@
1
+ /*@__NO_SIDE_EFFECTS__*/
1
2
  export declare function getTerm(): string | undefined;
package/dist/env/term.js CHANGED
@@ -23,6 +23,7 @@ __export(term_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(term_exports);
25
25
  var import_rewire = require("#env/rewire");
26
+ // @__NO_SIDE_EFFECTS__
26
27
  function getTerm() {
27
28
  return (0, import_rewire.getEnvValue)("TERM");
28
29
  }
@@ -2,14 +2,17 @@
2
2
  * JEST_WORKER_ID environment variable.
3
3
  * Set when running tests with Jest.
4
4
  */
5
+ /*@__NO_SIDE_EFFECTS__*/
5
6
  export declare function getJestWorkerId(): string;
6
7
  /**
7
8
  * VITEST environment variable.
8
9
  * Set when running tests with Vitest.
9
10
  */
11
+ /*@__NO_SIDE_EFFECTS__*/
10
12
  export declare function getVitest(): boolean;
11
13
  /**
12
14
  * Check if code is running in a test environment.
13
15
  * Checks NODE_ENV, VITEST, and JEST_WORKER_ID.
14
16
  */
17
+ /*@__NO_SIDE_EFFECTS__*/
15
18
  export declare function isTest(): boolean;
package/dist/env/test.js CHANGED
@@ -27,15 +27,18 @@ module.exports = __toCommonJS(test_exports);
27
27
  var import_helpers = require("#env/helpers");
28
28
  var import_node_env = require("#env/node-env");
29
29
  var import_rewire = require("#env/rewire");
30
+ // @__NO_SIDE_EFFECTS__
30
31
  function getJestWorkerId() {
31
32
  return (0, import_helpers.envAsString)((0, import_rewire.getEnvValue)("JEST_WORKER_ID"));
32
33
  }
34
+ // @__NO_SIDE_EFFECTS__
33
35
  function getVitest() {
34
36
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("VITEST"));
35
37
  }
38
+ // @__NO_SIDE_EFFECTS__
36
39
  function isTest() {
37
40
  const nodeEnv = (0, import_helpers.envAsString)((0, import_node_env.getNodeEnv)());
38
- return nodeEnv === "test" || getVitest() || !!getJestWorkerId();
41
+ return nodeEnv === "test" || /* @__PURE__ */ getVitest() || !!/* @__PURE__ */ getJestWorkerId();
39
42
  }
40
43
  // Annotate the CommonJS export names for ESM import in node:
41
44
  0 && (module.exports = {
@@ -2,19 +2,23 @@
2
2
  * APPDATA environment variable.
3
3
  * Points to the Application Data directory on Windows.
4
4
  */
5
+ /*@__NO_SIDE_EFFECTS__*/
5
6
  export declare function getAppdata(): string | undefined;
6
7
  /**
7
8
  * LOCALAPPDATA environment variable.
8
9
  * Points to the Local Application Data directory on Windows.
9
10
  */
11
+ /*@__NO_SIDE_EFFECTS__*/
10
12
  export declare function getLocalappdata(): string | undefined;
11
13
  /**
12
14
  * USERPROFILE environment variable.
13
15
  * Windows user home directory path.
14
16
  */
17
+ /*@__NO_SIDE_EFFECTS__*/
15
18
  export declare function getUserprofile(): string | undefined;
16
19
  /**
17
20
  * COMSPEC environment variable.
18
21
  * Points to the Windows command processor (typically cmd.exe).
19
22
  */
23
+ /*@__NO_SIDE_EFFECTS__*/
20
24
  export declare function getComspec(): string | undefined;
@@ -26,15 +26,19 @@ __export(windows_exports, {
26
26
  });
27
27
  module.exports = __toCommonJS(windows_exports);
28
28
  var import_rewire = require("#env/rewire");
29
+ // @__NO_SIDE_EFFECTS__
29
30
  function getAppdata() {
30
31
  return (0, import_rewire.getEnvValue)("APPDATA");
31
32
  }
33
+ // @__NO_SIDE_EFFECTS__
32
34
  function getLocalappdata() {
33
35
  return (0, import_rewire.getEnvValue)("LOCALAPPDATA");
34
36
  }
37
+ // @__NO_SIDE_EFFECTS__
35
38
  function getUserprofile() {
36
39
  return (0, import_rewire.getEnvValue)("USERPROFILE");
37
40
  }
41
+ // @__NO_SIDE_EFFECTS__
38
42
  function getComspec() {
39
43
  return (0, import_rewire.getEnvValue)("COMSPEC");
40
44
  }
package/dist/env/xdg.d.ts CHANGED
@@ -2,14 +2,17 @@
2
2
  * XDG_CACHE_HOME environment variable.
3
3
  * XDG Base Directory specification cache directory.
4
4
  */
5
+ /*@__NO_SIDE_EFFECTS__*/
5
6
  export declare function getXdgCacheHome(): string | undefined;
6
7
  /**
7
8
  * XDG_CONFIG_HOME environment variable.
8
9
  * XDG Base Directory specification config directory.
9
10
  */
11
+ /*@__NO_SIDE_EFFECTS__*/
10
12
  export declare function getXdgConfigHome(): string | undefined;
11
13
  /**
12
14
  * XDG_DATA_HOME environment variable.
13
15
  * Points to the user's data directory on Unix systems.
14
16
  */
17
+ /*@__NO_SIDE_EFFECTS__*/
15
18
  export declare function getXdgDataHome(): string | undefined;
package/dist/env/xdg.js CHANGED
@@ -25,12 +25,15 @@ __export(xdg_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(xdg_exports);
27
27
  var import_rewire = require("#env/rewire");
28
+ // @__NO_SIDE_EFFECTS__
28
29
  function getXdgCacheHome() {
29
30
  return (0, import_rewire.getEnvValue)("XDG_CACHE_HOME");
30
31
  }
32
+ // @__NO_SIDE_EFFECTS__
31
33
  function getXdgConfigHome() {
32
34
  return (0, import_rewire.getEnvValue)("XDG_CONFIG_HOME");
33
35
  }
36
+ // @__NO_SIDE_EFFECTS__
34
37
  function getXdgDataHome() {
35
38
  return (0, import_rewire.getEnvValue)("XDG_DATA_HOME");
36
39
  }