@stryke/env 0.15.9 → 0.15.11

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.
@@ -4,21 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.runtimeInfo = exports.runtime = exports.isWorkerd = exports.isRuntimeServer = exports.isRuntimeClient = exports.isNode = exports.isNetlify = exports.isFastly = exports.isEdgeLight = exports.isDeno = exports.isBun = void 0;
7
- const isNode = exports.isNode = globalThis.process?.release?.name === "node",
8
- isBun = exports.isBun = !!globalThis.Bun || !!globalThis.process?.versions?.bun,
9
- isDeno = exports.isDeno = !!globalThis.Deno,
10
- isFastly = exports.isFastly = !!globalThis.fastly,
11
- isNetlify = exports.isNetlify = !!globalThis.Netlify,
12
- isEdgeLight = exports.isEdgeLight = !!globalThis.EdgeRuntime,
13
- isWorkerd = exports.isWorkerd = globalThis.navigator?.userAgent === "Cloudflare-Workers",
7
+ const isNode = exports.isNode = process?.release?.name === "node",
8
+ isBun = exports.isBun = !!Bun || !!process?.versions?.bun,
9
+ isDeno = exports.isDeno = !!Deno,
10
+ isFastly = exports.isFastly = !!fastly,
11
+ isNetlify = exports.isNetlify = !!Netlify,
12
+ isEdgeLight = exports.isEdgeLight = !!EdgeRuntime,
13
+ isWorkerd = exports.isWorkerd = navigator?.userAgent === "Cloudflare-Workers",
14
14
  isRuntimeServer = exports.isRuntimeServer = isNode || isBun || isDeno || isFastly || isNetlify || isEdgeLight || isWorkerd,
15
15
  isRuntimeClient = exports.isRuntimeClient = !isRuntimeServer;
16
- const o = [[isNetlify, "netlify"], [isEdgeLight, "edge-light"], [isWorkerd, "workerd"], [isFastly, "fastly"], [isDeno, "deno"], [isBun, "bun"], [isNode, "node"]];
17
- function t() {
18
- const e = o.find(n => n[0]);
16
+ const t = [[isNetlify, "netlify"], [isEdgeLight, "edge-light"], [isWorkerd, "workerd"], [isFastly, "fastly"], [isDeno, "deno"], [isBun, "bun"], [isNode, "node"]];
17
+ function o() {
18
+ const e = t.find(n => n[0]);
19
19
  if (e) return {
20
20
  name: e[1]
21
21
  };
22
22
  }
23
- const runtimeInfo = exports.runtimeInfo = t(),
23
+ const runtimeInfo = exports.runtimeInfo = o(),
24
24
  runtime = exports.runtime = runtimeInfo?.name || "";
@@ -1 +1 @@
1
- export const isNode=globalThis.process?.release?.name==="node",isBun=!!globalThis.Bun||!!globalThis.process?.versions?.bun,isDeno=!!globalThis.Deno,isFastly=!!globalThis.fastly,isNetlify=!!globalThis.Netlify,isEdgeLight=!!globalThis.EdgeRuntime,isWorkerd=globalThis.navigator?.userAgent==="Cloudflare-Workers",isRuntimeServer=isNode||isBun||isDeno||isFastly||isNetlify||isEdgeLight||isWorkerd,isRuntimeClient=!isRuntimeServer;const o=[[isNetlify,"netlify"],[isEdgeLight,"edge-light"],[isWorkerd,"workerd"],[isFastly,"fastly"],[isDeno,"deno"],[isBun,"bun"],[isNode,"node"]];function t(){const e=o.find(n=>n[0]);if(e)return{name:e[1]}}export const runtimeInfo=t(),runtime=runtimeInfo?.name||"";
1
+ export const isNode=process?.release?.name==="node",isBun=!!Bun||!!process?.versions?.bun,isDeno=!!Deno,isFastly=!!fastly,isNetlify=!!Netlify,isEdgeLight=!!EdgeRuntime,isWorkerd=navigator?.userAgent==="Cloudflare-Workers",isRuntimeServer=isNode||isBun||isDeno||isFastly||isNetlify||isEdgeLight||isWorkerd,isRuntimeClient=!isRuntimeServer;const t=[[isNetlify,"netlify"],[isEdgeLight,"edge-light"],[isWorkerd,"workerd"],[isFastly,"fastly"],[isDeno,"deno"],[isBun,"bun"],[isNode,"node"]];function o(){const e=t.find(n=>n[0]);if(e)return{name:e[1]}}export const runtimeInfo=o(),runtime=runtimeInfo?.name||"";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/env",
3
- "version": "0.15.9",
3
+ "version": "0.15.11",
4
4
  "type": "module",
5
5
  "description": "A package containing utility functions to handle environment specific processes",
6
6
  "repository": {
@@ -11,9 +11,9 @@
11
11
  "private": false,
12
12
  "dependencies": {
13
13
  "@dotenvx/dotenvx": "1.35.0",
14
- "@stryke/fs": "^0.22.8",
15
- "@stryke/path": "^0.12.0",
16
- "@stryke/string-format": "^0.5.2",
14
+ "@stryke/fs": "^0.23.0",
15
+ "@stryke/path": "^0.12.1",
16
+ "@stryke/string-format": "^0.6.0",
17
17
  "defu": "^6.1.4"
18
18
  },
19
19
  "devDependencies": { "@types/node": "^22.14.0" },
@@ -174,5 +174,5 @@
174
174
  "main": "./dist/index.cjs",
175
175
  "module": "./dist/index.mjs",
176
176
  "types": "./dist/index.d.ts",
177
- "gitHead": "763abdbc096331d500df3ebb7a7e4387335c0d62"
177
+ "gitHead": "57da58e3434302b35f798674d9f18f92ca7f7ac9"
178
178
  }