std-env 3.7.0 → 3.8.1
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 +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -9
- package/dist/index.d.mts +3 -9
- package/dist/index.d.ts +3 -9
- package/dist/index.mjs +1 -1
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ List of well known providers can be found from [./src/providers.ts](./src/provid
|
|
|
73
73
|
```ts
|
|
74
74
|
import { runtime, runtimeInfo } from "std-env";
|
|
75
75
|
|
|
76
|
-
// "" | "node" | "deno" | "bun" | "workerd"
|
|
76
|
+
// "" | "node" | "deno" | "bun" | "workerd" ...
|
|
77
77
|
console.log(runtime);
|
|
78
78
|
|
|
79
79
|
// { name: "node" }
|
|
@@ -93,7 +93,6 @@ You can also use individual named exports for each runtime detection:
|
|
|
93
93
|
- `isNetlify`
|
|
94
94
|
- `isEdgeLight`
|
|
95
95
|
- `isWorkerd`
|
|
96
|
-
- `isLagon`
|
|
97
96
|
- `isFastly`
|
|
98
97
|
|
|
99
98
|
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
|
|
1
|
+
"use strict";var B=Object.defineProperty;var C=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var R=(i,e,E)=>e in i?B(i,e,{enumerable:!0,configurable:!0,writable:!0,value:E}):i[e]=E,A=(i,e)=>{for(var E in e||(e={}))b.call(e,E)&&R(i,E,e[E]);if(C)for(var E of C(e))g.call(e,E)&&R(i,E,e[E]);return i};var D,_,O,a,L,c,S,N,u,P;const r$2=Object.create(null),s=i=>{var e,E;return((e=globalThis.process)==null?void 0:e.env)||void 0||((E=globalThis.Deno)==null?void 0:E.env.toObject())||globalThis.__env__||(i?r$2:globalThis)},env=new Proxy(r$2,{get(i,e){var E;return(E=s()[e])!=null?E:r$2[e]},has(i,e){const E=s();return e in E||e in r$2},set(i,e,E){const n=s(!0);return n[e]=E,!0},deleteProperty(i,e){if(!e)return!1;const E=s(!0);return delete E[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}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function I(){var i,e,E,n,T,p;if((i=globalThis.process)!=null&&i.env)for(const l of r$1){const d=l[1]||l[0];if((e=globalThis.process)!=null&&e.env[d])return A({name:l[0].toLowerCase()},l[2])}return((n=(E=globalThis.process)==null?void 0:E.env)==null?void 0:n.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=((D=globalThis.process)==null?void 0:D.platform)||"",isCI=toBoolean(env.CI)||providerInfo.ci!==!1,hasTTY=toBoolean(((_=globalThis.process)==null?void 0:_.stdout)&&((O=globalThis.process)==null?void 0:O.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=(((L=(a=globalThis.process)==null?void 0:a.versions)==null?void 0:L.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=((S=(c=globalThis.process)==null?void 0:c.release)==null?void 0:S.name)==="node",isBun=!!globalThis.Bun||!!((u=(N=globalThis.process)==null?void 0:N.versions)!=null&&u.bun),isDeno=!!globalThis.Deno,isFastly=!!globalThis.fastly,isNetlify=!!globalThis.Netlify,isEdgeLight=!!globalThis.EdgeRuntime,isWorkerd=((P=globalThis.navigator)==null?void 0:P.userAgent)==="Cloudflare-Workers",t=[[isNetlify,"netlify"],[isEdgeLight,"edge-light"],[isWorkerd,"workerd"],[isFastly,"fastly"],[isDeno,"deno"],[isBun,"bun"],[isNode,"node"]];function o(){const i=t.find(e=>e[0]);if(i)return{name:i[1]}}const runtimeInfo=o(),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.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" | "railway";
|
|
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" | "deno-deploy" | "firebase_app_hosting";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -48,7 +48,7 @@ type ProviderInfo = {
|
|
|
48
48
|
declare const providerInfo: ProviderInfo;
|
|
49
49
|
declare const provider: ProviderName;
|
|
50
50
|
|
|
51
|
-
type RuntimeName = "workerd" | "deno" | "
|
|
51
|
+
type RuntimeName = "workerd" | "deno" | "netlify" | "node" | "bun" | "edge-light" | "fastly" | "";
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
@@ -85,13 +85,7 @@ declare const isEdgeLight: boolean;
|
|
|
85
85
|
* Indicates if running in Cloudflare Workers runtime.
|
|
86
86
|
*/
|
|
87
87
|
declare const isWorkerd: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Indicates if running in Lagon runtime.
|
|
90
|
-
*
|
|
91
|
-
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
-
*/
|
|
93
|
-
declare const isLagon: boolean;
|
|
94
88
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
95
89
|
declare const runtime: RuntimeName;
|
|
96
90
|
|
|
97
|
-
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly,
|
|
91
|
+
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly, isLinux, isMacOS, isMinimal, isNetlify, isNode, isProduction, isTest, isWindows, isWorkerd, nodeENV, nodeMajorVersion, nodeVersion, platform, process, provider, providerInfo, runtime, runtimeInfo };
|
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" | "railway";
|
|
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" | "deno-deploy" | "firebase_app_hosting";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -48,7 +48,7 @@ type ProviderInfo = {
|
|
|
48
48
|
declare const providerInfo: ProviderInfo;
|
|
49
49
|
declare const provider: ProviderName;
|
|
50
50
|
|
|
51
|
-
type RuntimeName = "workerd" | "deno" | "
|
|
51
|
+
type RuntimeName = "workerd" | "deno" | "netlify" | "node" | "bun" | "edge-light" | "fastly" | "";
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
@@ -85,13 +85,7 @@ declare const isEdgeLight: boolean;
|
|
|
85
85
|
* Indicates if running in Cloudflare Workers runtime.
|
|
86
86
|
*/
|
|
87
87
|
declare const isWorkerd: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Indicates if running in Lagon runtime.
|
|
90
|
-
*
|
|
91
|
-
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
-
*/
|
|
93
|
-
declare const isLagon: boolean;
|
|
94
88
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
95
89
|
declare const runtime: RuntimeName;
|
|
96
90
|
|
|
97
|
-
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly,
|
|
91
|
+
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly, isLinux, isMacOS, isMinimal, isNetlify, isNode, isProduction, isTest, isWindows, isWorkerd, nodeENV, nodeMajorVersion, nodeVersion, platform, process, provider, providerInfo, runtime, runtimeInfo };
|
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" | "railway";
|
|
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" | "deno-deploy" | "firebase_app_hosting";
|
|
42
42
|
type ProviderInfo = {
|
|
43
43
|
name: ProviderName;
|
|
44
44
|
ci?: boolean;
|
|
@@ -48,7 +48,7 @@ type ProviderInfo = {
|
|
|
48
48
|
declare const providerInfo: ProviderInfo;
|
|
49
49
|
declare const provider: ProviderName;
|
|
50
50
|
|
|
51
|
-
type RuntimeName = "workerd" | "deno" | "
|
|
51
|
+
type RuntimeName = "workerd" | "deno" | "netlify" | "node" | "bun" | "edge-light" | "fastly" | "";
|
|
52
52
|
type RuntimeInfo = {
|
|
53
53
|
name: RuntimeName;
|
|
54
54
|
};
|
|
@@ -85,13 +85,7 @@ declare const isEdgeLight: boolean;
|
|
|
85
85
|
* Indicates if running in Cloudflare Workers runtime.
|
|
86
86
|
*/
|
|
87
87
|
declare const isWorkerd: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Indicates if running in Lagon runtime.
|
|
90
|
-
*
|
|
91
|
-
* @deprecated https://github.com/unjs/std-env/issues/105
|
|
92
|
-
*/
|
|
93
|
-
declare const isLagon: boolean;
|
|
94
88
|
declare const runtimeInfo: RuntimeInfo | undefined;
|
|
95
89
|
declare const runtime: RuntimeName;
|
|
96
90
|
|
|
97
|
-
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly,
|
|
91
|
+
export { type EnvObject, type Process, type ProviderInfo, type ProviderName, type RuntimeInfo, type RuntimeName, env, hasTTY, hasWindow, isBun, isCI, isColorSupported, isDebug, isDeno, isDevelopment, isEdgeLight, isFastly, isLinux, isMacOS, isMinimal, isNetlify, isNode, isProduction, isTest, isWindows, isWorkerd, nodeENV, nodeMajorVersion, nodeVersion, platform, process, provider, providerInfo, runtime, runtimeInfo };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=Object.create(null),
|
|
1
|
+
const r=Object.create(null),i=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),o=new Proxy(r,{get(e,s){return i()[s]??r[s]},has(e,s){const E=i();return s in E||s in r},set(e,s,E){const B=i(!0);return B[s]=E,!0},deleteProperty(e,s){if(!s)return!1;const E=i(!0);return delete E[s],!0},ownKeys(){const e=i(!0);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",f=[["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}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function b(){if(globalThis.process?.env)for(const e of f){const s=e[1]||e[0];if(globalThis.process?.env[s])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(),p=l.name;function n(e){return e?e!=="false":!1}const I=globalThis.process?.platform||"",T=n(o.CI)||l.ci!==!1,a=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),d=typeof window<"u",g=n(o.DEBUG),R=t==="test"||n(o.TEST),U=t==="production",h=t==="dev"||t==="development",v=n(o.MINIMAL)||T||R||!a,A=/^win/i.test(I),M=/^linux/i.test(I),m=/^darwin/i.test(I),Y=!n(o.NO_COLOR)&&(n(o.FORCE_COLOR)||(a||A)&&o.TERM!=="dumb"||T),C=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,V=Number(C?.split(".")[0])||null,y=globalThis.process||Object.create(null),_={versions:{}},W=new Proxy(y,{get(e,s){if(s==="env")return o;if(s in e)return e[s];if(s in _)return _[s]}}),c=globalThis.process?.release?.name==="node",O=!!globalThis.Bun||!!globalThis.process?.versions?.bun,D=!!globalThis.Deno,L=!!globalThis.fastly,S=!!globalThis.Netlify,u=!!globalThis.EdgeRuntime,N=globalThis.navigator?.userAgent==="Cloudflare-Workers",F=[[S,"netlify"],[u,"edge-light"],[N,"workerd"],[L,"fastly"],[D,"deno"],[O,"bun"],[c,"node"]];function G(){const e=F.find(s=>s[0]);if(e)return{name:e[1]}}const P=G(),w=P?.name||"";export{o as env,a as hasTTY,d as hasWindow,O as isBun,T as isCI,Y as isColorSupported,g as isDebug,D as isDeno,h as isDevelopment,u as isEdgeLight,L as isFastly,M as isLinux,m as isMacOS,v as isMinimal,S as isNetlify,c as isNode,U as isProduction,R as isTest,A as isWindows,N as isWorkerd,t as nodeENV,V as nodeMajorVersion,C as nodeVersion,I as platform,W as process,p as provider,l as providerInfo,w 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.8.1",
|
|
4
4
|
"description": "Runtime agnostic JS utils",
|
|
5
5
|
"repository": "unjs/std-env",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "unbuild",
|
|
20
20
|
"dev": "vitest",
|
|
21
|
-
"lint": "eslint
|
|
22
|
-
"lint:fix": "eslint --fix
|
|
21
|
+
"lint": "eslint . && prettier -c src test",
|
|
22
|
+
"lint:fix": "eslint --fix . && prettier -w src test",
|
|
23
23
|
"prepack": "unbuild",
|
|
24
24
|
"play:bun": "bun playground/bun.ts",
|
|
25
25
|
"play:deno": "pnpm build && deno run -A playground/deno.ts",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"@vitest/coverage-v8": "^
|
|
34
|
-
"changelogen": "^0.
|
|
35
|
-
"esbuild": "^0.
|
|
36
|
-
"eslint": "^
|
|
37
|
-
"eslint-config-unjs": "^0.2
|
|
38
|
-
"jiti": "^
|
|
39
|
-
"prettier": "^3.
|
|
40
|
-
"rollup": "^4.9
|
|
41
|
-
"typescript": "^5.
|
|
42
|
-
"unbuild": "^
|
|
43
|
-
"vitest": "^
|
|
32
|
+
"@types/node": "^22.13.8",
|
|
33
|
+
"@vitest/coverage-v8": "^3.0.7",
|
|
34
|
+
"changelogen": "^0.6.0",
|
|
35
|
+
"esbuild": "^0.25.0",
|
|
36
|
+
"eslint": "^9.21.0",
|
|
37
|
+
"eslint-config-unjs": "^0.4.2",
|
|
38
|
+
"jiti": "^2.4.2",
|
|
39
|
+
"prettier": "^3.5.3",
|
|
40
|
+
"rollup": "^4.34.9",
|
|
41
|
+
"typescript": "^5.8.2",
|
|
42
|
+
"unbuild": "^3.5.0",
|
|
43
|
+
"vitest": "^3.0.7"
|
|
44
44
|
},
|
|
45
|
-
"packageManager": "pnpm@
|
|
46
|
-
}
|
|
45
|
+
"packageManager": "pnpm@10.5.2"
|
|
46
|
+
}
|