@@ -3,12 +3,13 @@ import 'dart:async';
3
3
import 'package:meta/meta.dart' ;
4
4
import 'package:http/http.dart' as http;
5
5
import 'package:rollbar_common/rollbar_common.dart' ;
6
+ import 'package:rollbar_dart/src/sandbox/isolated_sandbox.dart' ;
6
7
7
- import '../rollbar.dart' ;
8
- import 'notifier/isolated_notifier .dart' ;
9
- import 'wrangler/data_wrangler .dart' ;
10
- import 'transformer/noop_transformer.dart' ;
11
- import 'sender/persistent_http_sender.dart' ;
8
+ import '../../ rollbar.dart' ;
9
+ import '../ notifier/core_notifier .dart' ;
10
+ import '../marshaller/data_marshaller .dart' ;
11
+ import '../ transformer/noop_transformer.dart' ;
12
+ import '../ sender/persistent_http_sender.dart' ;
12
13
13
14
/// The class of types that are [Configurable] through a [Config] instance.
14
15
abstract class Configurable {
@@ -30,8 +31,9 @@ class Config implements Serializable {
30
31
final bool handleUncaughtErrors;
31
32
final bool includePlatformLogs;
32
33
33
- final FutureOr <Notifier > Function (Config ) notifier;
34
- final Wrangler Function (Config ) wrangler;
34
+ final FutureOr <Sandbox > Function (Config ) sandbox;
35
+ final Notifier Function (Config ) notifier;
36
+ final Marshaller Function (Config ) marshaller;
35
37
final Transformer Function (Config ) transformer;
36
38
final Sender Function (Config ) sender;
37
39
final http.Client Function () httpClient;
@@ -47,8 +49,9 @@ class Config implements Serializable {
47
49
this .persistenceLifetime = const Duration (days: 1 ),
48
50
this .handleUncaughtErrors = true ,
49
51
this .includePlatformLogs = false ,
50
- this .notifier = IsolatedNotifier .spawn,
51
- this .wrangler = DataWrangler .new ,
52
+ this .sandbox = IsolatedSandbox .spawn,
53
+ this .notifier = CoreNotifier .new ,
54
+ this .marshaller = DataMarshaller .new ,
52
55
this .transformer = NoopTransformer .new ,
53
56
this .sender = PersistentHttpSender .new ,
54
57
this .httpClient = http.Client .new ,
@@ -65,27 +68,29 @@ class Config implements Serializable {
65
68
Duration ? persistenceLifetime,
66
69
bool ? handleUncaughtErrors,
67
70
bool ? includePlatformLogs,
68
- FutureOr <Notifier > Function (Config )? notifier,
69
- Wrangler Function (Config )? wrangler,
71
+ FutureOr <Sandbox > Function (Config )? sandbox,
72
+ Notifier Function (Config )? notifier,
73
+ Marshaller Function (Config )? marshaller,
70
74
Transformer Function (Config )? transformer,
71
75
Sender Function (Config )? sender,
72
76
}) =>
73
77
Config (
74
- accessToken: accessToken ?? this .accessToken,
75
- endpoint: endpoint ?? this .endpoint,
76
- environment: environment ?? this .environment,
77
- framework: framework ?? this .framework,
78
- codeVersion: codeVersion ?? this .codeVersion,
79
- package: package ?? this .package,
80
- persistencePath: persistencePath ?? this .persistencePath,
81
- persistenceLifetime: persistenceLifetime ?? this .persistenceLifetime,
82
- handleUncaughtErrors: handleUncaughtErrors ?? this .handleUncaughtErrors,
83
- includePlatformLogs: includePlatformLogs ?? this .includePlatformLogs,
84
- notifier: notifier ?? this .notifier,
85
- wrangler: wrangler ?? this .wrangler,
86
- transformer: transformer ?? this .transformer,
87
- sender: sender ?? this .sender,
88
- );
78
+ accessToken: accessToken ?? this .accessToken,
79
+ endpoint: endpoint ?? this .endpoint,
80
+ environment: environment ?? this .environment,
81
+ framework: framework ?? this .framework,
82
+ codeVersion: codeVersion ?? this .codeVersion,
83
+ package: package ?? this .package,
84
+ persistencePath: persistencePath ?? this .persistencePath,
85
+ persistenceLifetime: persistenceLifetime ?? this .persistenceLifetime,
86
+ handleUncaughtErrors:
87
+ handleUncaughtErrors ?? this .handleUncaughtErrors,
88
+ includePlatformLogs: includePlatformLogs ?? this .includePlatformLogs,
89
+ sandbox: sandbox ?? this .sandbox,
90
+ notifier: notifier ?? this .notifier,
91
+ marshaller: marshaller ?? this .marshaller,
92
+ transformer: transformer ?? this .transformer,
93
+ sender: sender ?? this .sender);
89
94
90
95
@override
91
96
factory Config .fromMap (JsonMap map) => Config (
0 commit comments