@@ -76,6 +76,28 @@ export function getSocketCliApiToken(): string | undefined {
7676 )
7777}
7878
79+ /**
80+ * Bootstrap cache directory path.
81+ * Set by bootstrap wrappers to pass dlx cache location to CLI.
82+ *
83+ * @returns Bootstrap cache directory or undefined
84+ */
85+ /*@__NO_SIDE_EFFECTS__ */
86+ export function getSocketCliBootstrapCacheDir ( ) : string | undefined {
87+ return getEnvValue ( 'SOCKET_CLI_BOOTSTRAP_CACHE_DIR' )
88+ }
89+
90+ /**
91+ * Bootstrap package spec (e.g., @socketsecurity/cli@^2.0.11).
92+ * Set by bootstrap wrappers (SEA/smol/npm) to pass package spec to CLI.
93+ *
94+ * @returns Bootstrap package spec or undefined
95+ */
96+ /*@__NO_SIDE_EFFECTS__ */
97+ export function getSocketCliBootstrapSpec ( ) : string | undefined {
98+ return getEnvValue ( 'SOCKET_CLI_BOOTSTRAP_SPEC' )
99+ }
100+
79101/**
80102 * Socket CLI configuration file path (alternative name).
81103 *
@@ -96,6 +118,21 @@ export function getSocketCliFix(): string | undefined {
96118 return getEnvValue ( 'SOCKET_CLI_FIX' )
97119}
98120
121+ /**
122+ * Socket CLI GitHub authentication token.
123+ * Checks SOCKET_CLI_GITHUB_TOKEN, SOCKET_SECURITY_GITHUB_PAT, then falls back to GITHUB_TOKEN.
124+ *
125+ * @returns GitHub token or undefined
126+ */
127+ /*@__NO_SIDE_EFFECTS__ */
128+ export function getSocketCliGithubToken ( ) : string | undefined {
129+ return (
130+ getEnvValue ( 'SOCKET_CLI_GITHUB_TOKEN' ) ||
131+ getEnvValue ( 'SOCKET_SECURITY_GITHUB_PAT' ) ||
132+ getEnvValue ( 'GITHUB_TOKEN' )
133+ )
134+ }
135+
99136/**
100137 * Whether to skip Socket CLI API token requirement (alternative name).
101138 *
@@ -136,40 +173,3 @@ export function getSocketCliOrgSlug(): string | undefined {
136173export function getSocketCliViewAllRisks ( ) : boolean {
137174 return envAsBoolean ( getEnvValue ( 'SOCKET_CLI_VIEW_ALL_RISKS' ) )
138175}
139-
140- /**
141- * Socket CLI GitHub authentication token.
142- * Checks SOCKET_CLI_GITHUB_TOKEN, SOCKET_SECURITY_GITHUB_PAT, then falls back to GITHUB_TOKEN.
143- *
144- * @returns GitHub token or undefined
145- */
146- /*@__NO_SIDE_EFFECTS__ */
147- export function getSocketCliGithubToken ( ) : string | undefined {
148- return (
149- getEnvValue ( 'SOCKET_CLI_GITHUB_TOKEN' ) ||
150- getEnvValue ( 'SOCKET_SECURITY_GITHUB_PAT' ) ||
151- getEnvValue ( 'GITHUB_TOKEN' )
152- )
153- }
154-
155- /**
156- * Bootstrap package spec (e.g., @socketsecurity/cli@^2.0.11).
157- * Set by bootstrap wrappers (SEA/smol/npm) to pass package spec to CLI.
158- *
159- * @returns Bootstrap package spec or undefined
160- */
161- /*@__NO_SIDE_EFFECTS__ */
162- export function getSocketCliBootstrapSpec ( ) : string | undefined {
163- return getEnvValue ( 'SOCKET_CLI_BOOTSTRAP_SPEC' )
164- }
165-
166- /**
167- * Bootstrap cache directory path.
168- * Set by bootstrap wrappers to pass dlx cache location to CLI.
169- *
170- * @returns Bootstrap cache directory or undefined
171- */
172- /*@__NO_SIDE_EFFECTS__ */
173- export function getSocketCliBootstrapCacheDir ( ) : string | undefined {
174- return getEnvValue ( 'SOCKET_CLI_BOOTSTRAP_CACHE_DIR' )
175- }
0 commit comments