typescript-class-helpers 13.0.11 → 13.0.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typescript-class-helpers",
3
3
  "description": "Usefull helper to have in your typescript project",
4
- "version": "13.0.11",
4
+ "version": "13.0.12",
5
5
  "scripts": {
6
6
  "test": "mocha --require ts-node/register src/**/*.spec.ts",
7
7
  "test:watch": "mocha --compilers ts-node/register src/**/*.spec.ts --watch"
@@ -26,6 +26,6 @@
26
26
  },
27
27
  "license": "MIT",
28
28
  "private": false,
29
- "lastBuildTagHash": "6e01a0770dc8d08b9e55e3678b04bdcc10991173",
29
+ "lastBuildTagHash": "1683ec633f58eaf5d0c5544990e400e8b0b156a0",
30
30
  "devDependencies": {}
31
31
  }
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "name": "typescript-class-helpers",
47
47
  "description": "Usefull helper to have in your typescript project",
48
- "version": "13.0.11",
48
+ "version": "13.0.12",
49
49
  "scripts": {
50
50
  "test": "mocha --require ts-node/register src/**/*.spec.ts",
51
51
  "test:watch": "mocha --compilers ts-node/register src/**/*.spec.ts --watch"
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "license": "MIT",
72
72
  "private": false,
73
- "lastBuildTagHash": "6e01a0770dc8d08b9e55e3678b04bdcc10991173",
73
+ "lastBuildTagHash": "1683ec633f58eaf5d0c5544990e400e8b0b156a0",
74
74
  "devDependencies": {
75
75
  "@angular-devkit/build-angular": "~13.2.5",
76
76
  "@angular/animations": "~13.2.0",
@@ -229,7 +229,7 @@
229
229
  "mkdirp": "0.5.1",
230
230
  "mocha": "5.2.0",
231
231
  "moment": "2.22.2",
232
- "morphi": "~13.0.23",
232
+ "morphi": "~13.0.28",
233
233
  "ng-packagr": "13.0.0",
234
234
  "ng-talkback": "~13.0.9",
235
235
  "ng2-rest": "~13.0.13",
@@ -288,7 +288,7 @@
288
288
  "tslib": "~2.3.0",
289
289
  "typeorm": "~0.2.45",
290
290
  "typescript": "~4.5.2",
291
- "typescript-class-helpers": "~13.0.10",
291
+ "typescript-class-helpers": "~13.0.11",
292
292
  "typescript-formatter": "~7.2.2",
293
293
  "underscore": "1.9.1",
294
294
  "uuid": "8.3.2",
@@ -299,9 +299,9 @@
299
299
  }
300
300
  },
301
301
  "build": {
302
- "number": 216,
303
- "date": "2022-04-18T06:32:45.000Z",
304
- "hash": "1683ec633f58eaf5d0c5544990e400e8b0b156a0",
302
+ "number": 219,
303
+ "date": "2022-04-18T06:53:59.000Z",
304
+ "hash": "f6ccaabf8b999d5d1d3626ce98c2c8bd09c7d949",
305
305
  "options": {}
306
306
  },
307
307
  "currentProjectName": "typescript-class-helpers",
@@ -1,19 +0,0 @@
1
- declare global {
2
- namespace NodeJS {
3
- interface Global {
4
- tnp_normal_mode: boolean;
5
- muteMessages: boolean;
6
- testMode: boolean;
7
- hideWarnings: boolean;
8
- hideInfos: boolean;
9
- hideLog: boolean;
10
- tnpShowProgress?: boolean;
11
- tnpNonInteractive?: boolean;
12
- tnpNoColorsMode?: boolean;
13
- }
14
- }
15
- }
16
- export declare function error(details: any, noExit?: boolean, noTrace?: boolean): void;
17
- export declare function info(details: string): void;
18
- export declare function log(details: string): void;
19
- export declare function warn(details: string, trace?: boolean): void;
@@ -1,120 +0,0 @@
1
- /* @fixed */ "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.warn = exports.log = exports.info = exports.error = void 0;
4
- //#region @backend
5
- var tnp_cli_1 = require("tnp-cli");
6
- //#endregion
7
- var tnp_core_1 = require("tnp-core");
8
- function error(details, noExit, noTrace) {
9
- if (noExit === void 0) { noExit = false; }
10
- if (noTrace === void 0) { noTrace = false; }
11
- if (tnp_core_1.Helpers.isBrowser) {
12
- console.error(details);
13
- return;
14
- }
15
- //#region @backend
16
- // Error.stackTraceLimit = Infinity;
17
- if (!global.tnp_normal_mode) {
18
- noTrace = true;
19
- }
20
- if (typeof details === 'object') {
21
- try {
22
- var json = JSON.stringify(details);
23
- if (global.tnp_normal_mode) {
24
- if (noTrace) {
25
- !global.muteMessages && console.log(tnp_cli_1.CLI.chalk.red(json));
26
- }
27
- else {
28
- !global.muteMessages && console.trace(tnp_cli_1.CLI.chalk.red(json));
29
- }
30
- }
31
- else {
32
- console.log(json);
33
- return;
34
- }
35
- }
36
- catch (error) {
37
- if (global.tnp_normal_mode) {
38
- if (noTrace) {
39
- !global.muteMessages && console.log(details);
40
- }
41
- else {
42
- !global.muteMessages && console.trace(details);
43
- }
44
- }
45
- else {
46
- console.log(details);
47
- return;
48
- }
49
- }
50
- }
51
- else {
52
- if (global.tnp_normal_mode) {
53
- if (noTrace) {
54
- !global.muteMessages && console.log(tnp_cli_1.CLI.chalk.red(details));
55
- }
56
- else {
57
- !global.muteMessages && console.trace(tnp_cli_1.CLI.chalk.red(details));
58
- }
59
- }
60
- else {
61
- console.log(details);
62
- return;
63
- }
64
- }
65
- if (global[config.message.tnp_normal_mode]) {
66
- if (!noExit) {
67
- process.exit(1);
68
- }
69
- }
70
- //#endregion
71
- }
72
- exports.error = error;
73
- function info(details) {
74
- if (tnp_core_1.Helpers.isBrowser) {
75
- console.info(details);
76
- return;
77
- }
78
- //#region @backend
79
- if (!global.muteMessages && !global.hideInfos) {
80
- console.log(tnp_cli_1.CLI.chalk.green(details));
81
- global.tnpNonInteractive && PROGRESS_DATA.log({ msg: details });
82
- }
83
- //#endregion
84
- }
85
- exports.info = info;
86
- function log(details) {
87
- if (tnp_core_1.Helpers.isBrowser) {
88
- console.log(details);
89
- return;
90
- }
91
- //#region @backend
92
- // console.log('global.muteMessages', global.muteMessages);
93
- // console.log('global.hideLog', global.hideLog);
94
- if ((!global.muteMessages && !global.hideLog)) {
95
- console.log(tnp_cli_1.CLI.chalk.gray(details));
96
- global.tnpNonInteractive && PROGRESS_DATA.log({ msg: details });
97
- }
98
- //#endregion
99
- }
100
- exports.log = log;
101
- function warn(details, trace) {
102
- if (trace === void 0) { trace = false; }
103
- if (tnp_core_1.Helpers.isBrowser) {
104
- console.warn(details);
105
- return;
106
- }
107
- //#region @backend
108
- if (!global.tnp_normal_mode) {
109
- trace = false;
110
- }
111
- if (trace) {
112
- (!global.muteMessages && !global.hideWarnings) && console.trace(tnp_cli_1.CLI.chalk.yellow(details));
113
- }
114
- else {
115
- (!global.muteMessages && !global.hideWarnings) && console.log(tnp_cli_1.CLI.chalk.yellow(details));
116
- }
117
- //#endregion
118
- }
119
- exports.warn = warn;
120
- //# sourceMappingURL=helpers-messages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers-messages.js","sourceRoot":"","sources":["../../src/lib/helpers-messages.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,mCAA8B;AAC9B,YAAY;AACZ,qCAAkC;AAwBlC,SAAgB,KAAK,CAAC,OAAY,EAAE,MAAc,EAAE,OAAe;IAA/B,uBAAA,EAAA,cAAc;IAAE,wBAAA,EAAA,eAAe;IACjE,IAAI,kBAAO,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACtB,OAAO;KACR;IACD,kBAAkB;IAClB,oCAAoC;IACpC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;QAC3B,OAAO,GAAG,IAAI,CAAC;KAChB;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,IAAI;YACF,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;YACpC,IAAI,MAAM,CAAC,eAAe,EAAE;gBAC1B,IAAI,OAAO,EAAE;oBACX,CAAC,MAAM,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;iBAC1D;qBAAM;oBACL,CAAC,MAAM,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,aAAG,CAAC,KAAK,CAAC,GAAG,C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