@dynatrace/react-native-plugin 2.341.1 → 2.345.1
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 +674 -668
- package/android/build.gradle +16 -3
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceAppStartModule.kt +9 -31
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceConfigurationModule.kt +1 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.kt +41 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceUtils.kt +1 -0
- package/android/src/main/java/com/dynatrace/android/agent/ScreenshotSelfMonitor.kt +175 -0
- package/android/src/main/java/com/dynatrace/android/agent/UIChangeScreenshotListener.kt +124 -0
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +33 -0
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +40 -0
- package/files/plugin-runtime.gradle +17 -33
- package/files/plugin.gradle +1 -1
- package/instrumentation/BabelPluginDynatrace.js +1 -1
- package/instrumentation/libs/UserInteraction.js +21 -7
- package/instrumentation/libs/react-navigation/ReactNavigation.js +14 -58
- package/instrumentation/libs/withOnPressMonitoring.js +3 -54
- package/internal.d.ts +1 -0
- package/internal.js +3 -1
- package/ios/DTXScreenshotSelfMonitor.h +29 -0
- package/ios/DTXScreenshotSelfMonitor.mm +213 -0
- package/ios/DTXScreenshotSelfMonitorSwizzler.h +15 -0
- package/ios/DTXScreenshotSelfMonitorSwizzler.mm +68 -0
- package/ios/DynatraceRNBridge.h +6 -0
- package/ios/DynatraceRNBridge.mm +62 -0
- package/lib/core/Dynatrace.js +2 -0
- package/lib/core/configuration/ConfigurationHandler.js +0 -21
- package/lib/core/logging/LogMessages.js +42 -0
- package/lib/dynatrace-reporter.js +1 -30
- package/lib/dynatrace-transformer.js +6 -34
- package/lib/next/Dynatrace.js +26 -1
- package/lib/next/configuration/INativeRuntimeConfiguration.js +0 -1
- package/lib/next/configuration/RuntimeConfigurationObserver.js +1 -6
- package/lib/next/events/EventPipeline.js +48 -31
- package/lib/next/events/HttpRequestEventData.js +1 -1
- package/lib/next/events/spec/EventSpecContstants.js +1 -1
- package/lib/next/navigation/NavigationTracker.js +93 -0
- package/lib/next/navigation/useNavigationTracking.js +54 -0
- package/lib/next/userAction/NullUserAction.js +15 -0
- package/lib/next/userAction/UserActionConfiguration.js +10 -0
- package/lib/next/userAction/UserActionImpl.js +70 -0
- package/lib/next/util/TraceContextUtils.js +8 -14
- package/lib/next/util/Utils.js +13 -0
- package/package.json +10 -18
- package/public.js +5 -1
- package/react-native-dynatrace.podspec +10 -3
- package/scripts/Android.js +1 -20
- package/scripts/Config.js +17 -7
- package/scripts/Deprecations.js +18 -0
- package/scripts/Install.js +13 -0
- package/scripts/PathsConstants.js +0 -4
- package/scripts/Uninstall.js +0 -15
- package/scripts/core/InstrumentCall.js +14 -7
- package/scripts/util/DeprecationReport.js +24 -0
- package/src/lib/core/interface/NativeDynatraceBridge.ts +34 -1
- package/types.d.ts +236 -7
- package/instrumentation/DynatraceInstrumentation.js +0 -1
- package/instrumentation/libs/community/Picker.InstrInfo.js +0 -20
- package/instrumentation/libs/community/gesture-handler/Touchables.InstrInfo.js +0 -25
- package/instrumentation/libs/react-native/RefreshControl.InstrInfo.js +0 -12
- package/instrumentation/libs/react-native/Switch.InstrInfo.js +0 -12
- package/instrumentation/libs/react-native/Touchables.InstrInfo.js +0 -25
- package/instrumentation/parser/Babel.js +0 -60
- package/instrumentation/parser/ParserUtil.js +0 -11
- package/lib/features/ui-interaction/Config.js +0 -42
- package/lib/features/ui-interaction/IUserInteractionEvent.js +0 -16
- package/lib/features/ui-interaction/Plugin.Fragment.Test.js +0 -170
- package/lib/features/ui-interaction/Plugin.js +0 -289
- package/lib/features/ui-interaction/RootDetection.js +0 -51
- package/lib/features/ui-interaction/RootWrapper.js +0 -236
- package/lib/features/ui-interaction/Run.js +0 -38
- package/lib/features/ui-interaction/Runtime.js +0 -843
- package/lib/features/ui-interaction/TouchMetaResolver.js +0 -493
- package/lib/features/ui-interaction/Types.js +0 -14
- package/lib/metro/getSourceMapInfo.js +0 -26
- package/scripts/LineOffsetAnalyze.js +0 -25
- package/scripts/core/LineOffsetAnalyzeCall.js +0 -165
- package/scripts/util/SourceMapUtil.js +0 -68
- /package/{instrumentation/model/Reference.js → lib/next/userAction/UserAction.js} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.detectRootRegistrations = void 0;
|
|
4
|
-
const j = require("jscodeshift");
|
|
5
|
-
const isProjectFile = (filename) => filename && !/\/node_modules\//.test(filename);
|
|
6
|
-
const detectRootRegistrations = (root, filename) => {
|
|
7
|
-
if (!isProjectFile(filename)) {
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
const regs = [];
|
|
11
|
-
root.find(j.ImportDeclaration).forEach((p) => {
|
|
12
|
-
const importSource = (p.node.source.value || '');
|
|
13
|
-
if (importSource === 'expo-router' ||
|
|
14
|
-
importSource === 'expo-router/entry') {
|
|
15
|
-
regs.push({ type: 'expo_router_entry', path: p });
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
root.find(j.CallExpression, {
|
|
19
|
-
callee: { type: 'Identifier', name: 'registerRootComponent' },
|
|
20
|
-
}).forEach((p) => {
|
|
21
|
-
var _a;
|
|
22
|
-
const componentFactoryArg = (_a = p.node.arguments) === null || _a === void 0 ? void 0 : _a[0];
|
|
23
|
-
if (!componentFactoryArg) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
regs.push({
|
|
27
|
-
type: 'expo_register',
|
|
28
|
-
path: p,
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
root.find(j.CallExpression, {
|
|
32
|
-
callee: {
|
|
33
|
-
type: 'MemberExpression',
|
|
34
|
-
object: { type: 'Identifier', name: 'AppRegistry' },
|
|
35
|
-
property: { type: 'Identifier', name: 'registerComponent' },
|
|
36
|
-
},
|
|
37
|
-
}).forEach((p) => {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
const appNameArg = (_a = p.node.arguments) === null || _a === void 0 ? void 0 : _a[0];
|
|
40
|
-
const componentFactoryArg = (_b = p.node.arguments) === null || _b === void 0 ? void 0 : _b[1];
|
|
41
|
-
if (!appNameArg || !componentFactoryArg) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
regs.push({
|
|
45
|
-
type: 'rn_register',
|
|
46
|
-
path: p,
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
return regs;
|
|
50
|
-
};
|
|
51
|
-
exports.detectRootRegistrations = detectRootRegistrations;
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wrapDetectedRoots = void 0;
|
|
4
|
-
const jsc = require("jscodeshift");
|
|
5
|
-
const Config_1 = require("./Config");
|
|
6
|
-
const Types_1 = require("./Types");
|
|
7
|
-
const DT_CFG_NAME = 'DT_ANALYTICS_CONFIG';
|
|
8
|
-
const ensureReactImportAST = (j, root) => {
|
|
9
|
-
const has = root
|
|
10
|
-
.find(j.ImportDeclaration, { source: { value: 'react' } })
|
|
11
|
-
.filter((p) => (p.node.specifiers || []).some((s) => {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
return (j.ImportDefaultSpecifier.check(s) &&
|
|
14
|
-
((_a = s.local) === null || _a === void 0 ? void 0 : _a.name) === 'React') ||
|
|
15
|
-
(j.ImportNamespaceSpecifier.check(s) &&
|
|
16
|
-
((_b = s.local) === null || _b === void 0 ? void 0 : _b.name) === 'React');
|
|
17
|
-
}))
|
|
18
|
-
.size() > 0;
|
|
19
|
-
if (has) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const firstImport = root.find(j.ImportDeclaration).at(0);
|
|
23
|
-
const imp = j.importDeclaration([j.importNamespaceSpecifier(j.identifier('React'))], j.literal('react'));
|
|
24
|
-
if (firstImport.size() > 0) {
|
|
25
|
-
firstImport.insertBefore(imp);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
root.get().node.program.body.unshift(imp);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
const ensureRuntimeImportAST = (j, root) => {
|
|
32
|
-
const from = Types_1.Literals.DefaultRuntimeImport;
|
|
33
|
-
const has = root
|
|
34
|
-
.find(j.ImportDeclaration, { source: { value: from } })
|
|
35
|
-
.filter((p) => (p.node.specifiers || []).some((s) => {
|
|
36
|
-
var _a;
|
|
37
|
-
return j.ImportSpecifier.check(s) &&
|
|
38
|
-
((_a = s.imported) === null || _a === void 0 ? void 0 : _a.name) === 'AnalyticsRoot';
|
|
39
|
-
}))
|
|
40
|
-
.size() > 0;
|
|
41
|
-
if (has) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const decl = j.importDeclaration([j.importSpecifier(j.identifier('AnalyticsRoot'))], j.literal(from));
|
|
45
|
-
const firstImport = root.find(j.ImportDeclaration).at(0);
|
|
46
|
-
if (firstImport.size() > 0) {
|
|
47
|
-
firstImport.insertBefore(decl);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
root.get().node.program.body.unshift(decl);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const valueToExpression = (j, v) => {
|
|
54
|
-
if (v === null) {
|
|
55
|
-
return j.nullLiteral();
|
|
56
|
-
}
|
|
57
|
-
const t = typeof v;
|
|
58
|
-
if (t === 'string' || t === 'number' || t === 'boolean') {
|
|
59
|
-
return j.literal(v);
|
|
60
|
-
}
|
|
61
|
-
if (Array.isArray(v)) {
|
|
62
|
-
return j.arrayExpression(v.map((x) => valueToExpression(j, x)));
|
|
63
|
-
}
|
|
64
|
-
if (t === 'object') {
|
|
65
|
-
return j.objectExpression(Object.keys(v).map((k) => j.objectProperty(j.identifier(k), valueToExpression(j, v[k]))));
|
|
66
|
-
}
|
|
67
|
-
return j.nullLiteral();
|
|
68
|
-
};
|
|
69
|
-
const ensureConfigConstAST = (j, root) => {
|
|
70
|
-
const exists = root
|
|
71
|
-
.find(j.VariableDeclaration)
|
|
72
|
-
.filter((p) => (p.node.declarations || []).some((d) => j.VariableDeclarator.check(d) &&
|
|
73
|
-
j.Identifier.check(d.id) &&
|
|
74
|
-
d.id.name === DT_CFG_NAME))
|
|
75
|
-
.size() > 0;
|
|
76
|
-
if (exists) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const init = valueToExpression(j, Config_1.DT_UII_ROOT_CONFIG);
|
|
80
|
-
const decl = j.variableDeclaration('const', [
|
|
81
|
-
j.variableDeclarator(j.identifier(DT_CFG_NAME), init),
|
|
82
|
-
]);
|
|
83
|
-
const firstImport = root.find(j.ImportDeclaration).at(0);
|
|
84
|
-
if (firstImport.size() > 0) {
|
|
85
|
-
firstImport.insertAfter(decl);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
root.get().node.program.body.unshift(decl);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
const isCreateAnalyticsRoot = (j, n) => j.CallExpression.check(n) &&
|
|
92
|
-
j.MemberExpression.check(n.callee) &&
|
|
93
|
-
j.Identifier.check(n.callee.object) &&
|
|
94
|
-
n.callee.object.name === 'React' &&
|
|
95
|
-
j.Identifier.check(n.callee.property) &&
|
|
96
|
-
n.callee.property.name === 'createElement' &&
|
|
97
|
-
n.arguments.length >= 1 &&
|
|
98
|
-
j.Identifier.check(n.arguments[0]) &&
|
|
99
|
-
n.arguments[0].name === 'AnalyticsRoot';
|
|
100
|
-
const funcBodyContainsAnalyticsRoot = (j, f) => {
|
|
101
|
-
if (!j.ArrowFunctionExpression.check(f) && !j.FunctionExpression.check(f)) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
if (j.BlockStatement.check(f.body)) {
|
|
105
|
-
let found = false;
|
|
106
|
-
j(f.body)
|
|
107
|
-
.find(j.CallExpression)
|
|
108
|
-
.forEach((p) => {
|
|
109
|
-
if (isCreateAnalyticsRoot(j, p.node)) {
|
|
110
|
-
found = true;
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
return found;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
return isCreateAnalyticsRoot(j, f.body);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const createAnalyticsWrappedElement = (j, componentExpr, propsId) => j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('createElement')), [
|
|
120
|
-
j.identifier('AnalyticsRoot'),
|
|
121
|
-
j.objectExpression([
|
|
122
|
-
j.property('init', j.identifier('name'), j.literal('App')),
|
|
123
|
-
j.property('init', j.identifier('config'), j.identifier(DT_CFG_NAME)),
|
|
124
|
-
]),
|
|
125
|
-
j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('createElement')), [
|
|
126
|
-
componentExpr,
|
|
127
|
-
propsId ? j.identifier(propsId) : j.nullLiteral(),
|
|
128
|
-
]),
|
|
129
|
-
]);
|
|
130
|
-
const makeWrappedFactoryArrow = (j, innerCreateExpr) => j.arrowFunctionExpression([], j.blockStatement([
|
|
131
|
-
j.returnStatement(j.functionExpression(j.identifier('Wrapped'), [j.identifier('props')], j.blockStatement([
|
|
132
|
-
j.returnStatement(j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('createElement')), [
|
|
133
|
-
j.identifier('AnalyticsRoot'),
|
|
134
|
-
j.objectExpression([
|
|
135
|
-
j.property('init', j.identifier('name'), j.literal('App')),
|
|
136
|
-
j.property('init', j.identifier('config'), j.identifier(DT_CFG_NAME)),
|
|
137
|
-
]),
|
|
138
|
-
j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('createElement')), [
|
|
139
|
-
innerCreateExpr,
|
|
140
|
-
j.identifier('props'),
|
|
141
|
-
]),
|
|
142
|
-
])),
|
|
143
|
-
]))),
|
|
144
|
-
]));
|
|
145
|
-
const wrapExpoRegister = (j, callPath) => {
|
|
146
|
-
var _a;
|
|
147
|
-
const a0 = (_a = callPath.node.arguments) === null || _a === void 0 ? void 0 : _a[0];
|
|
148
|
-
if (!a0) {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
if (j.ArrowFunctionExpression.check(a0) || j.FunctionExpression.check(a0)) {
|
|
152
|
-
if (funcBodyContainsAnalyticsRoot(j, a0)) {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (j.Identifier.check(a0)) {
|
|
157
|
-
const inner = createAnalyticsWrappedElement(j, j.identifier(a0.name));
|
|
158
|
-
callPath.node.arguments[0] = j.arrowFunctionExpression([], inner);
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
if (j.ArrowFunctionExpression.check(a0) || j.FunctionExpression.check(a0)) {
|
|
162
|
-
const res = j.callExpression(a0, []);
|
|
163
|
-
const inner = createAnalyticsWrappedElement(j, res);
|
|
164
|
-
callPath.node.arguments[0] = j.arrowFunctionExpression([], inner);
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
if (j.JSXElement.check(a0) || j.CallExpression.check(a0)) {
|
|
168
|
-
const inner = createAnalyticsWrappedElement(j, a0);
|
|
169
|
-
callPath.node.arguments[0] = j.arrowFunctionExpression([], inner);
|
|
170
|
-
return true;
|
|
171
|
-
}
|
|
172
|
-
return false;
|
|
173
|
-
};
|
|
174
|
-
const wrapRNRegister = (j, callPath) => {
|
|
175
|
-
var _a;
|
|
176
|
-
const facArg = (_a = callPath.node.arguments) === null || _a === void 0 ? void 0 : _a[1];
|
|
177
|
-
if (!facArg) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
if (j.ArrowFunctionExpression.check(facArg) ||
|
|
181
|
-
j.FunctionExpression.check(facArg)) {
|
|
182
|
-
if (funcBodyContainsAnalyticsRoot(j, facArg)) {
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
const body = j.BlockStatement.check(facArg.body)
|
|
186
|
-
? j.callExpression(facArg, [])
|
|
187
|
-
: facArg.body;
|
|
188
|
-
const chooseComp = j.conditionalExpression(j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('isValidElement')), [body]), j.arrowFunctionExpression([], body), body);
|
|
189
|
-
callPath.node.arguments[1] = makeWrappedFactoryArrow(j, chooseComp);
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
if (j.Identifier.check(facArg) || j.MemberExpression.check(facArg)) {
|
|
193
|
-
const callComp = j.callExpression(facArg, []);
|
|
194
|
-
const chooseComp = j.conditionalExpression(j.callExpression(j.memberExpression(j.identifier('React'), j.identifier('isValidElement')), [callComp]), j.arrowFunctionExpression([], callComp), callComp);
|
|
195
|
-
callPath.node.arguments[1] = makeWrappedFactoryArrow(j, chooseComp);
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
if (j.JSXElement.check(facArg) || j.CallExpression.check(facArg)) {
|
|
199
|
-
const elem = j.ArrowFunctionExpression.check(facArg)
|
|
200
|
-
? facArg.body
|
|
201
|
-
: facArg;
|
|
202
|
-
const chooseComp = j.arrowFunctionExpression([], elem);
|
|
203
|
-
callPath.node.arguments[1] = makeWrappedFactoryArrow(j, chooseComp);
|
|
204
|
-
return true;
|
|
205
|
-
}
|
|
206
|
-
return false;
|
|
207
|
-
};
|
|
208
|
-
const wrapDetectedRoots = (root, regs) => {
|
|
209
|
-
const j = jsc.withParser('tsx');
|
|
210
|
-
let changed = false;
|
|
211
|
-
if (!regs.length) {
|
|
212
|
-
return { root, changed };
|
|
213
|
-
}
|
|
214
|
-
ensureReactImportAST(j, root);
|
|
215
|
-
ensureRuntimeImportAST(j, root);
|
|
216
|
-
ensureConfigConstAST(j, root);
|
|
217
|
-
regs.forEach((r) => {
|
|
218
|
-
if (r.type === 'expo_register') {
|
|
219
|
-
const ok = wrapExpoRegister(j, r.path);
|
|
220
|
-
if (ok) {
|
|
221
|
-
changed = true;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
else if (r.type === 'rn_register') {
|
|
225
|
-
const ok = wrapRNRegister(j, r.path);
|
|
226
|
-
if (ok) {
|
|
227
|
-
changed = true;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
changed = changed || false;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
return { root, changed };
|
|
235
|
-
};
|
|
236
|
-
exports.wrapDetectedRoots = wrapDetectedRoots;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runDTUserInteraction = void 0;
|
|
4
|
-
const Config_1 = require("./Config");
|
|
5
|
-
const Plugin_1 = require("./Plugin");
|
|
6
|
-
const RootDetection_1 = require("./RootDetection");
|
|
7
|
-
const RootWrapper_1 = require("./RootWrapper");
|
|
8
|
-
const runDTUserInteraction = (root, filename, dynatraceOptions) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const dtUiEnabled = (dynatraceOptions === null || dynatraceOptions === void 0 ? void 0 : dynatraceOptions.userInteraction) === true;
|
|
11
|
-
if (!dtUiEnabled) {
|
|
12
|
-
return { root, modified: false };
|
|
13
|
-
}
|
|
14
|
-
const defaultConfig = (0, Config_1.getDTConfig)();
|
|
15
|
-
const defaultPathIdConfig = ((_a = defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.ui) === null || _a === void 0 ? void 0 : _a.pathId) || {};
|
|
16
|
-
const userPathIdConfig = (dynatraceOptions === null || dynatraceOptions === void 0 ? void 0 : dynatraceOptions.userInteractionPathId) || {};
|
|
17
|
-
const pathIdEnabledFromFlag = (dynatraceOptions === null || dynatraceOptions === void 0 ? void 0 : dynatraceOptions.userInteractionPathIds) !== false;
|
|
18
|
-
const mergedPathIdConfig = Object.assign(Object.assign(Object.assign({}, defaultPathIdConfig), userPathIdConfig), { enabled: typeof userPathIdConfig.enabled === 'boolean'
|
|
19
|
-
? userPathIdConfig.enabled
|
|
20
|
-
: pathIdEnabledFromFlag });
|
|
21
|
-
const mergedDT = Object.assign(Object.assign({}, defaultConfig), { ui: Object.assign(Object.assign({}, ((defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.ui) || {})), { pathId: mergedPathIdConfig }) });
|
|
22
|
-
let modified = false;
|
|
23
|
-
const regs = (0, RootDetection_1.detectRootRegistrations)(root, filename);
|
|
24
|
-
if (regs.length) {
|
|
25
|
-
const r = (0, RootWrapper_1.wrapDetectedRoots)(root, regs);
|
|
26
|
-
root = r.root;
|
|
27
|
-
if (r.changed) {
|
|
28
|
-
modified = true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const pathIdResult = (0, Plugin_1.applyDTPathIdInstrumentation)(root, filename, mergedDT);
|
|
32
|
-
root = pathIdResult.root;
|
|
33
|
-
if (pathIdResult.changed) {
|
|
34
|
-
modified = true;
|
|
35
|
-
}
|
|
36
|
-
return { root, modified };
|
|
37
|
-
};
|
|
38
|
-
exports.runDTUserInteraction = runDTUserInteraction;
|