@itwin/core-bentley 5.2.0-dev.8 → 5.3.0-dev.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/CHANGELOG.md +31 -1
- package/lib/cjs/ProcessDetector.d.ts +2 -0
- package/lib/cjs/ProcessDetector.d.ts.map +1 -1
- package/lib/cjs/ProcessDetector.js +2 -0
- package/lib/cjs/ProcessDetector.js.map +1 -1
- package/lib/esm/ProcessDetector.d.ts +2 -0
- package/lib/esm/ProcessDetector.d.ts.map +1 -1
- package/lib/esm/ProcessDetector.js +2 -0
- package/lib/esm/ProcessDetector.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
# Change Log - @itwin/core-bentley
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 17 Sep 2025 17:22:50 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.1.8
|
|
6
|
+
Wed, 17 Sep 2025 17:17:16 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.1.7
|
|
11
|
+
Tue, 09 Sep 2025 19:28:04 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 5.1.6
|
|
16
|
+
Mon, 08 Sep 2025 13:53:47 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 5.1.5
|
|
21
|
+
Thu, 04 Sep 2025 13:51:08 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 5.1.4
|
|
26
|
+
Fri, 22 Aug 2025 14:22:33 GMT
|
|
27
|
+
|
|
28
|
+
_Version update only_
|
|
29
|
+
|
|
30
|
+
## 5.1.3
|
|
31
|
+
Wed, 20 Aug 2025 13:57:10 GMT
|
|
32
|
+
|
|
33
|
+
_Version update only_
|
|
4
34
|
|
|
5
35
|
## 5.1.2
|
|
6
36
|
Thu, 14 Aug 2025 19:38:08 GMT
|
|
@@ -17,6 +17,8 @@ export declare class ProcessDetector {
|
|
|
17
17
|
static get isElectronAppFrontend(): boolean;
|
|
18
18
|
/** Is this process the backend of an Electron app? */
|
|
19
19
|
static get isElectronAppBackend(): boolean;
|
|
20
|
+
/** Is this process running in an Internet Explorer or old Microsoft Edge browser? */
|
|
21
|
+
static get isIEBrowser(): boolean;
|
|
20
22
|
/** Is this process running in a browser on an iPad?
|
|
21
23
|
* @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
|
|
22
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessDetector.d.ts","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,eAAe;IAE1B;;OAEG;IACH,WAAkB,gBAAgB,YAAiF;IAEnH;;MAEE;IACF,WAAkB,aAAa,YAA4E;IAE3G,uDAAuD;IACvD,WAAkB,qBAAqB,YAA0G;IAEjJ,sDAAsD;IACtD,WAAkB,oBAAoB,YAAyF;IAE/H;;OAEG;IACH,WAAkB,aAAa,YAE9B;IAED;;OAEG;IACH,WAAkB,eAAe,YAA2F;IAE5H;;MAEE;IACF,WAAkB,YAAY,YAAyD;IAEvF;;MAEE;IACF,WAAkB,gBAAgB,YAAmF;IAErH;;MAEE;IACF,WAAkB,eAAe,YAAyD;IAE1F,oGAAoG;IACpG,WAAkB,UAAU,YAE3B;IAED;;;OAGG;IACH,WAAkB,mBAAmB,YAAiE;IAEtG,iEAAiE;IACjE,WAAkB,gBAAgB,YAA2F;IAE7H,qEAAqE;IACrE,WAAkB,oBAAoB,YAA+F;IAErI,gEAAgE;IAChE,WAAkB,eAAe,YAAwE;IAEzG,oEAAoE;IACpE,WAAkB,mBAAmB,YAA4E;IAEjH,6CAA6C;IAC7C,WAAkB,kBAAkB,YAA+D;IAEnG,yEAAyE;IACzE,WAAkB,mBAAmB,YAAqE;CAC3G"}
|
|
1
|
+
{"version":3,"file":"ProcessDetector.d.ts","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,eAAe;IAE1B;;OAEG;IACH,WAAkB,gBAAgB,YAAiF;IAEnH;;MAEE;IACF,WAAkB,aAAa,YAA4E;IAE3G,uDAAuD;IACvD,WAAkB,qBAAqB,YAA0G;IAEjJ,sDAAsD;IACtD,WAAkB,oBAAoB,YAAyF;IAE/H,qFAAqF;IACrF,WAAkB,WAAW,YAA+E;IAE5G;;OAEG;IACH,WAAkB,aAAa,YAE9B;IAED;;OAEG;IACH,WAAkB,eAAe,YAA2F;IAE5H;;MAEE;IACF,WAAkB,YAAY,YAAyD;IAEvF;;MAEE;IACF,WAAkB,gBAAgB,YAAmF;IAErH;;MAEE;IACF,WAAkB,eAAe,YAAyD;IAE1F,oGAAoG;IACpG,WAAkB,UAAU,YAE3B;IAED;;;OAGG;IACH,WAAkB,mBAAmB,YAAiE;IAEtG,iEAAiE;IACjE,WAAkB,gBAAgB,YAA2F;IAE7H,qEAAqE;IACrE,WAAkB,oBAAoB,YAA+F;IAErI,gEAAgE;IAChE,WAAkB,eAAe,YAAwE;IAEzG,oEAAoE;IACpE,WAAkB,mBAAmB,YAA4E;IAEjH,6CAA6C;IAC7C,WAAkB,kBAAkB,YAA+D;IAEnG,yEAAyE;IACzE,WAAkB,mBAAmB,YAAqE;CAC3G"}
|
|
@@ -24,6 +24,8 @@ class ProcessDetector {
|
|
|
24
24
|
static get isElectronAppFrontend() { return typeof navigator === "object" && navigator.userAgent.toLowerCase().indexOf("electron") >= 0; }
|
|
25
25
|
/** Is this process the backend of an Electron app? */
|
|
26
26
|
static get isElectronAppBackend() { return typeof process === "object" && process.versions.hasOwnProperty("electron"); }
|
|
27
|
+
/** Is this process running in an Internet Explorer or old Microsoft Edge browser? */
|
|
28
|
+
static get isIEBrowser() { return !!document.documentMode || !!window.StyleMedia; }
|
|
27
29
|
/** Is this process running in a browser on an iPad?
|
|
28
30
|
* @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
|
|
29
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,MAAa,eAAe;IAE1B;;OAEG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC;IAEnH;;MAEE;IACK,MAAM,KAAK,aAAa,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE3G,uDAAuD;IAChD,MAAM,KAAK,qBAAqB,KAAK,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEjJ,sDAAsD;IAC/C,MAAM,KAAK,oBAAoB,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/H;;OAEG;IACI,MAAM,KAAK,aAAa;QAC7B,OAAO,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,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(c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ProcessDetector\n */\n\n/** Functions to determine the type of JavaScript process currently executing.\n * @public\n */\nexport class ProcessDetector {\n\n /** Is this a browser process?\n * @note this method will also return `true` for the frontend of Electron or Mobile apps. They *are* browser processes.\n */\n public static get isBrowserProcess() { return typeof window === \"object\" && typeof window.navigator === \"object\"; }\n\n /** Is this a Node process?\n * @note this means \"is this a backend process\"? It will return `true` for all backend process, including Electron and mobile apps.\n */\n public static get isNodeProcess() { return typeof process === \"object\" && undefined !== process.platform; }\n\n /** Is this process the frontend of an Electron app? */\n public static get isElectronAppFrontend() { return typeof navigator === \"object\" && navigator.userAgent.toLowerCase().indexOf(\"electron\") >= 0; }\n\n /** Is this process the backend of an Electron app? */\n public static get isElectronAppBackend() { return typeof process === \"object\" && process.versions.hasOwnProperty(\"electron\"); }\n\n /** Is this process running in an Internet Explorer or old Microsoft Edge browser? */\n public static get isIEBrowser() { return !!(document as any).documentMode || !!(window as any).StyleMedia; }\n\n /** Is this process running in a browser on an iPad?\n * @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPadBrowser() {\n return this.isBrowserProcess && window.navigator.platform === \"iPad\" || (window.navigator.platform === \"MacIntel\" && window.navigator.maxTouchPoints > 0 && !(\"MSStream\" in window)); /* eslint-disable-line @typescript-eslint/no-deprecated */\n }\n\n /** Is this process running in a browser on an iPhone?\n * @note This method will return `true` for any frontend running on an iPhone, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPhoneBrowser() { return this.isBrowserProcess && (/(iphone|ipod)/i.test(window.navigator.userAgent)); }\n\n /** Is this process running in a browser on an iOS device?\n * @note This method will return `true` for any frontend running on an iOS device, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIOSBrowser() { return this.isIPadBrowser || this.isIPhoneBrowser; }\n\n /** Is this process running in a browser on an Android device?\n * @note This method will return `true` for any frontend running on an Android device, whether it is a user-launched web browser (e.g. Chrome) or the frontend of a mobile app.\n */\n public static get isAndroidBrowser() { return this.isBrowserProcess && /android/i.test(window.navigator.userAgent); }\n\n /** Is this process running in a browser on a mobile device?\n * @note This method will return `true` for any frontend running on a mobile device, whether it is a user-launched web browser or the frontend of a mobile app.\n */\n public static get isMobileBrowser() { return this.isIOSBrowser || this.isAndroidBrowser; }\n\n /** Is this process running in a Chromium based browser (Chrome / new Edge / Electron front end)? */\n public static get isChromium() {\n return (this.isBrowserProcess && window.navigator.userAgent.indexOf(\"Chrome\") > -1 && window.navigator.userAgent.indexOf(\"OP\") === -1) || this.isElectronAppFrontend;\n }\n\n /** Is this process the frontend of an iTwin mobile application?\n * @note this indicates that this is a browser process started by an iTwin mobile application.\n * It will return `false` when running user-launched web browsers on a mobile device.\n */\n public static get isMobileAppFrontend() { return this.isAndroidAppFrontend || this.isIOSAppFrontend; }\n\n /** Is this process the frontend of an iOS mobile application? */\n public static get isIOSAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=ios\") !== -1; }\n\n /** Is this process the frontend of an Android mobile application? */\n public static get isAndroidAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=android\") !== -1; }\n\n /** Is this process the backend of an iOS mobile application? */\n public static get isIOSAppBackend() { return this.isNodeProcess && (process.platform as any) === \"ios\"; }\n\n /** Is this process the backend of an Android mobile application? */\n public static get isAndroidAppBackend() { return this.isNodeProcess && (process.platform as any) === \"android\"; }\n\n /** Is this process a mobile app backend? */\n public static get isMobileAppBackend() { return this.isIOSAppBackend || this.isAndroidAppBackend; }\n\n /** Is this process the frontend of a native (Electron or Mobile) app? */\n public static get isNativeAppFrontend() { return this.isElectronAppFrontend || this.isMobileAppFrontend; }\n}\n"]}
|
|
@@ -17,6 +17,8 @@ export declare class ProcessDetector {
|
|
|
17
17
|
static get isElectronAppFrontend(): boolean;
|
|
18
18
|
/** Is this process the backend of an Electron app? */
|
|
19
19
|
static get isElectronAppBackend(): boolean;
|
|
20
|
+
/** Is this process running in an Internet Explorer or old Microsoft Edge browser? */
|
|
21
|
+
static get isIEBrowser(): boolean;
|
|
20
22
|
/** Is this process running in a browser on an iPad?
|
|
21
23
|
* @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
|
|
22
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessDetector.d.ts","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,eAAe;IAE1B;;OAEG;IACH,WAAkB,gBAAgB,YAAiF;IAEnH;;MAEE;IACF,WAAkB,aAAa,YAA4E;IAE3G,uDAAuD;IACvD,WAAkB,qBAAqB,YAA0G;IAEjJ,sDAAsD;IACtD,WAAkB,oBAAoB,YAAyF;IAE/H;;OAEG;IACH,WAAkB,aAAa,YAE9B;IAED;;OAEG;IACH,WAAkB,eAAe,YAA2F;IAE5H;;MAEE;IACF,WAAkB,YAAY,YAAyD;IAEvF;;MAEE;IACF,WAAkB,gBAAgB,YAAmF;IAErH;;MAEE;IACF,WAAkB,eAAe,YAAyD;IAE1F,oGAAoG;IACpG,WAAkB,UAAU,YAE3B;IAED;;;OAGG;IACH,WAAkB,mBAAmB,YAAiE;IAEtG,iEAAiE;IACjE,WAAkB,gBAAgB,YAA2F;IAE7H,qEAAqE;IACrE,WAAkB,oBAAoB,YAA+F;IAErI,gEAAgE;IAChE,WAAkB,eAAe,YAAwE;IAEzG,oEAAoE;IACpE,WAAkB,mBAAmB,YAA4E;IAEjH,6CAA6C;IAC7C,WAAkB,kBAAkB,YAA+D;IAEnG,yEAAyE;IACzE,WAAkB,mBAAmB,YAAqE;CAC3G"}
|
|
1
|
+
{"version":3,"file":"ProcessDetector.d.ts","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,eAAe;IAE1B;;OAEG;IACH,WAAkB,gBAAgB,YAAiF;IAEnH;;MAEE;IACF,WAAkB,aAAa,YAA4E;IAE3G,uDAAuD;IACvD,WAAkB,qBAAqB,YAA0G;IAEjJ,sDAAsD;IACtD,WAAkB,oBAAoB,YAAyF;IAE/H,qFAAqF;IACrF,WAAkB,WAAW,YAA+E;IAE5G;;OAEG;IACH,WAAkB,aAAa,YAE9B;IAED;;OAEG;IACH,WAAkB,eAAe,YAA2F;IAE5H;;MAEE;IACF,WAAkB,YAAY,YAAyD;IAEvF;;MAEE;IACF,WAAkB,gBAAgB,YAAmF;IAErH;;MAEE;IACF,WAAkB,eAAe,YAAyD;IAE1F,oGAAoG;IACpG,WAAkB,UAAU,YAE3B;IAED;;;OAGG;IACH,WAAkB,mBAAmB,YAAiE;IAEtG,iEAAiE;IACjE,WAAkB,gBAAgB,YAA2F;IAE7H,qEAAqE;IACrE,WAAkB,oBAAoB,YAA+F;IAErI,gEAAgE;IAChE,WAAkB,eAAe,YAAwE;IAEzG,oEAAoE;IACpE,WAAkB,mBAAmB,YAA4E;IAEjH,6CAA6C;IAC7C,WAAkB,kBAAkB,YAA+D;IAEnG,yEAAyE;IACzE,WAAkB,mBAAmB,YAAqE;CAC3G"}
|
|
@@ -21,6 +21,8 @@ export class ProcessDetector {
|
|
|
21
21
|
static get isElectronAppFrontend() { return typeof navigator === "object" && navigator.userAgent.toLowerCase().indexOf("electron") >= 0; }
|
|
22
22
|
/** Is this process the backend of an Electron app? */
|
|
23
23
|
static get isElectronAppBackend() { return typeof process === "object" && process.versions.hasOwnProperty("electron"); }
|
|
24
|
+
/** Is this process running in an Internet Explorer or old Microsoft Edge browser? */
|
|
25
|
+
static get isIEBrowser() { return !!document.documentMode || !!window.StyleMedia; }
|
|
24
26
|
/** Is this process running in a browser on an iPad?
|
|
25
27
|
* @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
|
|
26
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,OAAO,eAAe;IAE1B;;OAEG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC;IAEnH;;MAEE;IACK,MAAM,KAAK,aAAa,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE3G,uDAAuD;IAChD,MAAM,KAAK,qBAAqB,KAAK,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEjJ,sDAAsD;IAC/C,MAAM,KAAK,oBAAoB,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/H;;OAEG;IACI,MAAM,KAAK,aAAa;QAC7B,OAAO,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,0DAA0D;IAClP,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,eAAe,KAAK,OAAO,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CA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ErI,gEAAgE;IACzD,MAAM,KAAK,eAAe,KAAK,OAAO,IAAI,CAAC,aAAa,IAAK,OAAO,CAAC,QAAgB,KAAK,KAAK,CAAC,CAAC,CAAC;IAEzG,oEAAoE;IAC7D,MAAM,KAAK,mBAAmB,KAAK,OAAO,IAAI,CAAC,aAAa,IAAK,OAAO,CAAC,QAAgB,KAAK,SAAS,CAAC,CAAC,CAAC;IAEjH,6CAA6C;IACtC,MAAM,KAAK,kBAAkB,KAAK,OAAO,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAEnG,yEAAyE;IAClE,MAAM,KAAK,mBAAmB,KAAK,OAAO,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;CAC3G","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ProcessDetector\n */\n\n/** Functions to determine the type of JavaScript process currently executing.\n * @public\n */\nexport class ProcessDetector {\n\n /** Is this a browser process?\n * @note this method will also return `true` for the frontend of Electron or Mobile apps. They *are* browser processes.\n */\n public static get isBrowserProcess() { return typeof window === \"object\" && typeof window.navigator === \"object\"; }\n\n /** Is this a Node process?\n * @note this means \"is this a backend process\"? It will return `true` for all backend process, including Electron and mobile apps.\n */\n public static get isNodeProcess() { return typeof process === \"object\" && undefined !== process.platform; }\n\n /** Is this process the frontend of an Electron app? */\n public static get isElectronAppFrontend() { return typeof navigator === \"object\" && navigator.userAgent.toLowerCase().indexOf(\"electron\") >= 0; }\n\n /** Is this process the backend of an Electron app? */\n public static get isElectronAppBackend() { return typeof process === \"object\" && process.versions.hasOwnProperty(\"electron\"); }\n\n /** Is this process running in a browser on an iPad?\n * @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPadBrowser() {\n return this.isBrowserProcess && window.navigator.platform === \"iPad\" || (window.navigator.platform === \"MacIntel\" && window.navigator.maxTouchPoints > 0 && !(\"MSStream\" in window)); /* eslint-disable-line @typescript-eslint/no-deprecated */\n }\n\n /** Is this process running in a browser on an iPhone?\n * @note This method will return `true` for any frontend running on an iPhone, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPhoneBrowser() { return this.isBrowserProcess && (/(iphone|ipod)/i.test(window.navigator.userAgent)); }\n\n /** Is this process running in a browser on an iOS device?\n * @note This method will return `true` for any frontend running on an iOS device, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIOSBrowser() { return this.isIPadBrowser || this.isIPhoneBrowser; }\n\n /** Is this process running in a browser on an Android device?\n * @note This method will return `true` for any frontend running on an Android device, whether it is a user-launched web browser (e.g. Chrome) or the frontend of a mobile app.\n */\n public static get isAndroidBrowser() { return this.isBrowserProcess && /android/i.test(window.navigator.userAgent); }\n\n /** Is this process running in a browser on a mobile device?\n * @note This method will return `true` for any frontend running on a mobile device, whether it is a user-launched web browser or the frontend of a mobile app.\n */\n public static get isMobileBrowser() { return this.isIOSBrowser || this.isAndroidBrowser; }\n\n /** Is this process running in a Chromium based browser (Chrome / new Edge / Electron front end)? */\n public static get isChromium() {\n return (this.isBrowserProcess && window.navigator.userAgent.indexOf(\"Chrome\") > -1 && window.navigator.userAgent.indexOf(\"OP\") === -1) || this.isElectronAppFrontend;\n }\n\n /** Is this process the frontend of an iTwin mobile application?\n * @note this indicates that this is a browser process started by an iTwin mobile application.\n * It will return `false` when running user-launched web browsers on a mobile device.\n */\n public static get isMobileAppFrontend() { return this.isAndroidAppFrontend || this.isIOSAppFrontend; }\n\n /** Is this process the frontend of an iOS mobile application? */\n public static get isIOSAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=ios\") !== -1; }\n\n /** Is this process the frontend of an Android mobile application? */\n public static get isAndroidAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=android\") !== -1; }\n\n /** Is this process the backend of an iOS mobile application? */\n public static get isIOSAppBackend() { return this.isNodeProcess && (process.platform as any) === \"ios\"; }\n\n /** Is this process the backend of an Android mobile application? */\n public static get isAndroidAppBackend() { return this.isNodeProcess && (process.platform as any) === \"android\"; }\n\n /** Is this process a mobile app backend? */\n public static get isMobileAppBackend() { return this.isIOSAppBackend || this.isAndroidAppBackend; }\n\n /** Is this process the frontend of a native (Electron or Mobile) app? */\n public static get isNativeAppFrontend() { return this.isElectronAppFrontend || this.isMobileAppFrontend; }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../src/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,OAAO,eAAe;IAE1B;;OAEG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC;IAEnH;;MAEE;IACK,MAAM,KAAK,aAAa,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,SAAS,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE3G,uDAAuD;IAChD,MAAM,KAAK,qBAAqB,KAAK,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEjJ,sDAAsD;IAC/C,MAAM,KAAK,oBAAoB,KAAK,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/H,qFAAqF;IAC9E,MAAM,KAAK,WAAW,KAAK,OAAO,CAAC,CAAE,QAAgB,CAAC,YAAY,IAAI,CAAC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AK,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEtG,iEAAiE;IAC1D,MAAM,KAAK,gBAAgB,KAAK,OAAO,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7H,qEAAqE;IAC9D,MAAM,KAAK,oBAAoB,KAAK,OAAO,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAErI,gEAAgE;IACzD,MAAM,KAAK,eAAe,KAAK,OAAO,IAAI,CAAC,aAAa,IAAK,OAAO,CAAC,QAAgB,KAAK,KAAK,CAAC,CAAC,CAAC;IAEzG,oEAAoE;IAC7D,MAAM,KAAK,mBAAmB,KAAK,OAAO,IAAI,CAAC,aAAa,IAAK,OAAO,CAAC,QAAgB,KAAK,SAAS,CAAC,CAAC,CAAC;IAEjH,6CAA6C;IACtC,MAAM,KAAK,kBAAkB,KAAK,OAAO,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAEnG,yEAAyE;IAClE,MAAM,KAAK,mBAAmB,KAAK,OAAO,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;CAC3G","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ProcessDetector\n */\n\n/** Functions to determine the type of JavaScript process currently executing.\n * @public\n */\nexport class ProcessDetector {\n\n /** Is this a browser process?\n * @note this method will also return `true` for the frontend of Electron or Mobile apps. They *are* browser processes.\n */\n public static get isBrowserProcess() { return typeof window === \"object\" && typeof window.navigator === \"object\"; }\n\n /** Is this a Node process?\n * @note this means \"is this a backend process\"? It will return `true` for all backend process, including Electron and mobile apps.\n */\n public static get isNodeProcess() { return typeof process === \"object\" && undefined !== process.platform; }\n\n /** Is this process the frontend of an Electron app? */\n public static get isElectronAppFrontend() { return typeof navigator === \"object\" && navigator.userAgent.toLowerCase().indexOf(\"electron\") >= 0; }\n\n /** Is this process the backend of an Electron app? */\n public static get isElectronAppBackend() { return typeof process === \"object\" && process.versions.hasOwnProperty(\"electron\"); }\n\n /** Is this process running in an Internet Explorer or old Microsoft Edge browser? */\n public static get isIEBrowser() { return !!(document as any).documentMode || !!(window as any).StyleMedia; }\n\n /** Is this process running in a browser on an iPad?\n * @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPadBrowser() {\n return this.isBrowserProcess && window.navigator.platform === \"iPad\" || (window.navigator.platform === \"MacIntel\" && window.navigator.maxTouchPoints > 0 && !(\"MSStream\" in window)); /* eslint-disable-line @typescript-eslint/no-deprecated */\n }\n\n /** Is this process running in a browser on an iPhone?\n * @note This method will return `true` for any frontend running on an iPhone, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIPhoneBrowser() { return this.isBrowserProcess && (/(iphone|ipod)/i.test(window.navigator.userAgent)); }\n\n /** Is this process running in a browser on an iOS device?\n * @note This method will return `true` for any frontend running on an iOS device, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.\n */\n public static get isIOSBrowser() { return this.isIPadBrowser || this.isIPhoneBrowser; }\n\n /** Is this process running in a browser on an Android device?\n * @note This method will return `true` for any frontend running on an Android device, whether it is a user-launched web browser (e.g. Chrome) or the frontend of a mobile app.\n */\n public static get isAndroidBrowser() { return this.isBrowserProcess && /android/i.test(window.navigator.userAgent); }\n\n /** Is this process running in a browser on a mobile device?\n * @note This method will return `true` for any frontend running on a mobile device, whether it is a user-launched web browser or the frontend of a mobile app.\n */\n public static get isMobileBrowser() { return this.isIOSBrowser || this.isAndroidBrowser; }\n\n /** Is this process running in a Chromium based browser (Chrome / new Edge / Electron front end)? */\n public static get isChromium() {\n return (this.isBrowserProcess && window.navigator.userAgent.indexOf(\"Chrome\") > -1 && window.navigator.userAgent.indexOf(\"OP\") === -1) || this.isElectronAppFrontend;\n }\n\n /** Is this process the frontend of an iTwin mobile application?\n * @note this indicates that this is a browser process started by an iTwin mobile application.\n * It will return `false` when running user-launched web browsers on a mobile device.\n */\n public static get isMobileAppFrontend() { return this.isAndroidAppFrontend || this.isIOSAppFrontend; }\n\n /** Is this process the frontend of an iOS mobile application? */\n public static get isIOSAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=ios\") !== -1; }\n\n /** Is this process the frontend of an Android mobile application? */\n public static get isAndroidAppFrontend() { return this.isBrowserProcess && window.location.hash.indexOf(\"platform=android\") !== -1; }\n\n /** Is this process the backend of an iOS mobile application? */\n public static get isIOSAppBackend() { return this.isNodeProcess && (process.platform as any) === \"ios\"; }\n\n /** Is this process the backend of an Android mobile application? */\n public static get isAndroidAppBackend() { return this.isNodeProcess && (process.platform as any) === \"android\"; }\n\n /** Is this process a mobile app backend? */\n public static get isMobileAppBackend() { return this.isIOSAppBackend || this.isAndroidAppBackend; }\n\n /** Is this process the frontend of a native (Electron or Mobile) app? */\n public static get isNativeAppFrontend() { return this.isElectronAppFrontend || this.isMobileAppFrontend; }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-bentley",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0-dev.1",
|
|
4
4
|
"description": "Bentley JavaScript core components",
|
|
5
5
|
"main": "lib/cjs/core-bentley.js",
|
|
6
6
|
"module": "lib/esm/core-bentley.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"rimraf": "^6.0.1",
|
|
31
31
|
"typescript": "~5.6.2",
|
|
32
32
|
"vitest": "^3.0.6",
|
|
33
|
-
"@itwin/build-tools": "5.
|
|
33
|
+
"@itwin/build-tools": "5.3.0-dev.1"
|
|
34
34
|
},
|
|
35
35
|
"nyc": {
|
|
36
36
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|