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 CHANGED
@@ -1,20 +1,20 @@
1
- # taon-core ( tnp-core )
2
-
3
- - Part of [taon.dev](https://github.com/darekf77/taon)
4
- - JavasScript/Typescript most essential helpers
5
- - Basic taon releated helpers
6
- - Purpose:
7
- + lightweight most essential helpers library
8
- + crossplatform helpers for NodeJs/Browser
9
-
10
-
11
- ## Usage
12
- - in taon isomorphic libs/apps or any NodeJS apps/libs:
13
- ```ts
14
- import { Helpers } from 'tnp-core';
15
- ```
16
-
17
- - in any frontend browser apps (except taon libs/apps)
18
- ```ts
19
- import { Helpers } from 'tnp-core/browser';
20
- ```
1
+ # taon-core ( tnp-core )
2
+
3
+ - Part of [taon.dev](https://github.com/darekf77/taon)
4
+ - JavasScript/Typescript most essential helpers
5
+ - Basic taon releated helpers
6
+ - Purpose:
7
+ + lightweight most essential helpers library
8
+ + crossplatform helpers for NodeJs/Browser
9
+
10
+
11
+ ## Usage
12
+ - in taon isomorphic libs/apps or any NodeJS apps/libs:
13
+ ```ts
14
+ import { Helpers } from 'tnp-core';
15
+ ```
16
+
17
+ - in any frontend browser apps (except taon libs/apps)
18
+ ```ts
19
+ import { Helpers } from 'tnp-core/browser';
20
+ ```
package/browser/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # MyLib
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
- > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -2377,28 +2377,19 @@ var UtilsOs;
2377
2377
  * Electron backend or browser.
2378
2378
  */
2379
2379
  UtilsOs.isRunningInElectron = () => {
2380
- if (UtilsOs.isRunningInSSRMode()) {
2381
- return false; // no ssr for electron
2382
- }
2383
- // Renderer process
2384
- // @ts-ignore
2385
- if (typeof window !== 'undefined' &&
2386
- typeof window.process === 'object' &&
2387
- // @ts-ignore
2388
- window.process.type === 'renderer') {
2380
+ // Electron main or renderer (most reliable)
2381
+ if (typeof process !== 'undefined' && process?.versions?.electron) {
2389
2382
  return true;
2390
2383
  }
2391
- // Main process
2392
- // @ts-ignore
2393
- if (typeof process !== 'undefined' &&
2394
- typeof process.versions === 'object' &&
2395
- !!process.versions.electron) {
2384
+ // Renderer with nodeIntegration
2385
+ if (typeof globalThis !== 'undefined' &&
2386
+ globalThis?.process?.type === 'renderer') {
2396
2387
  return true;
2397
2388
  }
2398
- // Detect the user agent when the `nodeIntegration` option is set to false
2389
+ // Renderer with nodeIntegration disabled
2399
2390
  if (typeof navigator === 'object' &&
2400
2391
  typeof navigator.userAgent === 'string' &&
2401
- navigator.userAgent.indexOf('Electron') >= 0) {
2392
+ /Electron/i.test(navigator.userAgent)) {
2402
2393
  return true;
2403
2394
  }
2404
2395
  return false;
@@ -2672,6 +2663,12 @@ var UtilsOs;
2672
2663
  /* */
2673
2664
  /* */
2674
2665
  /* */
2666
+ /* */
2667
+ /* */
2668
+ /* */
2669
+ /* */
2670
+ /* */
2671
+ /* */
2675
2672
  return (void 0);
2676
2673
  };
2677
2674
  //#endregion
@@ -3397,6 +3394,7 @@ var UtilsJson;
3397
3394
  //#endregion
3398
3395
  })(UtilsJson || (UtilsJson = {}));
3399
3396
  //#endregion
3397
+ //#region utils yaml
3400
3398
  var UtilsYaml;
3401
3399
  (function (UtilsYaml) {
3402
3400
  UtilsYaml.yamlToJson = (yamlString) => {
@@ -3454,6 +3452,7 @@ var UtilsYaml;
3454
3452
  };
3455
3453
  //#endregion
3456
3454
  })(UtilsYaml || (UtilsYaml = {}));
3455
+ //#endregion
3457
3456
 
3458
3457
  class HelpersIsomorphic {
3459
3458
  /**