reactronic 0.22.110 → 0.22.200
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 +1 -1
- package/build/dist/source/{Trace.d.ts → Logging.d.ts} +2 -2
- package/build/dist/source/{Trace.js → Logging.js} +23 -23
- package/build/dist/source/Options.d.ts +2 -2
- package/build/dist/source/Options.js +2 -2
- package/build/dist/source/impl/Hooks.d.ts +1 -1
- package/build/dist/source/util/Dbg.d.ts +1 -1
- package/build/dist/source/util/Dbg.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface LoggingOptions {
|
|
2
|
-
readonly
|
|
2
|
+
readonly enabled: boolean;
|
|
3
3
|
readonly transaction: boolean;
|
|
4
4
|
readonly operation: boolean;
|
|
5
5
|
readonly step: boolean;
|
|
@@ -23,12 +23,12 @@ export interface ProfilingOptions {
|
|
|
23
23
|
garbageCollectionSummaryInterval: number;
|
|
24
24
|
}
|
|
25
25
|
export declare const LoggingLevel: {
|
|
26
|
+
Off: LoggingOptions;
|
|
26
27
|
ErrorsOnly: LoggingOptions;
|
|
27
28
|
Reactions: LoggingOptions;
|
|
28
29
|
Transactions: LoggingOptions;
|
|
29
30
|
Operations: LoggingOptions;
|
|
30
31
|
Debug: LoggingOptions;
|
|
31
|
-
Silent: LoggingOptions;
|
|
32
32
|
};
|
|
33
33
|
declare global {
|
|
34
34
|
interface Window {
|
|
@@ -2,8 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LoggingLevel = void 0;
|
|
4
4
|
exports.LoggingLevel = {
|
|
5
|
+
Off: {
|
|
6
|
+
enabled: false,
|
|
7
|
+
transaction: false,
|
|
8
|
+
operation: false,
|
|
9
|
+
step: false,
|
|
10
|
+
monitor: false,
|
|
11
|
+
read: false,
|
|
12
|
+
write: false,
|
|
13
|
+
change: false,
|
|
14
|
+
obsolete: false,
|
|
15
|
+
error: true,
|
|
16
|
+
warning: true,
|
|
17
|
+
gc: false,
|
|
18
|
+
color: 37,
|
|
19
|
+
prefix: '',
|
|
20
|
+
margin1: 0,
|
|
21
|
+
margin2: 0,
|
|
22
|
+
},
|
|
5
23
|
ErrorsOnly: {
|
|
6
|
-
|
|
24
|
+
enabled: true,
|
|
7
25
|
transaction: false,
|
|
8
26
|
operation: false,
|
|
9
27
|
step: false,
|
|
@@ -21,7 +39,7 @@ exports.LoggingLevel = {
|
|
|
21
39
|
margin2: 0,
|
|
22
40
|
},
|
|
23
41
|
Reactions: {
|
|
24
|
-
|
|
42
|
+
enabled: true,
|
|
25
43
|
transaction: false,
|
|
26
44
|
operation: false,
|
|
27
45
|
step: false,
|
|
@@ -39,7 +57,7 @@ exports.LoggingLevel = {
|
|
|
39
57
|
margin2: 0,
|
|
40
58
|
},
|
|
41
59
|
Transactions: {
|
|
42
|
-
|
|
60
|
+
enabled: true,
|
|
43
61
|
transaction: true,
|
|
44
62
|
operation: false,
|
|
45
63
|
step: false,
|
|
@@ -57,7 +75,7 @@ exports.LoggingLevel = {
|
|
|
57
75
|
margin2: 0,
|
|
58
76
|
},
|
|
59
77
|
Operations: {
|
|
60
|
-
|
|
78
|
+
enabled: true,
|
|
61
79
|
transaction: true,
|
|
62
80
|
operation: true,
|
|
63
81
|
step: false,
|
|
@@ -75,7 +93,7 @@ exports.LoggingLevel = {
|
|
|
75
93
|
margin2: 0,
|
|
76
94
|
},
|
|
77
95
|
Debug: {
|
|
78
|
-
|
|
96
|
+
enabled: true,
|
|
79
97
|
transaction: true,
|
|
80
98
|
operation: true,
|
|
81
99
|
step: true,
|
|
@@ -92,22 +110,4 @@ exports.LoggingLevel = {
|
|
|
92
110
|
margin1: 0,
|
|
93
111
|
margin2: 0,
|
|
94
112
|
},
|
|
95
|
-
Silent: {
|
|
96
|
-
silent: true,
|
|
97
|
-
transaction: false,
|
|
98
|
-
operation: false,
|
|
99
|
-
step: false,
|
|
100
|
-
monitor: false,
|
|
101
|
-
read: false,
|
|
102
|
-
write: false,
|
|
103
|
-
change: false,
|
|
104
|
-
obsolete: false,
|
|
105
|
-
error: true,
|
|
106
|
-
warning: true,
|
|
107
|
-
gc: false,
|
|
108
|
-
color: 37,
|
|
109
|
-
prefix: '',
|
|
110
|
-
margin1: 0,
|
|
111
|
-
margin2: 0,
|
|
112
|
-
},
|
|
113
113
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LoggingOptions } from './
|
|
1
|
+
import { LoggingOptions } from './Logging';
|
|
2
2
|
import { StandaloneMode } from './impl/Data';
|
|
3
|
-
export { LoggingOptions, ProfilingOptions, LoggingLevel } from './
|
|
3
|
+
export { LoggingOptions, ProfilingOptions, LoggingLevel } from './Logging';
|
|
4
4
|
import { TransactionJournal } from './impl/TransactionJournal';
|
|
5
5
|
import { Monitor } from './impl/Monitor';
|
|
6
6
|
export interface SnapshotOptions {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Reentrance = exports.Kind = exports.LoggingLevel = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "LoggingLevel", { enumerable: true, get: function () { return
|
|
4
|
+
var Logging_1 = require("./Logging");
|
|
5
|
+
Object.defineProperty(exports, "LoggingLevel", { enumerable: true, get: function () { return Logging_1.LoggingLevel; } });
|
|
6
6
|
var Kind;
|
|
7
7
|
(function (Kind) {
|
|
8
8
|
Kind[Kind["Plain"] = 0] = "Plain";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F } from '../util/Utils';
|
|
2
2
|
import { MemberOptions, Kind, Reentrance } from '../Options';
|
|
3
|
-
import { LoggingOptions, ProfilingOptions } from '../
|
|
3
|
+
import { LoggingOptions, ProfilingOptions } from '../Logging';
|
|
4
4
|
import { MemberName, ObjectHolder, StandaloneMode } from './Data';
|
|
5
5
|
import { TransactionJournal } from './TransactionJournal';
|
|
6
6
|
import { Monitor } from './Monitor';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoggingOptions } from '../
|
|
1
|
+
import { LoggingOptions } from '../Logging';
|
|
2
2
|
export declare function error(message: string, dump: Error | undefined): Error;
|
|
3
3
|
export declare function misuse(message: string, dump?: any): Error;
|
|
4
4
|
export declare function fatal(error: Error): Error;
|
|
@@ -39,8 +39,8 @@ class Log {
|
|
|
39
39
|
const t = Log.getMergedLoggingOptions(options);
|
|
40
40
|
const margin1 = ' '.repeat(t.margin1 >= 0 ? t.margin1 : 0);
|
|
41
41
|
const margin2 = ' '.repeat(t.margin2);
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
42
|
+
const enabled = (options && options.enabled !== undefined) ? options.enabled : t.enabled;
|
|
43
|
+
if (enabled) {
|
|
44
44
|
console.log('\x1b[37m%s\x1b[0m \x1b[' + t.color + 'm%s %s%s\x1b[0m \x1b[' + t.color + 'm%s%s\x1b[0m \x1b[' + t.color + 'm%s\x1b[0m%s', '', t.prefix, t.transaction ? margin1 : '', t.transaction ? bar : bar.replace(/./g, ' '), margin2, tran, message, (highlight !== undefined ? `${highlight}` : '') + (ms > 2 ? ` [ ${ms}ms ]` : ''));
|
|
45
45
|
if (dump)
|
|
46
46
|
console.log(dump);
|
|
@@ -48,7 +48,7 @@ class Log {
|
|
|
48
48
|
}
|
|
49
49
|
static merge(t, color, prefix, existing) {
|
|
50
50
|
const result = !t ? Object.assign({}, existing) : {
|
|
51
|
-
|
|
51
|
+
enabled: t.enabled !== undefined ? t.enabled : existing.enabled,
|
|
52
52
|
transaction: t.transaction !== undefined ? t.transaction : existing.transaction,
|
|
53
53
|
operation: t.operation !== undefined ? t.operation : existing.operation,
|
|
54
54
|
step: t.step !== undefined ? t.step : existing.step,
|
|
@@ -74,7 +74,7 @@ class Log {
|
|
|
74
74
|
}
|
|
75
75
|
exports.Log = Log;
|
|
76
76
|
Log.DefaultLevel = {
|
|
77
|
-
|
|
77
|
+
enabled: true,
|
|
78
78
|
error: false,
|
|
79
79
|
warning: false,
|
|
80
80
|
transaction: false,
|