tnp-core 19.0.50 → 19.0.52
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 +20 -20
- package/browser/README.md +24 -24
- package/browser/fesm2022/tnp-core.mjs +15 -16
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/cli.backend.js +2 -2
- package/lib/build-info._auto-generated_.d.ts +2 -1
- package/lib/build-info._auto-generated_.js +3 -2
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/helpers-messages.js.map +1 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.js +2 -2
- package/lib/utils.js +23 -20
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +33 -0
- package/websql/README.md +24 -24
- package/websql/fesm2022/tnp-core.mjs +15 -16
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/package.json +1 -1
@@ -2378,28 +2378,19 @@ var UtilsOs;
|
|
2378
2378
|
* Electron backend or browser.
|
2379
2379
|
*/
|
2380
2380
|
UtilsOs.isRunningInElectron = () => {
|
2381
|
-
|
2382
|
-
|
2383
|
-
}
|
2384
|
-
// Renderer process
|
2385
|
-
// @ts-ignore
|
2386
|
-
if (typeof window !== 'undefined' &&
|
2387
|
-
typeof window.process === 'object' &&
|
2388
|
-
// @ts-ignore
|
2389
|
-
window.process.type === 'renderer') {
|
2381
|
+
// Electron main or renderer (most reliable)
|
2382
|
+
if (typeof process !== 'undefined' && process?.versions?.electron) {
|
2390
2383
|
return true;
|
2391
2384
|
}
|
2392
|
-
//
|
2393
|
-
|
2394
|
-
|
2395
|
-
typeof process.versions === 'object' &&
|
2396
|
-
!!process.versions.electron) {
|
2385
|
+
// Renderer with nodeIntegration
|
2386
|
+
if (typeof globalThis !== 'undefined' &&
|
2387
|
+
globalThis?.process?.type === 'renderer') {
|
2397
2388
|
return true;
|
2398
2389
|
}
|
2399
|
-
//
|
2390
|
+
// Renderer with nodeIntegration disabled
|
2400
2391
|
if (typeof navigator === 'object' &&
|
2401
2392
|
typeof navigator.userAgent === 'string' &&
|
2402
|
-
navigator.userAgent
|
2393
|
+
/Electron/i.test(navigator.userAgent)) {
|
2403
2394
|
return true;
|
2404
2395
|
}
|
2405
2396
|
return false;
|
@@ -2673,6 +2664,12 @@ var UtilsOs;
|
|
2673
2664
|
/* */
|
2674
2665
|
/* */
|
2675
2666
|
/* */
|
2667
|
+
/* */
|
2668
|
+
/* */
|
2669
|
+
/* */
|
2670
|
+
/* */
|
2671
|
+
/* */
|
2672
|
+
/* */
|
2676
2673
|
return (void 0);
|
2677
2674
|
};
|
2678
2675
|
//#endregion
|
@@ -3398,6 +3395,7 @@ var UtilsJson;
|
|
3398
3395
|
//#endregion
|
3399
3396
|
})(UtilsJson || (UtilsJson = {}));
|
3400
3397
|
//#endregion
|
3398
|
+
//#region utils yaml
|
3401
3399
|
var UtilsYaml;
|
3402
3400
|
(function (UtilsYaml) {
|
3403
3401
|
UtilsYaml.yamlToJson = (yamlString) => {
|
@@ -3455,6 +3453,7 @@ var UtilsYaml;
|
|
3455
3453
|
};
|
3456
3454
|
//#endregion
|
3457
3455
|
})(UtilsYaml || (UtilsYaml = {}));
|
3456
|
+
//#endregion
|
3458
3457
|
|
3459
3458
|
class HelpersIsomorphic {
|
3460
3459
|
/**
|