@socketsecurity/lib 1.3.4 → 2.0.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 +103 -0
- package/dist/agent.js +1 -1
- package/dist/agent.js.map +2 -2
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +3 -3
- package/dist/cacache.d.ts +4 -0
- package/dist/cacache.js +1 -1
- package/dist/cacache.js.map +3 -3
- package/dist/constants/packages.js +1 -1
- package/dist/constants/packages.js.map +3 -3
- package/dist/debug.d.ts +0 -7
- package/dist/debug.js +2 -2
- package/dist/debug.js.map +3 -3
- package/dist/dlx-binary.js +1 -1
- package/dist/dlx-binary.js.map +3 -3
- package/dist/effects/text-shimmer.js +1 -1
- package/dist/effects/text-shimmer.js.map +2 -2
- package/dist/env/ci.d.ts +1 -1
- package/dist/env/ci.js +1 -1
- package/dist/env/ci.js.map +3 -3
- package/dist/env/debug.d.ts +1 -1
- package/dist/env/debug.js +1 -1
- package/dist/env/debug.js.map +3 -3
- package/dist/env/github.d.ts +40 -0
- package/dist/env/github.js +3 -0
- package/dist/env/github.js.map +7 -0
- package/dist/env/home.d.ts +1 -1
- package/dist/env/home.js +1 -1
- package/dist/env/home.js.map +3 -3
- package/dist/env/locale.d.ts +15 -0
- package/dist/env/locale.js +3 -0
- package/dist/env/locale.js.map +7 -0
- package/dist/env/node-auth-token.d.ts +1 -1
- package/dist/env/node-auth-token.js +1 -1
- package/dist/env/node-auth-token.js.map +3 -3
- package/dist/env/node-env.d.ts +1 -1
- package/dist/env/node-env.js +1 -1
- package/dist/env/node-env.js.map +3 -3
- package/dist/env/npm.d.ts +25 -0
- package/dist/env/npm.js +3 -0
- package/dist/env/npm.js.map +7 -0
- package/dist/env/path.d.ts +1 -1
- package/dist/env/path.js +1 -1
- package/dist/env/path.js.map +3 -3
- package/dist/env/pre-commit.d.ts +1 -1
- package/dist/env/pre-commit.js +1 -1
- package/dist/env/pre-commit.js.map +3 -3
- package/dist/env/rewire.d.ts +106 -0
- package/dist/env/rewire.js +3 -0
- package/dist/env/rewire.js.map +7 -0
- package/dist/env/shell.d.ts +1 -1
- package/dist/env/shell.js +1 -1
- package/dist/env/shell.js.map +3 -3
- package/dist/env/socket-cli-shadow.d.ts +30 -0
- package/dist/env/socket-cli-shadow.js +3 -0
- package/dist/env/socket-cli-shadow.js.map +7 -0
- package/dist/env/socket-cli.d.ts +72 -0
- package/dist/env/socket-cli.js +3 -0
- package/dist/env/socket-cli.js.map +7 -0
- package/dist/env/socket.d.ts +75 -0
- package/dist/env/socket.js +3 -0
- package/dist/env/socket.js.map +7 -0
- package/dist/env/temp-dir.d.ts +15 -0
- package/dist/env/temp-dir.js +3 -0
- package/dist/env/temp-dir.js.map +7 -0
- package/dist/env/term.d.ts +1 -1
- package/dist/env/term.js +1 -1
- package/dist/env/term.js.map +3 -3
- package/dist/env/test.d.ts +15 -0
- package/dist/env/test.js +3 -0
- package/dist/env/test.js.map +7 -0
- package/dist/env/windows.d.ts +20 -0
- package/dist/env/windows.js +3 -0
- package/dist/env/windows.js.map +7 -0
- package/dist/env/xdg.d.ts +15 -0
- package/dist/env/xdg.js +3 -0
- package/dist/env/xdg.js.map +7 -0
- package/dist/env.d.ts +67 -0
- package/dist/env.js +1 -1
- package/dist/env.js.map +3 -3
- package/dist/fs.d.ts +7 -0
- package/dist/fs.js +3 -3
- package/dist/fs.js.map +3 -3
- package/dist/github.js +1 -1
- package/dist/github.js.map +3 -3
- package/dist/globs.js +1 -1
- package/dist/globs.js.map +2 -2
- package/dist/ipc.d.ts +1 -1
- package/dist/ipc.js +1 -1
- package/dist/ipc.js.map +3 -3
- package/dist/logger.d.ts +2 -1
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +3 -3
- package/dist/packages/isolation.js +1 -1
- package/dist/packages/isolation.js.map +3 -3
- package/dist/packages/normalize.js +1 -1
- package/dist/packages/normalize.js.map +3 -3
- package/dist/packages/operations.js +1 -1
- package/dist/packages/operations.js.map +3 -3
- package/dist/path.d.ts +2 -2
- package/dist/path.js +1 -1
- package/dist/path.js.map +3 -3
- package/dist/paths/rewire.d.ts +71 -0
- package/dist/paths/rewire.js +3 -0
- package/dist/paths/rewire.js.map +7 -0
- package/dist/paths.d.ts +26 -0
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +3 -3
- package/dist/spawn.js +1 -1
- package/dist/spawn.js.map +3 -3
- package/dist/spinner.js +1 -1
- package/dist/spinner.js.map +2 -2
- package/package.json +39 -226
- package/dist/env/appdata.d.ts +0 -1
- package/dist/env/appdata.js +0 -3
- package/dist/env/appdata.js.map +0 -7
- package/dist/env/comspec.d.ts +0 -1
- package/dist/env/comspec.js +0 -3
- package/dist/env/comspec.js.map +0 -7
- package/dist/env/getters.d.ts +0 -40
- package/dist/env/getters.js +0 -3
- package/dist/env/getters.js.map +0 -7
- package/dist/env/github-api-url.d.ts +0 -1
- package/dist/env/github-api-url.js +0 -3
- package/dist/env/github-api-url.js.map +0 -7
- package/dist/env/github-base-ref.d.ts +0 -1
- package/dist/env/github-base-ref.js +0 -3
- package/dist/env/github-base-ref.js.map +0 -7
- package/dist/env/github-ref-name.d.ts +0 -1
- package/dist/env/github-ref-name.js +0 -3
- package/dist/env/github-ref-name.js.map +0 -7
- package/dist/env/github-ref-type.d.ts +0 -1
- package/dist/env/github-ref-type.js +0 -3
- package/dist/env/github-ref-type.js.map +0 -7
- package/dist/env/github-repository.d.ts +0 -1
- package/dist/env/github-repository.js +0 -3
- package/dist/env/github-repository.js.map +0 -7
- package/dist/env/github-server-url.d.ts +0 -1
- package/dist/env/github-server-url.js +0 -3
- package/dist/env/github-server-url.js.map +0 -7
- package/dist/env/github-token.d.ts +0 -1
- package/dist/env/github-token.js +0 -3
- package/dist/env/github-token.js.map +0 -7
- package/dist/env/jest-worker-id.d.ts +0 -1
- package/dist/env/jest-worker-id.js +0 -3
- package/dist/env/jest-worker-id.js.map +0 -7
- package/dist/env/lang.d.ts +0 -1
- package/dist/env/lang.js +0 -3
- package/dist/env/lang.js.map +0 -7
- package/dist/env/lc-all.d.ts +0 -1
- package/dist/env/lc-all.js +0 -3
- package/dist/env/lc-all.js.map +0 -7
- package/dist/env/lc-messages.d.ts +0 -1
- package/dist/env/lc-messages.js +0 -3
- package/dist/env/lc-messages.js.map +0 -7
- package/dist/env/localappdata.d.ts +0 -1
- package/dist/env/localappdata.js +0 -3
- package/dist/env/localappdata.js.map +0 -7
- package/dist/env/npm-config-registry.d.ts +0 -1
- package/dist/env/npm-config-registry.js +0 -3
- package/dist/env/npm-config-registry.js.map +0 -7
- package/dist/env/npm-config-user-agent.d.ts +0 -1
- package/dist/env/npm-config-user-agent.js +0 -3
- package/dist/env/npm-config-user-agent.js.map +0 -7
- package/dist/env/npm-lifecycle-event.d.ts +0 -1
- package/dist/env/npm-lifecycle-event.js +0 -3
- package/dist/env/npm-lifecycle-event.js.map +0 -7
- package/dist/env/npm-registry.d.ts +0 -1
- package/dist/env/npm-registry.js +0 -3
- package/dist/env/npm-registry.js.map +0 -7
- package/dist/env/npm-token.d.ts +0 -1
- package/dist/env/npm-token.js +0 -3
- package/dist/env/npm-token.js.map +0 -7
- package/dist/env/socket-accept-risks.d.ts +0 -1
- package/dist/env/socket-accept-risks.js +0 -3
- package/dist/env/socket-accept-risks.js.map +0 -7
- package/dist/env/socket-api-base-url.d.ts +0 -1
- package/dist/env/socket-api-base-url.js +0 -3
- package/dist/env/socket-api-base-url.js.map +0 -7
- package/dist/env/socket-api-proxy.d.ts +0 -1
- package/dist/env/socket-api-proxy.js +0 -3
- package/dist/env/socket-api-proxy.js.map +0 -7
- package/dist/env/socket-api-timeout.d.ts +0 -1
- package/dist/env/socket-api-timeout.js +0 -3
- package/dist/env/socket-api-timeout.js.map +0 -7
- package/dist/env/socket-api-token.d.ts +0 -1
- package/dist/env/socket-api-token.js +0 -3
- package/dist/env/socket-api-token.js.map +0 -7
- package/dist/env/socket-cacache-dir.d.ts +0 -1
- package/dist/env/socket-cacache-dir.js +0 -3
- package/dist/env/socket-cacache-dir.js.map +0 -7
- package/dist/env/socket-cli-accept-risks.d.ts +0 -1
- package/dist/env/socket-cli-accept-risks.js +0 -3
- package/dist/env/socket-cli-accept-risks.js.map +0 -7
- package/dist/env/socket-cli-api-base-url.d.ts +0 -1
- package/dist/env/socket-cli-api-base-url.js +0 -3
- package/dist/env/socket-cli-api-base-url.js.map +0 -7
- package/dist/env/socket-cli-api-proxy.d.ts +0 -1
- package/dist/env/socket-cli-api-proxy.js +0 -3
- package/dist/env/socket-cli-api-proxy.js.map +0 -7
- package/dist/env/socket-cli-api-timeout.d.ts +0 -1
- package/dist/env/socket-cli-api-timeout.js +0 -3
- package/dist/env/socket-cli-api-timeout.js.map +0 -7
- package/dist/env/socket-cli-api-token.d.ts +0 -1
- package/dist/env/socket-cli-api-token.js +0 -3
- package/dist/env/socket-cli-api-token.js.map +0 -7
- package/dist/env/socket-cli-config.d.ts +0 -1
- package/dist/env/socket-cli-config.js +0 -3
- package/dist/env/socket-cli-config.js.map +0 -7
- package/dist/env/socket-cli-fix.d.ts +0 -1
- package/dist/env/socket-cli-fix.js +0 -3
- package/dist/env/socket-cli-fix.js.map +0 -7
- package/dist/env/socket-cli-no-api-token.d.ts +0 -1
- package/dist/env/socket-cli-no-api-token.js +0 -3
- package/dist/env/socket-cli-no-api-token.js.map +0 -7
- package/dist/env/socket-cli-optimize.d.ts +0 -1
- package/dist/env/socket-cli-optimize.js +0 -3
- package/dist/env/socket-cli-optimize.js.map +0 -7
- package/dist/env/socket-cli-org-slug.d.ts +0 -1
- package/dist/env/socket-cli-org-slug.js +0 -3
- package/dist/env/socket-cli-org-slug.js.map +0 -7
- package/dist/env/socket-cli-shadow-accept-risks.d.ts +0 -1
- package/dist/env/socket-cli-shadow-accept-risks.js +0 -3
- package/dist/env/socket-cli-shadow-accept-risks.js.map +0 -7
- package/dist/env/socket-cli-shadow-api-token.d.ts +0 -1
- package/dist/env/socket-cli-shadow-api-token.js +0 -3
- package/dist/env/socket-cli-shadow-api-token.js.map +0 -7
- package/dist/env/socket-cli-shadow-bin.d.ts +0 -1
- package/dist/env/socket-cli-shadow-bin.js +0 -3
- package/dist/env/socket-cli-shadow-bin.js.map +0 -7
- package/dist/env/socket-cli-shadow-progress.d.ts +0 -1
- package/dist/env/socket-cli-shadow-progress.js +0 -3
- package/dist/env/socket-cli-shadow-progress.js.map +0 -7
- package/dist/env/socket-cli-shadow-silent.d.ts +0 -1
- package/dist/env/socket-cli-shadow-silent.js +0 -3
- package/dist/env/socket-cli-shadow-silent.js.map +0 -7
- package/dist/env/socket-cli-view-all-risks.d.ts +0 -1
- package/dist/env/socket-cli-view-all-risks.js +0 -3
- package/dist/env/socket-cli-view-all-risks.js.map +0 -7
- package/dist/env/socket-config.d.ts +0 -1
- package/dist/env/socket-config.js +0 -3
- package/dist/env/socket-config.js.map +0 -7
- package/dist/env/socket-debug.d.ts +0 -1
- package/dist/env/socket-debug.js +0 -3
- package/dist/env/socket-debug.js.map +0 -7
- package/dist/env/socket-home.d.ts +0 -1
- package/dist/env/socket-home.js +0 -3
- package/dist/env/socket-home.js.map +0 -7
- package/dist/env/socket-no-api-token.d.ts +0 -1
- package/dist/env/socket-no-api-token.js +0 -3
- package/dist/env/socket-no-api-token.js.map +0 -7
- package/dist/env/socket-npm-registry.d.ts +0 -1
- package/dist/env/socket-npm-registry.js +0 -3
- package/dist/env/socket-npm-registry.js.map +0 -7
- package/dist/env/socket-org-slug.d.ts +0 -1
- package/dist/env/socket-org-slug.js +0 -3
- package/dist/env/socket-org-slug.js.map +0 -7
- package/dist/env/socket-registry-url.d.ts +0 -1
- package/dist/env/socket-registry-url.js +0 -3
- package/dist/env/socket-registry-url.js.map +0 -7
- package/dist/env/socket-view-all-risks.d.ts +0 -1
- package/dist/env/socket-view-all-risks.js +0 -3
- package/dist/env/socket-view-all-risks.js.map +0 -7
- package/dist/env/temp.d.ts +0 -1
- package/dist/env/temp.js +0 -3
- package/dist/env/temp.js.map +0 -7
- package/dist/env/tmp.d.ts +0 -1
- package/dist/env/tmp.js +0 -3
- package/dist/env/tmp.js.map +0 -7
- package/dist/env/tmpdir.d.ts +0 -1
- package/dist/env/tmpdir.js +0 -3
- package/dist/env/tmpdir.js.map +0 -7
- package/dist/env/userprofile.d.ts +0 -1
- package/dist/env/userprofile.js +0 -3
- package/dist/env/userprofile.js.map +0 -7
- package/dist/env/vitest.d.ts +0 -1
- package/dist/env/vitest.js +0 -3
- package/dist/env/vitest.js.map +0 -7
- package/dist/env/xdg-cache-home.d.ts +0 -1
- package/dist/env/xdg-cache-home.js +0 -3
- package/dist/env/xdg-cache-home.js.map +0 -7
- package/dist/env/xdg-config-home.d.ts +0 -1
- package/dist/env/xdg-config-home.js +0 -3
- package/dist/env/xdg-config-home.js.map +0 -7
- package/dist/env/xdg-data-home.d.ts +0 -1
- package/dist/env/xdg-data-home.js +0 -3
- package/dist/env/xdg-data-home.js.map +0 -7
package/dist/env/home.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
2
|
+
var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var r in e)o(n,r,{get:e[r],enumerable:!0})},p=(n,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of g(e))!m.call(n,t)&&t!==r&&o(n,t,{get:()=>e[t],enumerable:!(i=f(e,t))||i.enumerable});return n};var E=n=>p(o({},"__esModule",{value:!0}),n);var a={};d(a,{getHome:()=>H});module.exports=E(a);var u=require("#env/rewire");function H(){return(0,u.getEnvValue)("HOME")}0&&(module.exports={getHome});
|
|
3
3
|
//# sourceMappingURL=home.js.map
|
package/dist/env/home.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/home.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * HOME environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["home_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * HOME environment variable getter.\n * Points to the user's home directory.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\nexport function getHome(): string | undefined {\n return getEnvValue('HOME')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA4B,uBAErB,SAASF,GAA8B,CAC5C,SAAO,eAAY,MAAM,CAC3B",
|
|
6
|
+
"names": ["home_exports", "__export", "getHome", "__toCommonJS", "import_rewire"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LANG environment variable.
|
|
3
|
+
* System locale and language settings.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getLang(): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* LC_ALL environment variable.
|
|
8
|
+
* Override for all locale settings.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getLcAll(): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* LC_MESSAGES environment variable.
|
|
13
|
+
* Locale setting for message translations.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getLcMessages(): string | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var u=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var d=(e,n)=>{for(var r in n)u(e,r,{get:n[r],enumerable:!0})},s=(e,n,r,g)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of L(n))!f.call(e,t)&&t!==r&&u(e,t,{get:()=>n[t],enumerable:!(g=o(n,t))||g.enumerable});return e};var c=e=>s(u({},"__esModule",{value:!0}),e);var l={};d(l,{getLang:()=>p,getLcAll:()=>A,getLcMessages:()=>a});module.exports=c(l);var i=require("#env/rewire");function p(){return(0,i.getEnvValue)("LANG")}function A(){return(0,i.getEnvValue)("LC_ALL")}function a(){return(0,i.getEnvValue)("LC_MESSAGES")}0&&(module.exports={getLang,getLcAll,getLcMessages});
|
|
3
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/env/locale.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview Locale and language environment variable getters.\n * Provides access to system locale settings.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\n/**\n * LANG environment variable.\n * System locale and language settings.\n */\nexport function getLang(): string | undefined {\n return getEnvValue('LANG')\n}\n\n/**\n * LC_ALL environment variable.\n * Override for all locale settings.\n */\nexport function getLcAll(): string | undefined {\n return getEnvValue('LC_ALL')\n}\n\n/**\n * LC_MESSAGES environment variable.\n * Locale setting for message translations.\n */\nexport function getLcMessages(): string | undefined {\n return getEnvValue('LC_MESSAGES')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAL,GAKA,IAAAM,EAA4B,uBAMrB,SAASJ,GAA8B,CAC5C,SAAO,eAAY,MAAM,CAC3B,CAMO,SAASC,GAA+B,CAC7C,SAAO,eAAY,QAAQ,CAC7B,CAMO,SAASC,GAAoC,CAClD,SAAO,eAAY,aAAa,CAClC",
|
|
6
|
+
"names": ["locale_exports", "__export", "getLang", "getLcAll", "getLcMessages", "__toCommonJS", "import_rewire"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getNodeAuthToken(): string | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
2
|
+
var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var E=(n,e)=>{for(var o in e)r(n,o,{get:e[o],enumerable:!0})},N=(n,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of f(e))!g.call(n,t)&&t!==o&&r(n,t,{get:()=>e[t],enumerable:!(u=d(e,t))||u.enumerable});return n};var T=n=>N(r({},"__esModule",{value:!0}),n);var p={};E(p,{getNodeAuthToken:()=>m});module.exports=T(p);var i=require("#env/rewire");function m(){return(0,i.getEnvValue)("NODE_AUTH_TOKEN")}0&&(module.exports={getNodeAuthToken});
|
|
3
3
|
//# sourceMappingURL=node-auth-token.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/node-auth-token.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * NODE_AUTH_TOKEN environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["node_auth_token_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * NODE_AUTH_TOKEN environment variable getter.\n * Authentication token for Node.js package registry access.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\nexport function getNodeAuthToken(): string | undefined {\n return getEnvValue('NODE_AUTH_TOKEN')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA4B,uBAErB,SAASF,GAAuC,CACrD,SAAO,eAAY,iBAAiB,CACtC",
|
|
6
|
+
"names": ["node_auth_token_exports", "__export", "getNodeAuthToken", "__toCommonJS", "import_rewire"]
|
|
7
7
|
}
|
package/dist/env/node-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getNodeEnv(): string | undefined;
|
package/dist/env/node-env.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
2
|
+
var o=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var g=(n,e)=>{for(var r in e)o(n,r,{get:e[r],enumerable:!0})},N=(n,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of d(e))!f.call(n,t)&&t!==r&&o(n,t,{get:()=>e[t],enumerable:!(i=E(e,t))||i.enumerable});return n};var m=n=>N(o({},"__esModule",{value:!0}),n);var v={};g(v,{getNodeEnv:()=>p});module.exports=m(v);var u=require("#env/rewire");function p(){return(0,u.getEnvValue)("NODE_ENV")}0&&(module.exports={getNodeEnv});
|
|
3
3
|
//# sourceMappingURL=node-env.js.map
|
package/dist/env/node-env.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/node-env.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * NODE_ENV environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["node_env_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * NODE_ENV environment variable getter.\n * Indicates the Node.js environment mode (production, development, test).\n */\n\nimport { getEnvValue } from '#env/rewire'\n\nexport function getNodeEnv(): string | undefined {\n return getEnvValue('NODE_ENV')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA4B,uBAErB,SAASF,GAAiC,CAC/C,SAAO,eAAY,UAAU,CAC/B",
|
|
6
|
+
"names": ["node_env_exports", "__export", "getNodeEnv", "__toCommonJS", "import_rewire"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm_config_registry environment variable.
|
|
3
|
+
* NPM registry URL configured by package managers.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getNpmConfigRegistry(): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* npm_config_user_agent environment variable.
|
|
8
|
+
* User agent string set by npm/pnpm/yarn package managers.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getNpmConfigUserAgent(): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* npm_lifecycle_event environment variable.
|
|
13
|
+
* The name of the npm lifecycle event that's currently running.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getNpmLifecycleEvent(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* NPM_REGISTRY environment variable.
|
|
18
|
+
* NPM registry URL override.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getNpmRegistry(): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* NPM_TOKEN environment variable.
|
|
23
|
+
* Authentication token for NPM registry access.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getNpmToken(): string | undefined;
|
package/dist/env/npm.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var g=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(e,n)=>{for(var i in n)g(e,i,{get:n[i],enumerable:!0})},d=(e,n,i,f)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of u(n))!p.call(e,r)&&r!==i&&g(e,r,{get:()=>n[r],enumerable:!(f=o(n,r))||f.enumerable});return e};var m=e=>d(g({},"__esModule",{value:!0}),e);var l={};c(l,{getNpmConfigRegistry:()=>s,getNpmConfigUserAgent:()=>_,getNpmLifecycleEvent:()=>N,getNpmRegistry:()=>x,getNpmToken:()=>y});module.exports=m(l);var t=require("#env/rewire");function s(){return(0,t.getEnvValue)("npm_config_registry")}function _(){return(0,t.getEnvValue)("npm_config_user_agent")}function N(){return(0,t.getEnvValue)("npm_lifecycle_event")}function x(){return(0,t.getEnvValue)("NPM_REGISTRY")}function y(){return(0,t.getEnvValue)("NPM_TOKEN")}0&&(module.exports={getNpmConfigRegistry,getNpmConfigUserAgent,getNpmLifecycleEvent,getNpmRegistry,getNpmToken});
|
|
3
|
+
//# sourceMappingURL=npm.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/env/npm.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview NPM environment variable getters.\n * Provides access to NPM and package manager environment variables.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\n/**\n * npm_config_registry environment variable.\n * NPM registry URL configured by package managers.\n */\nexport function getNpmConfigRegistry(): string | undefined {\n return getEnvValue('npm_config_registry')\n}\n\n/**\n * npm_config_user_agent environment variable.\n * User agent string set by npm/pnpm/yarn package managers.\n */\nexport function getNpmConfigUserAgent(): string | undefined {\n return getEnvValue('npm_config_user_agent')\n}\n\n/**\n * npm_lifecycle_event environment variable.\n * The name of the npm lifecycle event that's currently running.\n */\nexport function getNpmLifecycleEvent(): string | undefined {\n return getEnvValue('npm_lifecycle_event')\n}\n\n/**\n * NPM_REGISTRY environment variable.\n * NPM registry URL override.\n */\nexport function getNpmRegistry(): string | undefined {\n return getEnvValue('NPM_REGISTRY')\n}\n\n/**\n * NPM_TOKEN environment variable.\n * Authentication token for NPM registry access.\n */\nexport function getNpmToken(): string | undefined {\n return getEnvValue('NPM_TOKEN')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,0BAAAC,EAAA,yBAAAC,EAAA,mBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAP,GAKA,IAAAQ,EAA4B,uBAMrB,SAASN,GAA2C,CACzD,SAAO,eAAY,qBAAqB,CAC1C,CAMO,SAASC,GAA4C,CAC1D,SAAO,eAAY,uBAAuB,CAC5C,CAMO,SAASC,GAA2C,CACzD,SAAO,eAAY,qBAAqB,CAC1C,CAMO,SAASC,GAAqC,CACnD,SAAO,eAAY,cAAc,CACnC,CAMO,SAASC,GAAkC,CAChD,SAAO,eAAY,WAAW,CAChC",
|
|
6
|
+
"names": ["npm_exports", "__export", "getNpmConfigRegistry", "getNpmConfigUserAgent", "getNpmLifecycleEvent", "getNpmRegistry", "getNpmToken", "__toCommonJS", "import_rewire"]
|
|
7
|
+
}
|
package/dist/env/path.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getPath(): string | undefined;
|
package/dist/env/path.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
2
|
+
var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},m=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of g(t))!a.call(e,n)&&n!==r&&i(e,n,{get:()=>t[n],enumerable:!(o=f(t,n))||o.enumerable});return e};var p=e=>m(i({},"__esModule",{value:!0}),e);var c={};d(c,{getPath:()=>P});module.exports=p(c);var u=require("#env/rewire");function P(){return(0,u.getEnvValue)("PATH")}0&&(module.exports={getPath});
|
|
3
3
|
//# sourceMappingURL=path.js.map
|
package/dist/env/path.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/path.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * PATH environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["path_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * PATH environment variable getter.\n * System executable search paths.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\nexport function getPath(): string | undefined {\n return getEnvValue('PATH')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA4B,uBAErB,SAASF,GAA8B,CAC5C,SAAO,eAAY,MAAM,CAC3B",
|
|
6
|
+
"names": ["path_exports", "__export", "getPath", "__toCommonJS", "import_rewire"]
|
|
7
7
|
}
|
package/dist/env/pre-commit.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getPreCommit(): boolean;
|
package/dist/env/pre-commit.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var
|
|
2
|
+
var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},g=(e,o,t,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of l(o))!p.call(e,r)&&r!==t&&n(e,r,{get:()=>o[r],enumerable:!(m=f(o,r))||m.enumerable});return e};var v=e=>g(n({},"__esModule",{value:!0}),e);var E={};u(E,{getPreCommit:()=>C});module.exports=v(E);var i=require("#env/helpers"),a=require("#env/rewire");function C(){return(0,i.envAsBoolean)((0,a.getEnvValue)("PRE_COMMIT"))}0&&(module.exports={getPreCommit});
|
|
3
3
|
//# sourceMappingURL=pre-commit.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/pre-commit.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * PRE_COMMIT environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["pre_commit_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * PRE_COMMIT environment variable getter.\n * Whether running in a pre-commit hook context.\n */\n\nimport { envAsBoolean } from '#env/helpers'\nimport { getEnvValue } from '#env/rewire'\n\nexport function getPreCommit(): boolean {\n return envAsBoolean(getEnvValue('PRE_COMMIT'))\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA6B,wBAC7BC,EAA4B,uBAErB,SAASH,GAAwB,CACtC,SAAO,mBAAa,eAAY,YAAY,CAAC,CAC/C",
|
|
6
|
+
"names": ["pre_commit_exports", "__export", "getPreCommit", "__toCommonJS", "import_helpers", "import_rewire"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get an environment variable value, checking overrides first.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. AsyncLocalStorage context (set via withEnv)
|
|
6
|
+
* 2. Test overrides (set via setEnv in beforeEach)
|
|
7
|
+
* 3. process.env (including vi.stubEnv modifications)
|
|
8
|
+
*
|
|
9
|
+
* @internal Used by env getters to support test rewiring
|
|
10
|
+
*/
|
|
11
|
+
export declare function getEnvValue(key: string): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Set an environment variable override for testing.
|
|
14
|
+
* This does not modify process.env, only affects env getters.
|
|
15
|
+
*
|
|
16
|
+
* Works in test hooks (beforeEach) without needing AsyncLocalStorage context.
|
|
17
|
+
* Vitest's module isolation ensures each test file has independent overrides.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { setEnv, resetEnv } from '#env/rewire'
|
|
22
|
+
* import { getCI } from '#env/ci'
|
|
23
|
+
*
|
|
24
|
+
* beforeEach(() => {
|
|
25
|
+
* setEnv('CI', '1')
|
|
26
|
+
* })
|
|
27
|
+
*
|
|
28
|
+
* afterEach(() => {
|
|
29
|
+
* resetEnv()
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* it('should detect CI environment', () => {
|
|
33
|
+
* expect(getCI()).toBe(true)
|
|
34
|
+
* })
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function setEnv(key: string, value: string | undefined): void;
|
|
38
|
+
/**
|
|
39
|
+
* Clear a specific environment variable override.
|
|
40
|
+
*/
|
|
41
|
+
export declare function clearEnv(key: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Clear all environment variable overrides.
|
|
44
|
+
* Useful in afterEach hooks to ensure clean test state.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { resetEnv } from '#env/rewire'
|
|
49
|
+
*
|
|
50
|
+
* afterEach(() => {
|
|
51
|
+
* resetEnv()
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function resetEnv(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Check if an environment variable has been overridden.
|
|
58
|
+
*/
|
|
59
|
+
export declare function hasOverride(key: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Run code with environment overrides in an isolated AsyncLocalStorage context.
|
|
62
|
+
* Creates true context isolation - overrides don't leak to concurrent code.
|
|
63
|
+
*
|
|
64
|
+
* Useful for tests that need temporary overrides without affecting other tests
|
|
65
|
+
* or for nested override scenarios.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { withEnv } from '#env/rewire'
|
|
70
|
+
* import { getCI } from '#env/ci'
|
|
71
|
+
*
|
|
72
|
+
* // Temporary override in isolated context
|
|
73
|
+
* await withEnv({ CI: '1' }, async () => {
|
|
74
|
+
* expect(getCI()).toBe(true)
|
|
75
|
+
* })
|
|
76
|
+
* expect(getCI()).toBe(false) // Override is gone
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* // Nested overrides work correctly
|
|
82
|
+
* setEnv('CI', '1') // Test-level override
|
|
83
|
+
*
|
|
84
|
+
* await withEnv({ CI: '0' }, async () => {
|
|
85
|
+
* expect(getCI()).toBe(false) // Context override takes precedence
|
|
86
|
+
* })
|
|
87
|
+
*
|
|
88
|
+
* expect(getCI()).toBe(true) // Back to test-level override
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function withEnv<T>(overrides: Record<string, string | undefined>, fn: () => T | Promise<T>): Promise<T>;
|
|
92
|
+
/**
|
|
93
|
+
* Synchronous version of withEnv for non-async code.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* import { withEnvSync } from '#env/rewire'
|
|
98
|
+
* import { getCI } from '#env/ci'
|
|
99
|
+
*
|
|
100
|
+
* const result = withEnvSync({ CI: '1' }, () => {
|
|
101
|
+
* return getCI()
|
|
102
|
+
* })
|
|
103
|
+
* expect(result).toBe(true)
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function withEnvSync<T>(overrides: Record<string, string | undefined>, fn: () => T): T;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var v=(n,e)=>{for(var t in e)o(n,t,{get:e[t],enumerable:!0})},f=(n,e,t,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!g.call(n,i)&&i!==t&&o(n,i,{get:()=>e[i],enumerable:!(c=u(e,i))||c.enumerable});return n};var p=n=>f(o({},"__esModule",{value:!0}),n);var m={};v(m,{clearEnv:()=>E,getEnvValue:()=>x,hasOverride:()=>w,resetEnv:()=>h,setEnv:()=>O,withEnv:()=>T,withEnvSync:()=>l});module.exports=p(m);var d=require("node:async_hooks");const s=new d.AsyncLocalStorage,r=new Map;function x(n){const e=s.getStore();return e?.has(n)?e.get(n):r.has(n)?r.get(n):process.env[n]}function O(n,e){r.set(n,e)}function E(n){r.delete(n)}function h(){r.clear()}function w(n){return s.getStore()?.has(n)||r.has(n)}async function T(n,e){const t=new Map(Object.entries(n));return await s.run(t,e)}function l(n,e){const t=new Map(Object.entries(n));return s.run(t,e)}0&&(module.exports={clearEnv,getEnvValue,hasOverride,resetEnv,setEnv,withEnv,withEnvSync});
|
|
3
|
+
//# sourceMappingURL=rewire.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/env/rewire.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview Environment variable rewiring utilities for testing.\n * Uses AsyncLocalStorage for context-isolated overrides that work with concurrent tests.\n *\n * Features:\n * - Context-isolated overrides via withEnv() for advanced use cases\n * - Test-friendly setEnv/clearEnv/resetEnv that work in beforeEach/afterEach\n * - Compatible with vi.stubEnv() - reads from process.env as final fallback\n * - Thread-safe for concurrent test execution\n */\n\nimport { AsyncLocalStorage } from 'node:async_hooks'\n\ntype EnvOverrides = Map<string, string | undefined>\n\nconst envStorage = new AsyncLocalStorage<EnvOverrides>()\n\n// Per-test overrides (used by setEnv/clearEnv/resetEnv in test hooks)\n// Each test file gets its own instance due to Vitest's module isolation\nconst testOverrides = new Map<string, string | undefined>()\n\n/**\n * Get an environment variable value, checking overrides first.\n *\n * Resolution order:\n * 1. AsyncLocalStorage context (set via withEnv)\n * 2. Test overrides (set via setEnv in beforeEach)\n * 3. process.env (including vi.stubEnv modifications)\n *\n * @internal Used by env getters to support test rewiring\n */\nexport function getEnvValue(key: string): string | undefined {\n // Check AsyncLocalStorage context first (highest priority)\n const contextOverrides = envStorage.getStore()\n if (contextOverrides?.has(key)) {\n return contextOverrides.get(key)\n }\n\n // Check test overrides (set via setEnv in beforeEach)\n if (testOverrides.has(key)) {\n return testOverrides.get(key)\n }\n\n // Fall back to process.env (works with vi.stubEnv)\n return process.env[key]\n}\n\n/**\n * Set an environment variable override for testing.\n * This does not modify process.env, only affects env getters.\n *\n * Works in test hooks (beforeEach) without needing AsyncLocalStorage context.\n * Vitest's module isolation ensures each test file has independent overrides.\n *\n * @example\n * ```typescript\n * import { setEnv, resetEnv } from '#env/rewire'\n * import { getCI } from '#env/ci'\n *\n * beforeEach(() => {\n * setEnv('CI', '1')\n * })\n *\n * afterEach(() => {\n * resetEnv()\n * })\n *\n * it('should detect CI environment', () => {\n * expect(getCI()).toBe(true)\n * })\n * ```\n */\nexport function setEnv(key: string, value: string | undefined): void {\n testOverrides.set(key, value)\n}\n\n/**\n * Clear a specific environment variable override.\n */\nexport function clearEnv(key: string): void {\n testOverrides.delete(key)\n}\n\n/**\n * Clear all environment variable overrides.\n * Useful in afterEach hooks to ensure clean test state.\n *\n * @example\n * ```typescript\n * import { resetEnv } from '#env/rewire'\n *\n * afterEach(() => {\n * resetEnv()\n * })\n * ```\n */\nexport function resetEnv(): void {\n testOverrides.clear()\n}\n\n/**\n * Check if an environment variable has been overridden.\n */\nexport function hasOverride(key: string): boolean {\n const contextOverrides = envStorage.getStore()\n return contextOverrides?.has(key) || testOverrides.has(key)\n}\n\n/**\n * Run code with environment overrides in an isolated AsyncLocalStorage context.\n * Creates true context isolation - overrides don't leak to concurrent code.\n *\n * Useful for tests that need temporary overrides without affecting other tests\n * or for nested override scenarios.\n *\n * @example\n * ```typescript\n * import { withEnv } from '#env/rewire'\n * import { getCI } from '#env/ci'\n *\n * // Temporary override in isolated context\n * await withEnv({ CI: '1' }, async () => {\n * expect(getCI()).toBe(true)\n * })\n * expect(getCI()).toBe(false) // Override is gone\n * ```\n *\n * @example\n * ```typescript\n * // Nested overrides work correctly\n * setEnv('CI', '1') // Test-level override\n *\n * await withEnv({ CI: '0' }, async () => {\n * expect(getCI()).toBe(false) // Context override takes precedence\n * })\n *\n * expect(getCI()).toBe(true) // Back to test-level override\n * ```\n */\nexport async function withEnv<T>(\n overrides: Record<string, string | undefined>,\n fn: () => T | Promise<T>,\n): Promise<T> {\n const map = new Map(Object.entries(overrides))\n return await envStorage.run(map, fn)\n}\n\n/**\n * Synchronous version of withEnv for non-async code.\n *\n * @example\n * ```typescript\n * import { withEnvSync } from '#env/rewire'\n * import { getCI } from '#env/ci'\n *\n * const result = withEnvSync({ CI: '1' }, () => {\n * return getCI()\n * })\n * expect(result).toBe(true)\n * ```\n */\nexport function withEnvSync<T>(\n overrides: Record<string, string | undefined>,\n fn: () => T,\n): T {\n const map = new Map(Object.entries(overrides))\n return envStorage.run(map, fn)\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,gBAAAC,EAAA,gBAAAC,EAAA,aAAAC,EAAA,WAAAC,EAAA,YAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAT,GAWA,IAAAU,EAAkC,4BAIlC,MAAMC,EAAa,IAAI,oBAIjBC,EAAgB,IAAI,IAYnB,SAAST,EAAYU,EAAiC,CAE3D,MAAMC,EAAmBH,EAAW,SAAS,EAC7C,OAAIG,GAAkB,IAAID,CAAG,EACpBC,EAAiB,IAAID,CAAG,EAI7BD,EAAc,IAAIC,CAAG,EAChBD,EAAc,IAAIC,CAAG,EAIvB,QAAQ,IAAIA,CAAG,CACxB,CA2BO,SAASP,EAAOO,EAAaE,EAAiC,CACnEH,EAAc,IAAIC,EAAKE,CAAK,CAC9B,CAKO,SAASb,EAASW,EAAmB,CAC1CD,EAAc,OAAOC,CAAG,CAC1B,CAeO,SAASR,GAAiB,CAC/BO,EAAc,MAAM,CACtB,CAKO,SAASR,EAAYS,EAAsB,CAEhD,OADyBF,EAAW,SAAS,GACpB,IAAIE,CAAG,GAAKD,EAAc,IAAIC,CAAG,CAC5D,CAiCA,eAAsBN,EACpBS,EACAC,EACY,CACZ,MAAMC,EAAM,IAAI,IAAI,OAAO,QAAQF,CAAS,CAAC,EAC7C,OAAO,MAAML,EAAW,IAAIO,EAAKD,CAAE,CACrC,CAgBO,SAAST,EACdQ,EACAC,EACG,CACH,MAAMC,EAAM,IAAI,IAAI,OAAO,QAAQF,CAAS,CAAC,EAC7C,OAAOL,EAAW,IAAIO,EAAKD,CAAE,CAC/B",
|
|
6
|
+
"names": ["rewire_exports", "__export", "clearEnv", "getEnvValue", "hasOverride", "resetEnv", "setEnv", "withEnv", "withEnvSync", "__toCommonJS", "import_node_async_hooks", "envStorage", "testOverrides", "key", "contextOverrides", "value", "overrides", "fn", "map"]
|
|
7
|
+
}
|
package/dist/env/shell.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getShell(): string | undefined;
|
package/dist/env/shell.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
2
|
+
var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var r in e)i(n,r,{get:e[r],enumerable:!0})},m=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of g(e))!l.call(n,t)&&t!==r&&i(n,t,{get:()=>e[t],enumerable:!(o=f(e,t))||o.enumerable});return n};var p=n=>m(i({},"__esModule",{value:!0}),n);var L={};d(L,{getShell:()=>E});module.exports=p(L);var u=require("#env/rewire");function E(){return(0,u.getEnvValue)("SHELL")}0&&(module.exports={getShell});
|
|
3
3
|
//# sourceMappingURL=shell.js.map
|
package/dist/env/shell.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/env/shell.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * SHELL environment variable
|
|
5
|
-
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["shell_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["/**\n * SHELL environment variable getter.\n * Unix/macOS default shell path.\n */\n\nimport { getEnvValue } from '#env/rewire'\n\nexport function getShell(): string | undefined {\n return getEnvValue('SHELL')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA4B,uBAErB,SAASF,GAA+B,CAC7C,SAAO,eAAY,OAAO,CAC5B",
|
|
6
|
+
"names": ["shell_exports", "__export", "getShell", "__toCommonJS", "import_rewire"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls Socket CLI shadow mode risk acceptance.
|
|
3
|
+
*
|
|
4
|
+
* @returns Whether to accept all risks in shadow mode
|
|
5
|
+
*/
|
|
6
|
+
export declare function getSocketCliShadowAcceptRisks(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* API token for Socket CLI shadow mode.
|
|
9
|
+
*
|
|
10
|
+
* @returns Shadow mode API token or undefined
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSocketCliShadowApiToken(): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Binary path for Socket CLI shadow mode.
|
|
15
|
+
*
|
|
16
|
+
* @returns Shadow mode binary path or undefined
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSocketCliShadowBin(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Controls Socket CLI shadow mode progress display.
|
|
21
|
+
*
|
|
22
|
+
* @returns Whether to show progress in shadow mode
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSocketCliShadowProgress(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Controls Socket CLI shadow mode silent operation.
|
|
27
|
+
*
|
|
28
|
+
* @returns Whether shadow mode should operate silently
|
|
29
|
+
*/
|
|
30
|
+
export declare function getSocketCliShadowSilent(): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var i=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var O=(o,e)=>{for(var S in e)i(o,S,{get:e[S],enumerable:!0})},l=(o,e,S,C)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of u(e))!c.call(o,n)&&n!==S&&i(o,n,{get:()=>e[n],enumerable:!(C=_(e,n))||C.enumerable});return o};var a=o=>l(i({},"__esModule",{value:!0}),o);var p={};O(p,{getSocketCliShadowAcceptRisks:()=>A,getSocketCliShadowApiToken:()=>E,getSocketCliShadowBin:()=>d,getSocketCliShadowProgress:()=>f,getSocketCliShadowSilent:()=>g});module.exports=a(p);var r=require("#env/helpers"),t=require("#env/rewire");function A(){return(0,r.envAsBoolean)((0,t.getEnvValue)("SOCKET_CLI_SHADOW_ACCEPT_RISKS"))}function E(){return(0,t.getEnvValue)("SOCKET_CLI_SHADOW_API_TOKEN")}function d(){return(0,t.getEnvValue)("SOCKET_CLI_SHADOW_BIN")}function f(){return(0,r.envAsBoolean)((0,t.getEnvValue)("SOCKET_CLI_SHADOW_PROGRESS"))}function g(){return(0,r.envAsBoolean)((0,t.getEnvValue)("SOCKET_CLI_SHADOW_SILENT"))}0&&(module.exports={getSocketCliShadowAcceptRisks,getSocketCliShadowApiToken,getSocketCliShadowBin,getSocketCliShadowProgress,getSocketCliShadowSilent});
|
|
3
|
+
//# sourceMappingURL=socket-cli-shadow.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/env/socket-cli-shadow.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview Socket CLI shadow mode environment variables.\n * Provides typed getters for SOCKET_CLI_SHADOW_* environment variables.\n */\n\nimport { envAsBoolean } from '#env/helpers'\nimport { getEnvValue } from '#env/rewire'\n\n/**\n * Controls Socket CLI shadow mode risk acceptance.\n *\n * @returns Whether to accept all risks in shadow mode\n */\nexport function getSocketCliShadowAcceptRisks(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_SHADOW_ACCEPT_RISKS'))\n}\n\n/**\n * API token for Socket CLI shadow mode.\n *\n * @returns Shadow mode API token or undefined\n */\nexport function getSocketCliShadowApiToken(): string | undefined {\n return getEnvValue('SOCKET_CLI_SHADOW_API_TOKEN')\n}\n\n/**\n * Binary path for Socket CLI shadow mode.\n *\n * @returns Shadow mode binary path or undefined\n */\nexport function getSocketCliShadowBin(): string | undefined {\n return getEnvValue('SOCKET_CLI_SHADOW_BIN')\n}\n\n/**\n * Controls Socket CLI shadow mode progress display.\n *\n * @returns Whether to show progress in shadow mode\n */\nexport function getSocketCliShadowProgress(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_SHADOW_PROGRESS'))\n}\n\n/**\n * Controls Socket CLI shadow mode silent operation.\n *\n * @returns Whether shadow mode should operate silently\n */\nexport function getSocketCliShadowSilent(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_SHADOW_SILENT'))\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mCAAAE,EAAA,+BAAAC,EAAA,0BAAAC,EAAA,+BAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAP,GAKA,IAAAQ,EAA6B,wBAC7BC,EAA4B,uBAOrB,SAASP,GAAyC,CACvD,SAAO,mBAAa,eAAY,gCAAgC,CAAC,CACnE,CAOO,SAASC,GAAiD,CAC/D,SAAO,eAAY,6BAA6B,CAClD,CAOO,SAASC,GAA4C,CAC1D,SAAO,eAAY,uBAAuB,CAC5C,CAOO,SAASC,GAAsC,CACpD,SAAO,mBAAa,eAAY,4BAA4B,CAAC,CAC/D,CAOO,SAASC,GAAoC,CAClD,SAAO,mBAAa,eAAY,0BAA0B,CAAC,CAC7D",
|
|
6
|
+
"names": ["socket_cli_shadow_exports", "__export", "getSocketCliShadowAcceptRisks", "getSocketCliShadowApiToken", "getSocketCliShadowBin", "getSocketCliShadowProgress", "getSocketCliShadowSilent", "__toCommonJS", "import_helpers", "import_rewire"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether to accept all Socket CLI risks (alternative name).
|
|
3
|
+
*
|
|
4
|
+
* @returns Whether to accept all risks
|
|
5
|
+
*/
|
|
6
|
+
export declare function getSocketCliAcceptRisks(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Socket CLI API base URL (alternative name).
|
|
9
|
+
*
|
|
10
|
+
* @returns API base URL or undefined
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSocketCliApiBaseUrl(): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Proxy URL for Socket CLI API requests (alternative name).
|
|
15
|
+
*
|
|
16
|
+
* @returns API proxy URL or undefined
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSocketCliApiProxy(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Timeout in milliseconds for Socket CLI API requests (alternative name).
|
|
21
|
+
*
|
|
22
|
+
* @returns API timeout in milliseconds
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSocketCliApiTimeout(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Socket CLI API authentication token (alternative name).
|
|
27
|
+
*
|
|
28
|
+
* @returns API token or undefined
|
|
29
|
+
*/
|
|
30
|
+
export declare function getSocketCliApiToken(): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Socket CLI configuration file path (alternative name).
|
|
33
|
+
*
|
|
34
|
+
* @returns Config file path or undefined
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSocketCliConfig(): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Controls Socket CLI fix mode.
|
|
39
|
+
*
|
|
40
|
+
* @returns Fix mode value or undefined
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSocketCliFix(): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to skip Socket CLI API token requirement (alternative name).
|
|
45
|
+
*
|
|
46
|
+
* @returns Whether to skip API token requirement
|
|
47
|
+
*/
|
|
48
|
+
export declare function getSocketCliNoApiToken(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Controls Socket CLI optimization mode.
|
|
51
|
+
*
|
|
52
|
+
* @returns Whether optimization mode is enabled
|
|
53
|
+
*/
|
|
54
|
+
export declare function getSocketCliOptimize(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Socket CLI organization slug identifier (alternative name).
|
|
57
|
+
*
|
|
58
|
+
* @returns Organization slug or undefined
|
|
59
|
+
*/
|
|
60
|
+
export declare function getSocketCliOrgSlug(): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to view all Socket CLI risks (alternative name).
|
|
63
|
+
*
|
|
64
|
+
* @returns Whether to view all risks
|
|
65
|
+
*/
|
|
66
|
+
export declare function getSocketCliViewAllRisks(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Socket CLI GitHub authentication token.
|
|
69
|
+
*
|
|
70
|
+
* @returns GitHub token or undefined
|
|
71
|
+
*/
|
|
72
|
+
export declare function getSocketCliGithubToken(): string | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var C=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var I=(n,t)=>{for(var r in t)C(n,r,{get:t[r],enumerable:!0})},T=(n,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of S(t))!c.call(n,i)&&i!==r&&C(n,i,{get:()=>t[i],enumerable:!(u=_(t,i))||u.enumerable});return n};var g=n=>T(C({},"__esModule",{value:!0}),n);var P={};I(P,{getSocketCliAcceptRisks:()=>O,getSocketCliApiBaseUrl:()=>f,getSocketCliApiProxy:()=>l,getSocketCliApiTimeout:()=>p,getSocketCliApiToken:()=>E,getSocketCliConfig:()=>k,getSocketCliFix:()=>A,getSocketCliGithubToken:()=>x,getSocketCliNoApiToken:()=>K,getSocketCliOptimize:()=>L,getSocketCliOrgSlug:()=>d,getSocketCliViewAllRisks:()=>s});module.exports=g(P);var o=require("#env/helpers"),e=require("#env/rewire");function O(){return(0,o.envAsBoolean)((0,e.getEnvValue)("SOCKET_CLI_ACCEPT_RISKS"))}function f(){return(0,e.getEnvValue)("SOCKET_CLI_API_BASE_URL")}function l(){return(0,e.getEnvValue)("SOCKET_CLI_API_PROXY")}function p(){return(0,o.envAsNumber)((0,e.getEnvValue)("SOCKET_CLI_API_TIMEOUT"))}function E(){return(0,e.getEnvValue)("SOCKET_CLI_API_TOKEN")}function k(){return(0,e.getEnvValue)("SOCKET_CLI_CONFIG")}function A(){return(0,e.getEnvValue)("SOCKET_CLI_FIX")}function K(){return(0,o.envAsBoolean)((0,e.getEnvValue)("SOCKET_CLI_NO_API_TOKEN"))}function L(){return(0,o.envAsBoolean)((0,e.getEnvValue)("SOCKET_CLI_OPTIMIZE"))}function d(){return(0,e.getEnvValue)("SOCKET_CLI_ORG_SLUG")}function s(){return(0,o.envAsBoolean)((0,e.getEnvValue)("SOCKET_CLI_VIEW_ALL_RISKS"))}function x(){return(0,e.getEnvValue)("SOCKET_CLI_GITHUB_TOKEN")}0&&(module.exports={getSocketCliAcceptRisks,getSocketCliApiBaseUrl,getSocketCliApiProxy,getSocketCliApiTimeout,getSocketCliApiToken,getSocketCliConfig,getSocketCliFix,getSocketCliGithubToken,getSocketCliNoApiToken,getSocketCliOptimize,getSocketCliOrgSlug,getSocketCliViewAllRisks});
|
|
3
|
+
//# sourceMappingURL=socket-cli.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/env/socket-cli.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview Socket CLI environment variables.\n * Provides typed getters for SOCKET_CLI_* environment variables (excluding shadow).\n */\n\nimport { envAsBoolean, envAsNumber } from '#env/helpers'\nimport { getEnvValue } from '#env/rewire'\n\n/**\n * Whether to accept all Socket CLI risks (alternative name).\n *\n * @returns Whether to accept all risks\n */\nexport function getSocketCliAcceptRisks(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_ACCEPT_RISKS'))\n}\n\n/**\n * Socket CLI API base URL (alternative name).\n *\n * @returns API base URL or undefined\n */\nexport function getSocketCliApiBaseUrl(): string | undefined {\n return getEnvValue('SOCKET_CLI_API_BASE_URL')\n}\n\n/**\n * Proxy URL for Socket CLI API requests (alternative name).\n *\n * @returns API proxy URL or undefined\n */\nexport function getSocketCliApiProxy(): string | undefined {\n return getEnvValue('SOCKET_CLI_API_PROXY')\n}\n\n/**\n * Timeout in milliseconds for Socket CLI API requests (alternative name).\n *\n * @returns API timeout in milliseconds\n */\nexport function getSocketCliApiTimeout(): number {\n return envAsNumber(getEnvValue('SOCKET_CLI_API_TIMEOUT'))\n}\n\n/**\n * Socket CLI API authentication token (alternative name).\n *\n * @returns API token or undefined\n */\nexport function getSocketCliApiToken(): string | undefined {\n return getEnvValue('SOCKET_CLI_API_TOKEN')\n}\n\n/**\n * Socket CLI configuration file path (alternative name).\n *\n * @returns Config file path or undefined\n */\nexport function getSocketCliConfig(): string | undefined {\n return getEnvValue('SOCKET_CLI_CONFIG')\n}\n\n/**\n * Controls Socket CLI fix mode.\n *\n * @returns Fix mode value or undefined\n */\nexport function getSocketCliFix(): string | undefined {\n return getEnvValue('SOCKET_CLI_FIX')\n}\n\n/**\n * Whether to skip Socket CLI API token requirement (alternative name).\n *\n * @returns Whether to skip API token requirement\n */\nexport function getSocketCliNoApiToken(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_NO_API_TOKEN'))\n}\n\n/**\n * Controls Socket CLI optimization mode.\n *\n * @returns Whether optimization mode is enabled\n */\nexport function getSocketCliOptimize(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_OPTIMIZE'))\n}\n\n/**\n * Socket CLI organization slug identifier (alternative name).\n *\n * @returns Organization slug or undefined\n */\nexport function getSocketCliOrgSlug(): string | undefined {\n return getEnvValue('SOCKET_CLI_ORG_SLUG')\n}\n\n/**\n * Whether to view all Socket CLI risks (alternative name).\n *\n * @returns Whether to view all risks\n */\nexport function getSocketCliViewAllRisks(): boolean {\n return envAsBoolean(getEnvValue('SOCKET_CLI_VIEW_ALL_RISKS'))\n}\n\n/**\n * Socket CLI GitHub authentication token.\n *\n * @returns GitHub token or undefined\n */\nexport function getSocketCliGithubToken(): string | undefined {\n return getEnvValue('SOCKET_CLI_GITHUB_TOKEN')\n}\n"],
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,2BAAAC,EAAA,yBAAAC,EAAA,2BAAAC,EAAA,yBAAAC,EAAA,uBAAAC,EAAA,oBAAAC,EAAA,4BAAAC,EAAA,2BAAAC,EAAA,yBAAAC,EAAA,wBAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAd,GAKA,IAAAe,EAA0C,wBAC1CC,EAA4B,uBAOrB,SAASd,GAAmC,CACjD,SAAO,mBAAa,eAAY,yBAAyB,CAAC,CAC5D,CAOO,SAASC,GAA6C,CAC3D,SAAO,eAAY,yBAAyB,CAC9C,CAOO,SAASC,GAA2C,CACzD,SAAO,eAAY,sBAAsB,CAC3C,CAOO,SAASC,GAAiC,CAC/C,SAAO,kBAAY,eAAY,wBAAwB,CAAC,CAC1D,CAOO,SAASC,GAA2C,CACzD,SAAO,eAAY,sBAAsB,CAC3C,CAOO,SAASC,GAAyC,CACvD,SAAO,eAAY,mBAAmB,CACxC,CAOO,SAASC,GAAsC,CACpD,SAAO,eAAY,gBAAgB,CACrC,CAOO,SAASE,GAAkC,CAChD,SAAO,mBAAa,eAAY,yBAAyB,CAAC,CAC5D,CAOO,SAASC,GAAgC,CAC9C,SAAO,mBAAa,eAAY,qBAAqB,CAAC,CACxD,CAOO,SAASC,GAA0C,CACxD,SAAO,eAAY,qBAAqB,CAC1C,CAOO,SAASC,GAAoC,CAClD,SAAO,mBAAa,eAAY,2BAA2B,CAAC,CAC9D,CAOO,SAASJ,GAA8C,CAC5D,SAAO,eAAY,yBAAyB,CAC9C",
|
|
6
|
+
"names": ["socket_cli_exports", "__export", "getSocketCliAcceptRisks", "getSocketCliApiBaseUrl", "getSocketCliApiProxy", "getSocketCliApiTimeout", "getSocketCliApiToken", "getSocketCliConfig", "getSocketCliFix", "getSocketCliGithubToken", "getSocketCliNoApiToken", "getSocketCliOptimize", "getSocketCliOrgSlug", "getSocketCliViewAllRisks", "__toCommonJS", "import_helpers", "import_rewire"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOCKET_ACCEPT_RISKS environment variable getter.
|
|
3
|
+
* Whether to accept all Socket Security risks.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSocketAcceptRisks(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* SOCKET_API_BASE_URL environment variable getter.
|
|
8
|
+
* Socket Security API base URL.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSocketApiBaseUrl(): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* SOCKET_API_PROXY environment variable getter.
|
|
13
|
+
* Proxy URL for Socket Security API requests.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSocketApiProxy(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* SOCKET_API_TIMEOUT environment variable getter.
|
|
18
|
+
* Timeout in milliseconds for Socket Security API requests.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getSocketApiTimeout(): number;
|
|
21
|
+
/**
|
|
22
|
+
* SOCKET_API_TOKEN environment variable getter.
|
|
23
|
+
* Socket Security API authentication token.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getSocketApiToken(): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* SOCKET_CACACHE_DIR environment variable getter.
|
|
28
|
+
* Overrides the default Socket cacache directory location.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getSocketCacacheDir(): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* SOCKET_CONFIG environment variable getter.
|
|
33
|
+
* Socket Security configuration file path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getSocketConfig(): string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* SOCKET_DEBUG environment variable getter.
|
|
38
|
+
* Controls Socket-specific debug output.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getSocketDebug(): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* SOCKET_DLX_DIR environment variable getter.
|
|
43
|
+
* Overrides the default Socket DLX directory location.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getSocketDlxDirEnv(): string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* SOCKET_HOME environment variable getter.
|
|
48
|
+
* Socket Security home directory path.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getSocketHome(): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* SOCKET_NO_API_TOKEN environment variable getter.
|
|
53
|
+
* Whether to skip Socket Security API token requirement.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getSocketNoApiToken(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* SOCKET_NPM_REGISTRY environment variable getter.
|
|
58
|
+
* Socket NPM registry URL (alternative name).
|
|
59
|
+
*/
|
|
60
|
+
export declare function getSocketNpmRegistry(): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* SOCKET_ORG_SLUG environment variable getter.
|
|
63
|
+
* Socket Security organization slug identifier.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getSocketOrgSlug(): string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* SOCKET_REGISTRY_URL environment variable getter.
|
|
68
|
+
* Socket Registry URL for package installation.
|
|
69
|
+
*/
|
|
70
|
+
export declare function getSocketRegistryUrl(): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* SOCKET_VIEW_ALL_RISKS environment variable getter.
|
|
73
|
+
* Whether to view all Socket Security risks.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getSocketViewAllRisks(): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var f=(n,t)=>{for(var i in t)u(n,i,{get:t[i],enumerable:!0})},E=(n,t,i,S)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of g(t))!_.call(n,o)&&o!==i&&u(n,o,{get:()=>t[o],enumerable:!(S=c(t,o))||S.enumerable});return n};var T=n=>E(u({},"__esModule",{value:!0}),n);var D={};f(D,{getSocketAcceptRisks:()=>p,getSocketApiBaseUrl:()=>O,getSocketApiProxy:()=>C,getSocketApiTimeout:()=>d,getSocketApiToken:()=>s,getSocketCacacheDir:()=>k,getSocketConfig:()=>A,getSocketDebug:()=>K,getSocketDlxDirEnv:()=>x,getSocketHome:()=>R,getSocketNoApiToken:()=>I,getSocketNpmRegistry:()=>l,getSocketOrgSlug:()=>m,getSocketRegistryUrl:()=>P,getSocketViewAllRisks:()=>a});module.exports=T(D);var r=require("#env/helpers"),e=require("#env/rewire");function p(){return(0,r.envAsBoolean)((0,e.getEnvValue)("SOCKET_ACCEPT_RISKS"))}function O(){return(0,e.getEnvValue)("SOCKET_API_BASE_URL")}function C(){return(0,e.getEnvValue)("SOCKET_API_PROXY")}function d(){return(0,r.envAsNumber)((0,e.getEnvValue)("SOCKET_API_TIMEOUT"))}function s(){return(0,e.getEnvValue)("SOCKET_API_TOKEN")}function k(){return(0,e.getEnvValue)("SOCKET_CACACHE_DIR")}function A(){return(0,e.getEnvValue)("SOCKET_CONFIG")}function K(){return(0,e.getEnvValue)("SOCKET_DEBUG")}function x(){return(0,e.getEnvValue)("SOCKET_DLX_DIR")}function R(){return(0,e.getEnvValue)("SOCKET_HOME")}function I(){return(0,r.envAsBoolean)((0,e.getEnvValue)("SOCKET_NO_API_TOKEN"))}function l(){return(0,e.getEnvValue)("SOCKET_NPM_REGISTRY")}function m(){return(0,e.getEnvValue)("SOCKET_ORG_SLUG")}function P(){return(0,e.getEnvValue)("SOCKET_REGISTRY_URL")}function a(){return(0,r.envAsBoolean)((0,e.getEnvValue)("SOCKET_VIEW_ALL_RISKS"))}0&&(module.exports={getSocketAcceptRisks,getSocketApiBaseUrl,getSocketApiProxy,getSocketApiTimeout,getSocketApiToken,getSocketCacacheDir,getSocketConfig,getSocketDebug,getSocketDlxDirEnv,getSocketHome,getSocketNoApiToken,getSocketNpmRegistry,getSocketOrgSlug,getSocketRegistryUrl,getSocketViewAllRisks});
|
|
3
|
+
//# sourceMappingURL=socket.js.map
|