std-env 3.6.0 → 3.7.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/README.md +8 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +36 -5
- package/dist/index.d.mts +36 -5
- package/dist/index.d.ts +36 -5
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -82,13 +82,18 @@ console.log(runtimeInfo);
|
|
|
82
82
|
|
|
83
83
|
You can also use individual named exports for each runtime detection:
|
|
84
84
|
|
|
85
|
+
> [!NOTE]
|
|
86
|
+
> When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.
|
|
87
|
+
>
|
|
88
|
+
> Use `runtime === "node"` if you need strict check for Node.js runtime.
|
|
89
|
+
|
|
90
|
+
- `isNode`
|
|
91
|
+
- `isBun`
|
|
92
|
+
- `isDeno`
|
|
85
93
|
- `isNetlify`
|
|
86
94
|
- `isEdgeLight`
|
|
87
95
|
- `isWorkerd`
|
|
88
|
-
- `isDeno`
|
|
89
96
|
- `isLagon`
|
|
90
|
-
- `isNode`
|
|
91
|
-
- `isBun`
|
|
92
97
|
- `isFastly`
|
|
93
98
|
|
|
94
99
|
List of well known providers can be found from [./src/runtimes.ts](./src/runtimes.ts).
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var a=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var C=(i,e,n)=>e in i?b(i,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[e]=n,R=(i,e)=>{for(var n in e||(e={}))P.call(e,n)&&C(i,n,e[n]);if(a)for(var n of a(e))x.call(e,n)&&C(i,n,e[n]);return i};var
|
|
1
|
+
"use strict";var b=Object.defineProperty;var a=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var C=(i,e,n)=>e in i?b(i,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[e]=n,R=(i,e)=>{for(var n in e||(e={}))P.call(e,n)&&C(i,n,e[n]);if(a)for(var n of a(e))x.call(e,n)&&C(i,n,e[n]);return i};var _,L,A,c,D,O,u,S,N,d;const r$2=Object.create(null),s=i=>{var e,n;return((e=globalThis.process)==null?void 0:e.env)||void 0||((n=globalThis.Deno)==null?void 0:n.env.toObject())||globalThis.__env__||(i?r$2:globalThis)},env=new Proxy(r$2,{get(i,e){var n;return(n=s()[e])!=null?n:r$2[e]},has(i,e){const n=s();return e in n||e in r$2},set(i,e,n){const E=s(!0);return E[e]=n,!0},deleteProperty(i,e){if(!e)return!1;const n=s(!0);return delete n[e],!0},ownKeys(){const i=s(!0);return Object.keys(i)}}),nodeENV=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",r$1=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"]];function I(){var i,e,n,E,T,p;if((i=globalThis.process)!=null&&i.env)for(const l of r$1){const g=l[1]||l[0];if((e=globalThis.process)!=null&&e.env[g])return R({name:l[0].toLowerCase()},l[2])}return((E=(n=globalThis.process)==null?void 0:n.env)==null?void 0:E.SHELL)==="/bin/jsh"&&((p=(T=globalThis.process)==null?void 0:T.versions)!=null&&p.webcontainer)?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const providerInfo=I(),provider=providerInfo.name;function toBoolean(i){return i?i!=="false":!1}const platform=((_=globalThis.process)==null?void 0:_.platform)||"",isCI=toBoolean(env.CI)||providerInfo.ci!==!1,hasTTY=toBoolean(((L=globalThis.process)==null?void 0:L.stdout)&&((A=globalThis.process)==null?void 0:A.stdout.isTTY)),hasWindow=typeof window<"u",isDebug=toBoolean(env.DEBUG),isTest=nodeENV==="test"||toBoolean(env.TEST),isProduction=nodeENV==="production",isDevelopment=nodeENV==="dev"||nodeENV==="development",isMinimal=toBoolean(env.MINIMAL)||isCI||isTest||!hasTTY,isWindows=/^win/i.test(platform),isLinux=/^linux/i.test(platform),isMacOS=/^darwin/i.test(platform),isColorSupported=!toBoolean(env.NO_COLOR)&&(toBoolean(env.FORCE_COLOR)||(hasTTY||isWindows)&&env.TERM!=="dumb"||isCI),nodeVersion=(((D=(c=globalThis.process)==null?void 0:c.versions)==null?void 0:D.node)||"").replace(/^v/,"")||null,nodeMajorVersion=Number(nodeVersion==null?void 0:nodeVersion.split(".")[0])||null,o$1=globalThis.process||Object.create(null),r={versions:{}},process$1=new Proxy(o$1,{get(i,e){if(e==="env")return env;if(e in i)return i[e];if(e in r)return r[e]}}),isNode=((u=(O=globalThis.process)==null?void 0:O.release)==null?void 0:u.name)==="node",isBun=!!globalThis.Bun||!!((N=(S=globalThis.process)==null?void 0:S.versions)!=null&&N.bun),isDeno=!!globalThis.Deno,isFastly=!!globalThis.fastly,isNetlify=!!globalThis.Netlify,isEdgeLight=!!globalThis.EdgeRuntime,isWorkerd=((d=globalThis.navigator)==null?void 0:d.userAgent)==="Cloudflare-Workers",isLagon=!!globalThis.__lagon__,o=[[isNetlify,"netlify"],[isEdgeLight,"edge-light"],[isWorkerd,"workerd"],[isFastly,"fastly"],[isDeno,"deno"],[isBun,"bun"],[isNode,"node"],[isLagon,"lagon"]];function t(){const i=o.find(e=>e[0]);if(i)return{name:i[1]}}const runtimeInfo=t(),runtime=(runtimeInfo==null?void 0:runtimeInfo.name)||"";exports.env=env,exports.hasTTY=hasTTY,exports.hasWindow=hasWindow,exports.isBun=isBun,exports.isCI=isCI,exports.isColorSupported=isColorSupported,exports.isDebug=isDebug,exports.isDeno=isDeno,exports.isDevelopment=isDevelopment,exports.isEdgeLight=isEdgeLight,exports.isFastly=isFastly,exports.isLagon=isLagon,exports.isLinux=isLinux,exports.isMacOS=isMacOS,exports.isMinimal=isMinimal,exports.isNetlify=isNetlify,exports.isNode=isNode,exports.isProduction=isProduction,exports.isTest=isTest,exports.isWindows=isWindows,exports.isWorkerd=isWorkerd,exports.nodeENV=nodeENV,exports.nodeMajorVersion=nodeMajorVersion,exports.nodeVersion=nodeVersion,exports.platform=platform,exports.process=process$1,exports.provider=provider,exports.providerInfo=providerInfo,exports.runtime=runtime,exports.runtimeInfo=runtimeInfo;
|
package/dist/index.d.cts
CHANGED
|
@@ -38,7 +38,7 @@ interface Process extends Partial<Omit<typeof globalThis.process, "versions">> {
|
|
|
38
38
|
}
|
|
39
39
|
declare const process: Process;
|
|
40
40
|
|
|
41
|
-
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere";
|
|
41
|
+
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere" | "railway";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -52,14 +52,45 @@ type RuntimeName = "workerd" | "deno" | "lagon" | "netlify" | "node" | "bun" | "
|
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Indicates if running in Node.js or a Node.js compatible runtime.
|
|
57
|
+
*
|
|
58
|
+
* **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.
|
|
59
|
+
*
|
|
60
|
+
* Use `runtime === "node"` if you need strict check for Node.js runtime.
|
|
61
|
+
*/
|
|
62
|
+
declare const isNode: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates if running in Bun runtime.
|
|
65
|
+
*/
|
|
66
|
+
declare const isBun: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates if running in Deno runtime.
|
|
69
|
+
*/
|
|
70
|
+
declare const isDeno: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Indicates if running in Fastly runtime.
|
|
73
|
+
*/
|
|
74
|
+
declare const isFastly: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Indicates if running in Netlify runtime.
|
|
77
|
+
*/
|
|
55
78
|
declare const isNetlify: boolean;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* Indicates if running in EdgeLight (Vercel Edge) runtime.
|
|
82
|
+
*/
|
|
56
83
|
declare const isEdgeLight: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Indicates if running in Cloudflare Workers runtime.
|
|
86
|
+
*/
|
|
57
87
|
declare const isWorkerd: boolean;
|
|
58
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Indicates if running in Lagon runtime.
|
|
90
|
+
*
|
|
91
|
+
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
+
*/
|
|
59
93
|
declare const isLagon: boolean;
|
|
60
|
-
declare const isNode: boolean;
|
|
61
|
-
declare const isBun: boolean;
|
|
62
|
-
declare const isFastly: boolean;
|
|
63
94
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
64
95
|
declare const runtime: RuntimeName;
|
|
65
96
|
|
package/dist/index.d.mts
CHANGED
|
@@ -38,7 +38,7 @@ interface Process extends Partial<Omit<typeof globalThis.process, "versions">> {
|
|
|
38
38
|
}
|
|
39
39
|
declare const process: Process;
|
|
40
40
|
|
|
41
|
-
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere";
|
|
41
|
+
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere" | "railway";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -52,14 +52,45 @@ type RuntimeName = "workerd" | "deno" | "lagon" | "netlify" | "node" | "bun" | "
|
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Indicates if running in Node.js or a Node.js compatible runtime.
|
|
57
|
+
*
|
|
58
|
+
* **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.
|
|
59
|
+
*
|
|
60
|
+
* Use `runtime === "node"` if you need strict check for Node.js runtime.
|
|
61
|
+
*/
|
|
62
|
+
declare const isNode: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates if running in Bun runtime.
|
|
65
|
+
*/
|
|
66
|
+
declare const isBun: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates if running in Deno runtime.
|
|
69
|
+
*/
|
|
70
|
+
declare const isDeno: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Indicates if running in Fastly runtime.
|
|
73
|
+
*/
|
|
74
|
+
declare const isFastly: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Indicates if running in Netlify runtime.
|
|
77
|
+
*/
|
|
55
78
|
declare const isNetlify: boolean;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* Indicates if running in EdgeLight (Vercel Edge) runtime.
|
|
82
|
+
*/
|
|
56
83
|
declare const isEdgeLight: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Indicates if running in Cloudflare Workers runtime.
|
|
86
|
+
*/
|
|
57
87
|
declare const isWorkerd: boolean;
|
|
58
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Indicates if running in Lagon runtime.
|
|
90
|
+
*
|
|
91
|
+
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
+
*/
|
|
59
93
|
declare const isLagon: boolean;
|
|
60
|
-
declare const isNode: boolean;
|
|
61
|
-
declare const isBun: boolean;
|
|
62
|
-
declare const isFastly: boolean;
|
|
63
94
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
64
95
|
declare const runtime: RuntimeName;
|
|
65
96
|
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ interface Process extends Partial<Omit<typeof globalThis.process, "versions">> {
|
|
|
38
38
|
}
|
|
39
39
|
declare const process: Process;
|
|
40
40
|
|
|
41
|
-
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere";
|
|
41
|
+
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere" | "railway";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -52,14 +52,45 @@ type RuntimeName = "workerd" | "deno" | "lagon" | "netlify" | "node" | "bun" | "
|
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Indicates if running in Node.js or a Node.js compatible runtime.
|
|
57
|
+
*
|
|
58
|
+
* **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.
|
|
59
|
+
*
|
|
60
|
+
* Use `runtime === "node"` if you need strict check for Node.js runtime.
|
|
61
|
+
*/
|
|
62
|
+
declare const isNode: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates if running in Bun runtime.
|
|
65
|
+
*/
|
|
66
|
+
declare const isBun: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates if running in Deno runtime.
|
|
69
|
+
*/
|
|
70
|
+
declare const isDeno: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Indicates if running in Fastly runtime.
|
|
73
|
+
*/
|
|
74
|
+
declare const isFastly: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Indicates if running in Netlify runtime.
|
|
77
|
+
*/
|
|
55
78
|
declare const isNetlify: boolean;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* Indicates if running in EdgeLight (Vercel Edge) runtime.
|
|
82
|
+
*/
|
|
56
83
|
declare const isEdgeLight: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Indicates if running in Cloudflare Workers runtime.
|
|
86
|
+
*/
|
|
57
87
|
declare const isWorkerd: boolean;
|
|
58
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Indicates if running in Lagon runtime.
|
|
90
|
+
*
|
|
91
|
+
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
+
*/
|
|
59
93
|
declare const isLagon: boolean;
|
|
60
|
-
declare const isNode: boolean;
|
|
61
|
-
declare const isBun: boolean;
|
|
62
|
-
declare const isFastly: boolean;
|
|
63
94
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
64
95
|
declare const runtime: RuntimeName;
|
|
65
96
|
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=Object.create(null),E=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return E()[o]??r[o]},has(e,o){const i=E();return o in i||o in r},set(e,o,i){const
|
|
1
|
+
const r=Object.create(null),E=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return E()[o]??r[o]},has(e,o){const i=E();return o in i||o in r},set(e,o,i){const g=E(!0);return g[o]=i,!0},deleteProperty(e,o){if(!o)return!1;const i=E(!0);return delete i[o],!0},ownKeys(){const e=E(!0);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",p=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"]];function B(){if(globalThis.process?.env)for(const e of p){const o=e[1]||e[0];if(globalThis.process?.env[o])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const l=B(),d=l.name;function n(e){return e?e!=="false":!1}const I=globalThis.process?.platform||"",T=n(s.CI)||l.ci!==!1,R=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),U=typeof window<"u",h=n(s.DEBUG),C=t==="test"||n(s.TEST),f=t==="production",v=t==="dev"||t==="development",m=n(s.MINIMAL)||T||C||!R,a=/^win/i.test(I),M=/^linux/i.test(I),V=/^darwin/i.test(I),Y=!n(s.NO_COLOR)&&(n(s.FORCE_COLOR)||(R||a)&&s.TERM!=="dumb"||T),_=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,y=Number(_?.split(".")[0])||null,W=globalThis.process||Object.create(null),c={versions:{}},w=new Proxy(W,{get(e,o){if(o==="env")return s;if(o in e)return e[o];if(o in c)return c[o]}}),A=globalThis.process?.release?.name==="node",L=!!globalThis.Bun||!!globalThis.process?.versions?.bun,D=!!globalThis.Deno,O=!!globalThis.fastly,S=!!globalThis.Netlify,N=!!globalThis.EdgeRuntime,u=globalThis.navigator?.userAgent==="Cloudflare-Workers",b=!!globalThis.__lagon__,F=[[S,"netlify"],[N,"edge-light"],[u,"workerd"],[O,"fastly"],[D,"deno"],[L,"bun"],[A,"node"],[b,"lagon"]];function G(){const e=F.find(o=>o[0]);if(e)return{name:e[1]}}const P=G(),K=P?.name||"";export{s as env,R as hasTTY,U as hasWindow,L as isBun,T as isCI,Y as isColorSupported,h as isDebug,D as isDeno,v as isDevelopment,N as isEdgeLight,O as isFastly,b as isLagon,M as isLinux,V as isMacOS,m as isMinimal,S as isNetlify,A as isNode,f as isProduction,C as isTest,a as isWindows,u as isWorkerd,t as nodeENV,y as nodeMajorVersion,_ as nodeVersion,I as platform,w as process,d as provider,l as providerInfo,K as runtime,P as runtimeInfo};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "std-env",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Runtime agnostic JS utils",
|
|
5
5
|
"repository": "unjs/std-env",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^20.10.
|
|
33
|
-
"@vitest/coverage-v8": "^
|
|
32
|
+
"@types/node": "^20.10.5",
|
|
33
|
+
"@vitest/coverage-v8": "^1.1.0",
|
|
34
34
|
"changelogen": "^0.5.5",
|
|
35
|
-
"esbuild": "^0.19.
|
|
36
|
-
"eslint": "^8.
|
|
35
|
+
"esbuild": "^0.19.10",
|
|
36
|
+
"eslint": "^8.56.0",
|
|
37
37
|
"eslint-config-unjs": "^0.2.1",
|
|
38
38
|
"jiti": "^1.21.0",
|
|
39
|
-
"prettier": "^3.1.
|
|
40
|
-
"rollup": "^4.
|
|
41
|
-
"typescript": "^5.3.
|
|
39
|
+
"prettier": "^3.1.1",
|
|
40
|
+
"rollup": "^4.9.1",
|
|
41
|
+
"typescript": "^5.3.3",
|
|
42
42
|
"unbuild": "^2.0.0",
|
|
43
|
-
"vitest": "^
|
|
43
|
+
"vitest": "^1.1.0"
|
|
44
44
|
},
|
|
45
|
-
"packageManager": "pnpm@8.
|
|
45
|
+
"packageManager": "pnpm@8.12.1"
|
|
46
46
|
}
|