globables 3.0.0 → 3.2.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 CHANGED
@@ -17,16 +17,26 @@ import {
17
17
  ARGV,
18
18
  ENV,
19
19
  GLOBAL_THIS,
20
+ // is* runtime helpers
21
+ IS_BUN,
22
+ IS_DENO,
23
+ IS_NODE,
24
+ IS_QUICKJS,
25
+ // is_* service helpers
26
+ IS_CLOUDFLARE_WORKER,
27
+ IS_VERCEL_EDGE,
20
28
  } from 'globables';
21
29
 
22
30
  GLOBAL_THIS.console.log(`Shellin with ${ENV['SHELL']} and commandin ${ARGV.join(', ')}`);
23
31
  ```
24
32
  > ╸`ARGV` - [command-line arguments](https://nodejs.org/api/process.html#processargv) (includes an export alias of `ARGS`)<br/>
25
33
  > ╸`ENV` - [process environment](https://nodejs.org/api/process.html#processenv) <br/>
34
+ > ━╸ **QuickJS**: only works with `qjs --std -m` not `qjs --std -c`<br />
26
35
  > ╸`GLOBAL_THIS` - [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) object; pollyfill'ed if missing, like prehistoric node <12<br/>
27
36
  > ╸ All Runtimes/Globals Tested -> [./src/index.test.ts](https://github.com/fetchTe/globables/blob/master/src/index.test.ts)<br/>
28
37
 
29
38
 
39
+
30
40
  <br/>
31
41
 
32
42
 
package/dist/index.cjs CHANGED
@@ -22,7 +22,13 @@ __export(index_exports, {
22
22
  ARGS: () => ARGS,
23
23
  ARGV: () => ARGV,
24
24
  ENV: () => ENV,
25
- GLOBAL_THIS: () => GLOBAL_THIS
25
+ GLOBAL_THIS: () => GLOBAL_THIS,
26
+ IS_BUN: () => IS_BUN,
27
+ IS_CLOUDFLARE_WORKER: () => IS_CLOUDFLARE_WORKER,
28
+ IS_DENO: () => IS_DENO,
29
+ IS_NODE: () => IS_NODE,
30
+ IS_QUICKJS: () => IS_QUICKJS,
31
+ IS_VERCEL_EDGE: () => IS_VERCEL_EDGE
26
32
  });
27
33
  module.exports = __toCommonJS(index_exports);
28
34
  var GLOBAL_THIS = /* @__PURE__ */ (() => typeof globalThis === "object" ? globalThis : (() => {
@@ -51,11 +57,29 @@ var ENV = /* @__PURE__ */ (() => {
51
57
  return {};
52
58
  })();
53
59
  })();
60
+ var IS_BUN = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["Bun"]))();
61
+ var IS_DENO = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["Deno"]))();
62
+ var IS_QUICKJS = /* @__PURE__ */ (() => typeof scriptArgs !== "undefined")();
63
+ var IS_NODE = /* @__PURE__ */ (() => {
64
+ var _a, _b;
65
+ return (
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ !IS_BUN && !IS_DENO && !!((_b = (_a = GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["process"]) == null ? void 0 : _a.versions) == null ? void 0 : _b.node)
68
+ );
69
+ })();
70
+ var IS_CLOUDFLARE_WORKER = /* @__PURE__ */ (() => typeof (GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["WebSocketPair"]) === "function" && typeof (GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["navigator"]) === "undefined")();
71
+ var IS_VERCEL_EDGE = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["EdgeRuntime"]))();
54
72
  // Annotate the CommonJS export names for ESM import in node:
55
73
  0 && (module.exports = {
56
74
  ARGS,
57
75
  ARGV,
58
76
  ENV,
59
- GLOBAL_THIS
77
+ GLOBAL_THIS,
78
+ IS_BUN,
79
+ IS_CLOUDFLARE_WORKER,
80
+ IS_DENO,
81
+ IS_NODE,
82
+ IS_QUICKJS,
83
+ IS_VERCEL_EDGE
60
84
  });
61
85
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export type GlobalThis = typeof globalThis;\nexport type ProcessArgv = NodeJS.Process['argv'];\nexport type ProcessEnv = NodeJS.ProcessEnv;\n\n\n/**\n * globalThis object - with pollyfil in case of prehistoric node <12\n * @see {@link https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis|globalThis spec - ECMAScript }\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis|globalThis docs - MDN}\n */\nexport const GLOBAL_THIS = /* @__PURE__ */ (() =>\n typeof globalThis === 'object'\n ? globalThis\n /**\n * globalThis pollyfill\n * @see {@link https://mathiasbynens.be/notes/globalthis}\n * @see {@link https://github.com/ungap/global-this}\n */\n : (() => {\n // @ts-expect-error - globalThis pollyfill for prehistoric node envs\n // eslint-disable-next-line\n !(function (Object) {function get() {const e = this || self; e.globalThis = e, delete Object.prototype._T_;}'object' != typeof globalThis && (this ? get() : (Object.defineProperty(Object.prototype, '_T_', {configurable:!0, get:get}), _T_));}(Object));\n // just in case\n return typeof globalThis === 'object' ? globalThis : {};\n })()\n)() as GlobalThis;\n\n\n/**\n * command-line arguments (pure/iffe wrapped so we can shake the tree)\n * @see {@link https://nodejs.org/api/process.html#processargv|process.argv - Node.js}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|scriptArgs - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#scriptargs|scriptArgs - QuickJS-NG}\n * @see {@link https://docs.deno.com/api/node/process/~/Process#property_argv|process.argv - Deno}\n * @see {@link https://docs.deno.com/api/deno/~/Deno.CommandOptions#property_args|Deno.args - Deno}\n */\nexport const ARGV: NodeJS.Process['argv'] = /* @__PURE__ */ (() =>\n typeof process === 'undefined'\n /** quickJs {@link https://bellard.org/quickjs/quickjs.html#Global-objects} */\n ? typeof scriptArgs !== 'undefined'\n ? scriptArgs\n : []\n : ((GLOBAL_THIS as never)?.['Deno']\n // @NOTE: DENO.args does not require any perm requests\n // @NOTE: if --allow-all is used, no args (like --allow-env), use default\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ? (GLOBAL_THIS as never)?.['Deno']?.args\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ?? (process['args']?.length ? process['args'] : process['argv'])\n : process['argv']\n ) ?? []\n)();\nexport const ARGS = ARGV;\n\n/**\n * process environment (ENV) variables\n * @see {@link https://nodejs.org/api/process.html#processenv|process.env - Node.js}\n * @see {@link https://docs.deno.com/runtime/reference/env_variables/#built-in-deno.env|env - Deno}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|getenviron - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}\n */\nexport const ENV = /* @__PURE__ */ (() => typeof process === 'undefined'\n // @ts-expect-error quickjs std\n ? typeof (GLOBAL_THIS as never)?.['std']?.getenviron === 'function'\n // @ts-expect-error quickjs std\n ? ((GLOBAL_THIS as never)['std'].getenviron?.() ?? {})\n : {}\n : (!(GLOBAL_THIS as never)?.['Deno']\n ? process['env']\n : (() => {\n try {\n // @NOTE: if --allow-all is used, no toObject (like --allow-env), use default\n // @NOTE: DENO.env.toObject only requires one perm request while process requires many\n // @ts-expect-error deno perms\n // eslint-disable-next-line @stylistic/max-len\n return (GLOBAL_THIS as never)?.['Deno']?.env?.toObject?.() ?? (process['env']?.toObject ? process['env']?.toObject() : process['env']);\n } catch (_err) { /* ignore */ }\n return {};\n })())\n)() as ProcessEnv;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,IAAM,cAA+B,uBAC1C,OAAO,eAAe,WAClB,cAMC,MAAM;AAGP,IAAE,SAAUA,SAAQ;AAAC,aAAS,MAAM;AAAC,YAAM,IAAI,QAAQ;AAAM,QAAE,aAAa,GAAG,OAAOA,QAAO,UAAU;AAAA,IAAI;AAAC,gBAAY,OAAO,eAAe,OAAO,IAAI,KAAKA,QAAO,eAAeA,QAAO,WAAW,OAAO,EAAC,cAAa,MAAI,IAAO,CAAC,GAAG;AAAA,EAAM,GAAE,MAAM;AAExP,SAAO,OAAO,eAAe,WAAW,aAAa,CAAC;AACxD,GAAG,GACL;AAWK,IAAM,OAAgD,uBAAG;AApChE;AAqCE,gBAAO,YAAY,cAEf,OAAO,eAAe,cACpB,aACA,CAAC,KACD,iDAAwB,YAIvB,sDAAwB,YAAxB,mBAAiC,SAAjC,cAEG,aAAQ,MAAM,MAAd,mBAAiB,UAAS,QAAQ,MAAM,IAAI,QAAQ,MAAM,IAC9D,QAAQ,MAAM,MAPd,YAQC,CAAC;AAAA,GACR;AACK,IAAM,OAAO;AASb,IAAM,MAAuB,uBAAG;AA7DvC;AA6D0C,gBAAO,YAAY,cAEzD,SAAQ,gDAAwB,WAAxB,mBAAgC,gBAAe,cAEnD,6BAAsB,KAAK,GAAE,eAA7B,4CAA+C,CAAC,IAClD,CAAC,IACF,EAAE,2CAAwB,WACzB,QAAQ,KAAK,KACZ,MAAM;AArEb,QAAAC,KAAAC,KAAAC,KAAAC,KAAA;AAsEM,QAAI;AAKF,cAAQ,MAAAD,OAAAD,OAAAD,MAAA,2CAAwB,YAAxB,gBAAAA,IAAiC,QAAjC,gBAAAC,IAAsC,aAAtC,gBAAAC,IAAA,KAAAD,SAAA,cAAuDE,MAAA,QAAQ,KAAK,MAAb,gBAAAA,IAAgB,aAAW,aAAQ,KAAK,MAAb,mBAAgB,aAAa,QAAQ,KAAK;AAAA,IACtI,SAAS,MAAM;AAAA,IAAe;AAC9B,WAAO,CAAC;AAAA,EACV,GAAG;AAAA,GACL;",
4
+ "sourcesContent": ["export type GlobalThis = typeof globalThis;\nexport type ProcessArgv = NodeJS.Process['argv'];\nexport type ProcessEnv = NodeJS.ProcessEnv;\n\n\n/**\n * globalThis object - with pollyfil in case of prehistoric node <12\n * @see {@link https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis|globalThis spec - ECMAScript }\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis|globalThis docs - MDN}\n */\nexport const GLOBAL_THIS = /* @__PURE__ */ (() =>\n typeof globalThis === 'object'\n ? globalThis\n /**\n * globalThis pollyfill\n * @see {@link https://mathiasbynens.be/notes/globalthis}\n * @see {@link https://github.com/ungap/global-this}\n */\n : (() => {\n // @ts-expect-error - globalThis pollyfill for prehistoric node envs\n // eslint-disable-next-line\n !(function (Object) {function get() {const e = this || self; e.globalThis = e, delete Object.prototype._T_;}'object' != typeof globalThis && (this ? get() : (Object.defineProperty(Object.prototype, '_T_', {configurable:!0, get:get}), _T_));}(Object));\n // just in case\n return typeof globalThis === 'object' ? globalThis : {};\n })()\n)() as GlobalThis;\n\n\n/**\n * command-line arguments (pure/iffe wrapped so we can shake the tree)\n * @see {@link https://nodejs.org/api/process.html#processargv|process.argv - Node.js}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|scriptArgs - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#scriptargs|scriptArgs - QuickJS-NG}\n * @see {@link https://docs.deno.com/api/node/process/~/Process#property_argv|process.argv - Deno}\n * @see {@link https://docs.deno.com/api/deno/~/Deno.CommandOptions#property_args|Deno.args - Deno}\n */\nexport const ARGV: NodeJS.Process['argv'] = /* @__PURE__ */ (() =>\n typeof process === 'undefined'\n /** quickJs {@link https://bellard.org/quickjs/quickjs.html#Global-objects} */\n ? typeof scriptArgs !== 'undefined'\n ? scriptArgs\n : []\n : ((GLOBAL_THIS as never)?.['Deno']\n // @NOTE: DENO.args does not require any perm requests\n // @NOTE: if --allow-all is used, no args (like --allow-env), use default\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ? (GLOBAL_THIS as never)?.['Deno']?.args\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ?? (process['args']?.length ? process['args'] : process['argv'])\n : process['argv']\n ) ?? []\n)();\nexport const ARGS = ARGV;\n\n/**\n * process environment (ENV) variables\n * @see {@link https://nodejs.org/api/process.html#processenv|process.env - Node.js}\n * @see {@link https://docs.deno.com/runtime/reference/env_variables/#built-in-deno.env|env - Deno}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|getenviron - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}\n */\nexport const ENV = /* @__PURE__ */ (() => typeof process === 'undefined'\n // @ts-expect-error quickjs std\n ? typeof (GLOBAL_THIS as never)?.['std']?.getenviron === 'function'\n // @ts-expect-error quickjs std -> only works via 'qjs --std --module <file>'\n // if 'qjs --std --compile <file>'; 'getenviron' is only accessible via: import * as std from 'qjs:std'\n ? ((GLOBAL_THIS as never)['std'].getenviron?.() ?? {})\n : {}\n : (!(GLOBAL_THIS as never)?.['Deno']\n ? process['env']\n : (() => {\n try {\n // @NOTE: if --allow-all is used, no toObject (like --allow-env), use default\n // @NOTE: DENO.env.toObject only requires one perm request while process requires many\n // @ts-expect-error deno perms\n // eslint-disable-next-line @stylistic/max-len\n return (GLOBAL_THIS as never)?.['Deno']?.env?.toObject?.() ?? (process['env']?.toObject ? process['env']?.toObject() : process['env']);\n } catch (_err) { /* ignore */ }\n return {};\n })())\n)() as ProcessEnv;\n\n\n/**\n * detects if running in the Bun runtime\n * @see {@link https://bun.sh/docs/api/globals|Bun globals}\n */\nexport const IS_BUN: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['Bun']\n)();\n\n\n/**\n * detects if running in the Deno runtime\n * @see {@link https://docs.deno.com/api/deno/~/Deno|Deno}\n */\nexport const IS_DENO: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['Deno']\n)();\n\n\n/**\n * detects if running in the QuickJs runtime\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib/#globals}\n */\nexport const IS_QUICKJS: boolean = /* @__PURE__ */ (() =>\n typeof scriptArgs !== 'undefined'\n)();\n\n\n/**\n * detects if running in Node.js\n * @see {@link https://nodejs.org/api/process.html#processversions|process.versions docs}\n */\nexport const IS_NODE: boolean = /* @__PURE__ */ (() =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !IS_BUN && !IS_DENO && !!(GLOBAL_THIS as any)?.['process']?.versions?.node\n)();\n\n\n/**\n * detects if running inside Cloudflare Workers\n * - Workers expose 'WebSocketPair' and lack 'navigator'\n * @see {@link https://developers.cloudflare.com/workers/runtime-apis/websockets}\n */\nexport const IS_CLOUDFLARE_WORKER: boolean = /* @__PURE__ */ (() =>\n typeof (GLOBAL_THIS as never)?.['WebSocketPair'] === 'function'\n && typeof (GLOBAL_THIS as never)?.['navigator'] === 'undefined'\n)();\n\n\n/**\n * detects if running inside Vercel Edge\n * @see {@link https://vercel.com/docs/functions/runtimes/edge#check-if-you're-running-on-the-edge-runtime}\n */\nexport const IS_VERCEL_EDGE: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['EdgeRuntime']\n)();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,IAAM,cAA+B,uBAC1C,OAAO,eAAe,WAClB,cAMC,MAAM;AAGP,IAAE,SAAUA,SAAQ;AAAC,aAAS,MAAM;AAAC,YAAM,IAAI,QAAQ;AAAM,QAAE,aAAa,GAAG,OAAOA,QAAO,UAAU;AAAA,IAAI;AAAC,gBAAY,OAAO,eAAe,OAAO,IAAI,KAAKA,QAAO,eAAeA,QAAO,WAAW,OAAO,EAAC,cAAa,MAAI,IAAO,CAAC,GAAG;AAAA,EAAM,GAAE,MAAM;AAExP,SAAO,OAAO,eAAe,WAAW,aAAa,CAAC;AACxD,GAAG,GACL;AAWK,IAAM,OAAgD,uBAAG;AApChE;AAqCE,gBAAO,YAAY,cAEf,OAAO,eAAe,cACpB,aACA,CAAC,KACD,iDAAwB,YAIvB,sDAAwB,YAAxB,mBAAiC,SAAjC,cAEG,aAAQ,MAAM,MAAd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@ export declare const ARGS: string[];
25
25
  * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}
26
26
  */
27
27
  export declare const ENV: ProcessEnv;
28
+ /**
29
+ * detects if running in the Bun runtime
30
+ * @see {@link https://bun.sh/docs/api/globals|Bun globals}
31
+ */
32
+ export declare const IS_BUN: boolean;
33
+ /**
34
+ * detects if running in the Deno runtime
35
+ * @see {@link https://docs.deno.com/api/deno/~/Deno|Deno}
36
+ */
37
+ export declare const IS_DENO: boolean;
38
+ /**
39
+ * detects if running in the QuickJs runtime
40
+ * @see {@link https://quickjs-ng.github.io/quickjs/stdlib/#globals}
41
+ */
42
+ export declare const IS_QUICKJS: boolean;
43
+ /**
44
+ * detects if running in Node.js
45
+ * @see {@link https://nodejs.org/api/process.html#processversions|process.versions docs}
46
+ */
47
+ export declare const IS_NODE: boolean;
48
+ /**
49
+ * detects if running inside Cloudflare Workers
50
+ * - Workers expose 'WebSocketPair' and lack 'navigator'
51
+ * @see {@link https://developers.cloudflare.com/workers/runtime-apis/websockets}
52
+ */
53
+ export declare const IS_CLOUDFLARE_WORKER: boolean;
54
+ /**
55
+ * detects if running inside Vercel Edge
56
+ * @see {@link https://vercel.com/docs/functions/runtimes/edge#check-if-you're-running-on-the-edge-runtime}
57
+ */
58
+ export declare const IS_VERCEL_EDGE: boolean;
28
59
  //# sourceMappingURL=index.d.ts.map
package/dist/index.d.mts CHANGED
@@ -25,4 +25,35 @@ export declare const ARGS: string[];
25
25
  * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}
26
26
  */
27
27
  export declare const ENV: ProcessEnv;
28
+ /**
29
+ * detects if running in the Bun runtime
30
+ * @see {@link https://bun.sh/docs/api/globals|Bun globals}
31
+ */
32
+ export declare const IS_BUN: boolean;
33
+ /**
34
+ * detects if running in the Deno runtime
35
+ * @see {@link https://docs.deno.com/api/deno/~/Deno|Deno}
36
+ */
37
+ export declare const IS_DENO: boolean;
38
+ /**
39
+ * detects if running in the QuickJs runtime
40
+ * @see {@link https://quickjs-ng.github.io/quickjs/stdlib/#globals}
41
+ */
42
+ export declare const IS_QUICKJS: boolean;
43
+ /**
44
+ * detects if running in Node.js
45
+ * @see {@link https://nodejs.org/api/process.html#processversions|process.versions docs}
46
+ */
47
+ export declare const IS_NODE: boolean;
48
+ /**
49
+ * detects if running inside Cloudflare Workers
50
+ * - Workers expose 'WebSocketPair' and lack 'navigator'
51
+ * @see {@link https://developers.cloudflare.com/workers/runtime-apis/websockets}
52
+ */
53
+ export declare const IS_CLOUDFLARE_WORKER: boolean;
54
+ /**
55
+ * detects if running inside Vercel Edge
56
+ * @see {@link https://vercel.com/docs/functions/runtimes/edge#check-if-you're-running-on-the-edge-runtime}
57
+ */
58
+ export declare const IS_VERCEL_EDGE: boolean;
28
59
  //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -25,4 +25,35 @@ export declare const ARGS: string[];
25
25
  * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}
26
26
  */
27
27
  export declare const ENV: ProcessEnv;
28
+ /**
29
+ * detects if running in the Bun runtime
30
+ * @see {@link https://bun.sh/docs/api/globals|Bun globals}
31
+ */
32
+ export declare const IS_BUN: boolean;
33
+ /**
34
+ * detects if running in the Deno runtime
35
+ * @see {@link https://docs.deno.com/api/deno/~/Deno|Deno}
36
+ */
37
+ export declare const IS_DENO: boolean;
38
+ /**
39
+ * detects if running in the QuickJs runtime
40
+ * @see {@link https://quickjs-ng.github.io/quickjs/stdlib/#globals}
41
+ */
42
+ export declare const IS_QUICKJS: boolean;
43
+ /**
44
+ * detects if running in Node.js
45
+ * @see {@link https://nodejs.org/api/process.html#processversions|process.versions docs}
46
+ */
47
+ export declare const IS_NODE: boolean;
48
+ /**
49
+ * detects if running inside Cloudflare Workers
50
+ * - Workers expose 'WebSocketPair' and lack 'navigator'
51
+ * @see {@link https://developers.cloudflare.com/workers/runtime-apis/websockets}
52
+ */
53
+ export declare const IS_CLOUDFLARE_WORKER: boolean;
54
+ /**
55
+ * detects if running inside Vercel Edge
56
+ * @see {@link https://vercel.com/docs/functions/runtimes/edge#check-if-you're-running-on-the-edge-runtime}
57
+ */
58
+ export declare const IS_VERCEL_EDGE: boolean;
28
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAG3C;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAejB,UAAU,CAAC;AAGlB;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAerC,CAAC;AACJ,eAAO,MAAM,IAAI,UAAO,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,EAkBT,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAG3C;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAejB,UAAU,CAAC;AAGlB;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAerC,CAAC;AACJ,eAAO,MAAM,IAAI,UAAO,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,EAmBT,UAAU,CAAC;AAGlB;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,OAElB,CAAC;AAGJ;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,OAEnB,CAAC;AAGJ;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,OAEtB,CAAC;AAGJ;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,OAGnB,CAAC;AAGJ;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,OAGhC,CAAC;AAGJ;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,OAE1B,CAAC"}
package/dist/index.js CHANGED
@@ -25,10 +25,28 @@ var ENV = /* @__PURE__ */ (() => {
25
25
  return {};
26
26
  })();
27
27
  })();
28
+ var IS_BUN = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["Bun"]))();
29
+ var IS_DENO = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["Deno"]))();
30
+ var IS_QUICKJS = /* @__PURE__ */ (() => typeof scriptArgs !== "undefined")();
31
+ var IS_NODE = /* @__PURE__ */ (() => {
32
+ var _a, _b;
33
+ return (
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ !IS_BUN && !IS_DENO && !!((_b = (_a = GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["process"]) == null ? void 0 : _a.versions) == null ? void 0 : _b.node)
36
+ );
37
+ })();
38
+ var IS_CLOUDFLARE_WORKER = /* @__PURE__ */ (() => typeof (GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["WebSocketPair"]) === "function" && typeof (GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["navigator"]) === "undefined")();
39
+ var IS_VERCEL_EDGE = /* @__PURE__ */ (() => !!(GLOBAL_THIS == null ? void 0 : GLOBAL_THIS["EdgeRuntime"]))();
28
40
  export {
29
41
  ARGS,
30
42
  ARGV,
31
43
  ENV,
32
- GLOBAL_THIS
44
+ GLOBAL_THIS,
45
+ IS_BUN,
46
+ IS_CLOUDFLARE_WORKER,
47
+ IS_DENO,
48
+ IS_NODE,
49
+ IS_QUICKJS,
50
+ IS_VERCEL_EDGE
33
51
  };
34
52
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export type GlobalThis = typeof globalThis;\nexport type ProcessArgv = NodeJS.Process['argv'];\nexport type ProcessEnv = NodeJS.ProcessEnv;\n\n\n/**\n * globalThis object - with pollyfil in case of prehistoric node <12\n * @see {@link https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis|globalThis spec - ECMAScript }\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis|globalThis docs - MDN}\n */\nexport const GLOBAL_THIS = /* @__PURE__ */ (() =>\n typeof globalThis === 'object'\n ? globalThis\n /**\n * globalThis pollyfill\n * @see {@link https://mathiasbynens.be/notes/globalthis}\n * @see {@link https://github.com/ungap/global-this}\n */\n : (() => {\n // @ts-expect-error - globalThis pollyfill for prehistoric node envs\n // eslint-disable-next-line\n !(function (Object) {function get() {const e = this || self; e.globalThis = e, delete Object.prototype._T_;}'object' != typeof globalThis && (this ? get() : (Object.defineProperty(Object.prototype, '_T_', {configurable:!0, get:get}), _T_));}(Object));\n // just in case\n return typeof globalThis === 'object' ? globalThis : {};\n })()\n)() as GlobalThis;\n\n\n/**\n * command-line arguments (pure/iffe wrapped so we can shake the tree)\n * @see {@link https://nodejs.org/api/process.html#processargv|process.argv - Node.js}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|scriptArgs - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#scriptargs|scriptArgs - QuickJS-NG}\n * @see {@link https://docs.deno.com/api/node/process/~/Process#property_argv|process.argv - Deno}\n * @see {@link https://docs.deno.com/api/deno/~/Deno.CommandOptions#property_args|Deno.args - Deno}\n */\nexport const ARGV: NodeJS.Process['argv'] = /* @__PURE__ */ (() =>\n typeof process === 'undefined'\n /** quickJs {@link https://bellard.org/quickjs/quickjs.html#Global-objects} */\n ? typeof scriptArgs !== 'undefined'\n ? scriptArgs\n : []\n : ((GLOBAL_THIS as never)?.['Deno']\n // @NOTE: DENO.args does not require any perm requests\n // @NOTE: if --allow-all is used, no args (like --allow-env), use default\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ? (GLOBAL_THIS as never)?.['Deno']?.args\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ?? (process['args']?.length ? process['args'] : process['argv'])\n : process['argv']\n ) ?? []\n)();\nexport const ARGS = ARGV;\n\n/**\n * process environment (ENV) variables\n * @see {@link https://nodejs.org/api/process.html#processenv|process.env - Node.js}\n * @see {@link https://docs.deno.com/runtime/reference/env_variables/#built-in-deno.env|env - Deno}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|getenviron - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}\n */\nexport const ENV = /* @__PURE__ */ (() => typeof process === 'undefined'\n // @ts-expect-error quickjs std\n ? typeof (GLOBAL_THIS as never)?.['std']?.getenviron === 'function'\n // @ts-expect-error quickjs std\n ? ((GLOBAL_THIS as never)['std'].getenviron?.() ?? {})\n : {}\n : (!(GLOBAL_THIS as never)?.['Deno']\n ? process['env']\n : (() => {\n try {\n // @NOTE: if --allow-all is used, no toObject (like --allow-env), use default\n // @NOTE: DENO.env.toObject only requires one perm request while process requires many\n // @ts-expect-error deno perms\n // eslint-disable-next-line @stylistic/max-len\n return (GLOBAL_THIS as never)?.['Deno']?.env?.toObject?.() ?? (process['env']?.toObject ? process['env']?.toObject() : process['env']);\n } catch (_err) { /* ignore */ }\n return {};\n })())\n)() as ProcessEnv;\n"],
5
- "mappings": ";AAUO,IAAM,cAA+B,uBAC1C,OAAO,eAAe,WAClB,cAMC,MAAM;AAGP,IAAE,SAAUA,SAAQ;AAAC,aAAS,MAAM;AAAC,YAAM,IAAI,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n * globalThis object - with pollyfil in case of prehistoric node <12\n * @see {@link https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis|globalThis spec - ECMAScript }\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis|globalThis docs - MDN}\n */\nexport const GLOBAL_THIS = /* @__PURE__ */ (() =>\n typeof globalThis === 'object'\n ? globalThis\n /**\n * globalThis pollyfill\n * @see {@link https://mathiasbynens.be/notes/globalthis}\n * @see {@link https://github.com/ungap/global-this}\n */\n : (() => {\n // @ts-expect-error - globalThis pollyfill for prehistoric node envs\n // eslint-disable-next-line\n !(function (Object) {function get() {const e = this || self; e.globalThis = e, delete Object.prototype._T_;}'object' != typeof globalThis && (this ? get() : (Object.defineProperty(Object.prototype, '_T_', {configurable:!0, get:get}), _T_));}(Object));\n // just in case\n return typeof globalThis === 'object' ? globalThis : {};\n })()\n)() as GlobalThis;\n\n\n/**\n * command-line arguments (pure/iffe wrapped so we can shake the tree)\n * @see {@link https://nodejs.org/api/process.html#processargv|process.argv - Node.js}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|scriptArgs - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#scriptargs|scriptArgs - QuickJS-NG}\n * @see {@link https://docs.deno.com/api/node/process/~/Process#property_argv|process.argv - Deno}\n * @see {@link https://docs.deno.com/api/deno/~/Deno.CommandOptions#property_args|Deno.args - Deno}\n */\nexport const ARGV: NodeJS.Process['argv'] = /* @__PURE__ */ (() =>\n typeof process === 'undefined'\n /** quickJs {@link https://bellard.org/quickjs/quickjs.html#Global-objects} */\n ? typeof scriptArgs !== 'undefined'\n ? scriptArgs\n : []\n : ((GLOBAL_THIS as never)?.['Deno']\n // @NOTE: DENO.args does not require any perm requests\n // @NOTE: if --allow-all is used, no args (like --allow-env), use default\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ? (GLOBAL_THIS as never)?.['Deno']?.args\n // @ts-expect-error deno uses 'args' rather than 'argv'\n ?? (process['args']?.length ? process['args'] : process['argv'])\n : process['argv']\n ) ?? []\n)();\nexport const ARGS = ARGV;\n\n/**\n * process environment (ENV) variables\n * @see {@link https://nodejs.org/api/process.html#processenv|process.env - Node.js}\n * @see {@link https://docs.deno.com/runtime/reference/env_variables/#built-in-deno.env|env - Deno}\n * @see {@link https://bellard.org/quickjs/quickjs.html#Global-objects|getenviron - QuickJS}\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib#getenviron|getenviron - QuickJS-NG}\n */\nexport const ENV = /* @__PURE__ */ (() => typeof process === 'undefined'\n // @ts-expect-error quickjs std\n ? typeof (GLOBAL_THIS as never)?.['std']?.getenviron === 'function'\n // @ts-expect-error quickjs std -> only works via 'qjs --std --module <file>'\n // if 'qjs --std --compile <file>'; 'getenviron' is only accessible via: import * as std from 'qjs:std'\n ? ((GLOBAL_THIS as never)['std'].getenviron?.() ?? {})\n : {}\n : (!(GLOBAL_THIS as never)?.['Deno']\n ? process['env']\n : (() => {\n try {\n // @NOTE: if --allow-all is used, no toObject (like --allow-env), use default\n // @NOTE: DENO.env.toObject only requires one perm request while process requires many\n // @ts-expect-error deno perms\n // eslint-disable-next-line @stylistic/max-len\n return (GLOBAL_THIS as never)?.['Deno']?.env?.toObject?.() ?? (process['env']?.toObject ? process['env']?.toObject() : process['env']);\n } catch (_err) { /* ignore */ }\n return {};\n })())\n)() as ProcessEnv;\n\n\n/**\n * detects if running in the Bun runtime\n * @see {@link https://bun.sh/docs/api/globals|Bun globals}\n */\nexport const IS_BUN: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['Bun']\n)();\n\n\n/**\n * detects if running in the Deno runtime\n * @see {@link https://docs.deno.com/api/deno/~/Deno|Deno}\n */\nexport const IS_DENO: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['Deno']\n)();\n\n\n/**\n * detects if running in the QuickJs runtime\n * @see {@link https://quickjs-ng.github.io/quickjs/stdlib/#globals}\n */\nexport const IS_QUICKJS: boolean = /* @__PURE__ */ (() =>\n typeof scriptArgs !== 'undefined'\n)();\n\n\n/**\n * detects if running in Node.js\n * @see {@link https://nodejs.org/api/process.html#processversions|process.versions docs}\n */\nexport const IS_NODE: boolean = /* @__PURE__ */ (() =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !IS_BUN && !IS_DENO && !!(GLOBAL_THIS as any)?.['process']?.versions?.node\n)();\n\n\n/**\n * detects if running inside Cloudflare Workers\n * - Workers expose 'WebSocketPair' and lack 'navigator'\n * @see {@link https://developers.cloudflare.com/workers/runtime-apis/websockets}\n */\nexport const IS_CLOUDFLARE_WORKER: boolean = /* @__PURE__ */ (() =>\n typeof (GLOBAL_THIS as never)?.['WebSocketPair'] === 'function'\n && typeof (GLOBAL_THIS as never)?.['navigator'] === 'undefined'\n)();\n\n\n/**\n * detects if running inside Vercel Edge\n * @see {@link https://vercel.com/docs/functions/runtimes/edge#check-if-you're-running-on-the-edge-runtime}\n */\nexport const IS_VERCEL_EDGE: boolean = /* @__PURE__ */ (() =>\n !!(GLOBAL_THIS as never)?.['EdgeRuntime']\n)();\n"],
5
+ "mappings": ";AAUO,IAAM,cAA+B,uBAC1C,OAAO,eAAe,WAClB,cAMC,MAAM;AAGP,IAAE,SAAUA,SAAQ;AAAC,aAAS,MAAM;AAAC,YAAM,IAAI,QAAQ;AAAM,QAAE,aAAa,GAAG,OAAOA,QAAO,UAAU;AAAA,IAAI;AAAC,gBAAY,OAAO,eAAe,OAAO,IAAI,KAAKA,QAAO,eAAeA,QAAO,WAAW,OAAO,EAAC,cAAa,MAAI,IAAO,CAAC,GAAG;AAAA,EAAM,GAAE,MAAM;AAExP,SAAO,OAAO,eAAe,WAAW,aAAa,CAAC;AACxD,GAAG,GACL;AAWK,IAAM,OAAgD,uBAAG;AApChE;AAqCE,gBAAO,YAAY,cAEf,OAAO,eAAe,cACpB,aACA,CAAC,KACD,iDAAwB,YAIvB,sDAAwB,YAAxB,mBAAiC,SAAjC,cAE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-1,6 +1,6 @@
1
1
  {
2
2
  "name": "globables",
3
- "version": "3.0.0",
3
+ "version": "3.2.1",
4
4
  "description": "CLI/ENV constants for Node.js-like runtimes, supports: Node.js, Deno, Bun, QuickJS, and QuickJS-NG",
5
5
  "homepage": "https://github.com/fetchTe/globables",
6
6
  "license": "MIT",
@@ -16,16 +16,16 @@
16
16
  },
17
17
  "dependencies": {},
18
18
  "devDependencies": {
19
- "@eslint/js": "9.36.0",
20
- "@stylistic/eslint-plugin": "5.4.0",
21
- "@types/bun": "1.2.22",
19
+ "@eslint/js": "9.39.2",
20
+ "@stylistic/eslint-plugin": "5.7.0",
21
+ "@types/bun": "1.3.5",
22
22
  "@types/eslint": "9.6.1",
23
- "@types/node": "24.5.2",
24
- "@typescript-eslint/parser": "8.44.1",
25
- "esbuild": "0.25.10",
26
- "eslint": "9.36.0",
27
- "typescript": "5.9.2",
28
- "typescript-eslint": "8.44.1"
23
+ "@types/node": "25.0.6",
24
+ "@typescript-eslint/parser": "8.52.0",
25
+ "esbuild": "0.27.2",
26
+ "eslint": "9.39.2",
27
+ "typescript": "5.9.3",
28
+ "typescript-eslint": "8.52.0"
29
29
  },
30
30
  "exports": {
31
31
  ".": {