@dynatrace/react-native-plugin 2.317.1 → 2.319.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 +7 -3
- package/android/build.gradle +1 -1
- package/files/plugin.gradle +1 -1
- package/package.json +2 -2
- package/react-native-dynatrace.podspec +1 -1
- package/scripts/Ios.js +10 -9
- package/scripts/util/PlistConstants.js +2 -1
package/README.md
CHANGED
|
@@ -32,8 +32,8 @@ If you want to start using this plugin and are not a Dynatrace customer yet, hea
|
|
|
32
32
|
## Agent Versions
|
|
33
33
|
This agent versions are configured in this plugin:
|
|
34
34
|
|
|
35
|
-
* Android Agent: 8.
|
|
36
|
-
* iOS Agent: 8.
|
|
35
|
+
* Android Agent: 8.319.2.1011
|
|
36
|
+
* iOS Agent: 8.319.1.1005
|
|
37
37
|
|
|
38
38
|
## Quick Setup
|
|
39
39
|
|
|
@@ -1461,8 +1461,12 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
|
|
|
1461
1461
|
<br/><br/>
|
|
1462
1462
|
## Changelog
|
|
1463
1463
|
|
|
1464
|
-
2.
|
|
1464
|
+
2.319.1
|
|
1465
|
+
* Updated Android (8.319.2.1011) & iOS Agent (8.319.1.1005)
|
|
1466
|
+
|
|
1467
|
+
2.317.2
|
|
1465
1468
|
* Updated Android (8.317.1.1007) & iOS Agent (8.317.1.1003)
|
|
1469
|
+
* Webrequest correlation with user action fixed for iOS
|
|
1466
1470
|
|
|
1467
1471
|
2.313.1
|
|
1468
1472
|
* Updated Android (8.313.1.1004) & iOS Agent (8.313.1.1016)
|
package/android/build.gradle
CHANGED
|
@@ -72,7 +72,7 @@ repositories {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
dependencies {
|
|
75
|
-
implementation 'com.dynatrace.agent:agent-android:8.
|
|
75
|
+
implementation 'com.dynatrace.agent:agent-android:8.319.2.1011'
|
|
76
76
|
implementation "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
|
|
77
77
|
}
|
|
78
78
|
|
package/files/plugin.gradle
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/react-native-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.319.1",
|
|
4
4
|
"description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "typings/react-native-dynatrace.d.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"author": "Dynatrace",
|
|
84
84
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@babel/runtime": "^7.
|
|
86
|
+
"@babel/runtime": "^7.28.2",
|
|
87
87
|
"jscodeshift": "^17.3.0",
|
|
88
88
|
"plist": "^3.1.0",
|
|
89
89
|
"proxy-polyfill": "^0.3.2",
|
|
@@ -111,7 +111,7 @@ Pod::Spec.new do |s|
|
|
|
111
111
|
#
|
|
112
112
|
|
|
113
113
|
s.dependency "React"
|
|
114
|
-
s.dependency 'Dynatrace', '~> 8.
|
|
114
|
+
s.dependency 'Dynatrace', '~> 8.319.1.1005'
|
|
115
115
|
|
|
116
116
|
# Allows for better compatibility for older and newer versions
|
|
117
117
|
if defined?(install_modules_dependencies)
|
package/scripts/Ios.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const nodePath = require("path");
|
|
5
|
-
const
|
|
5
|
+
const plist_1 = require("plist");
|
|
6
6
|
const Logger_1 = require("./Logger");
|
|
7
7
|
const FileOperationHelper_1 = require("./FileOperationHelper");
|
|
8
8
|
const PathsConstants_1 = require("./PathsConstants");
|
|
@@ -62,20 +62,20 @@ const modifyPListFile = (pathToPList, iosConfig, removeOnly) => {
|
|
|
62
62
|
};
|
|
63
63
|
const removePListConfig = (file) => {
|
|
64
64
|
const pListContent = FileOperationHelper_1.default.readTextFromFileSync(file);
|
|
65
|
-
const pListObj =
|
|
65
|
+
const pListObj = (0, plist_1.parse)(pListContent);
|
|
66
66
|
const pListObjCopy = Object.assign({}, pListObj);
|
|
67
67
|
for (const property in pListObj) {
|
|
68
68
|
if (property.startsWith('DTX')) {
|
|
69
69
|
delete pListObjCopy[property];
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
FileOperationHelper_1.default.writeTextToFileSync(file,
|
|
72
|
+
FileOperationHelper_1.default.writeTextToFileSync(file, (0, plist_1.build)(pListObjCopy));
|
|
73
73
|
Logger_1.default.logMessageSync('Removed old configuration in plist file: ' + file, Logger_1.default.INFO);
|
|
74
74
|
};
|
|
75
75
|
const addAgentConfigToPListFile = (file, config) => {
|
|
76
76
|
const pListContent = FileOperationHelper_1.default.readTextFromFileSync(file);
|
|
77
77
|
const newPListContent = PlistConstants_1.START_PLIST + config + PlistConstants_1.END_PLIST;
|
|
78
|
-
FileOperationHelper_1.default.writeTextToFileSync(file,
|
|
78
|
+
FileOperationHelper_1.default.writeTextToFileSync(file, (0, plist_1.build)(Object.assign(Object.assign({}, (0, plist_1.parse)(pListContent)), (0, plist_1.parse)(newPListContent))));
|
|
79
79
|
Logger_1.default.logMessageSync('Updated configuration in plist file: ' + file, Logger_1.default.INFO);
|
|
80
80
|
};
|
|
81
81
|
const findPListFile = () => {
|
|
@@ -106,13 +106,13 @@ const findPListFile = () => {
|
|
|
106
106
|
};
|
|
107
107
|
const parsePList = (file) => {
|
|
108
108
|
const pListContent = FileOperationHelper_1.default.readTextFromFileSync(file);
|
|
109
|
-
let pListObj =
|
|
109
|
+
let pListObj = (0, plist_1.parse)(pListContent);
|
|
110
110
|
return pListObj = Object.assign({}, pListObj);
|
|
111
111
|
};
|
|
112
112
|
const isAutoStartEnabled = (config) => {
|
|
113
113
|
if (config !== undefined && config.indexOf(PlistConstants_1.AUTO_START_PROP) >= 0) {
|
|
114
114
|
const configObj = PlistConstants_1.START_PLIST + config + PlistConstants_1.END_PLIST;
|
|
115
|
-
const configObjCopy =
|
|
115
|
+
const configObjCopy = (0, plist_1.parse)(configObj);
|
|
116
116
|
const configKeys = Object.keys(configObjCopy);
|
|
117
117
|
const configValues = Object.values(configObjCopy);
|
|
118
118
|
for (const key in configKeys) {
|
|
@@ -142,7 +142,7 @@ const updatedExcludedStr = (config) => {
|
|
|
142
142
|
};
|
|
143
143
|
const isPropertyCountEqual = (parsedPList, config) => {
|
|
144
144
|
const configObj = PlistConstants_1.START_PLIST + config + PlistConstants_1.END_PLIST;
|
|
145
|
-
const configObjCopy =
|
|
145
|
+
const configObjCopy = (0, plist_1.parse)(configObj);
|
|
146
146
|
return Object.keys(parsedPList)
|
|
147
147
|
.filter((pListDtxKeys) => pListDtxKeys.startsWith('DTX')).length === Object.keys(configObjCopy)
|
|
148
148
|
.filter((configDtxKeys) => configDtxKeys.startsWith('DTX')).length;
|
|
@@ -162,7 +162,7 @@ const areConfigsEqual = (parsedPList, configObj) => {
|
|
|
162
162
|
};
|
|
163
163
|
const comparePListAndConfig = (pListObj, config) => {
|
|
164
164
|
const configObj = PlistConstants_1.START_PLIST + config + PlistConstants_1.END_PLIST;
|
|
165
|
-
const configObjCopy =
|
|
165
|
+
const configObjCopy = (0, plist_1.parse)(configObj);
|
|
166
166
|
removeNonDTXProperties(pListObj);
|
|
167
167
|
removeNonDTXProperties(configObjCopy);
|
|
168
168
|
return areConfigsEqual(pListObj, configObjCopy);
|
|
@@ -183,7 +183,7 @@ const hasDuplicateProperties = (config) => {
|
|
|
183
183
|
return !newConfigArr.every((property) => newConfigArr.indexOf(property) === newConfigArr.lastIndexOf(property));
|
|
184
184
|
};
|
|
185
185
|
const createNewPListIfRequired = (parsedPList, configProps, pathToPList) => {
|
|
186
|
-
const configIncludingFlavor = configProps +
|
|
186
|
+
const configIncludingFlavor = configProps + getAdditionalInternalPluginKeys() + updatedExcludedStr(configProps);
|
|
187
187
|
if (isPropertyCountEqual(parsedPList, configIncludingFlavor) && comparePListAndConfig(parsedPList, configIncludingFlavor)) {
|
|
188
188
|
Logger_1.default.logMessageSync('Not generating a new plist as the current plist and ' +
|
|
189
189
|
' dynatrace.config.js iOS properties are identical!', Logger_1.default.INFO);
|
|
@@ -195,6 +195,7 @@ const createNewPListIfRequired = (parsedPList, configProps, pathToPList) => {
|
|
|
195
195
|
addAgentConfigToPListFile(pathToPList, configIncludingFlavor);
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
+
const getAdditionalInternalPluginKeys = () => PlistConstants_1.FLAVOR_PROP + PlistConstants_1.WEBREQUEST_FALLBACK_PROP;
|
|
198
199
|
exports.default = {
|
|
199
200
|
modifyPListFile,
|
|
200
201
|
findPListFile,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTROLS_PROP_OPTIONS = exports.END_CONTROLS_PROP = exports.START_CONTROLS_PROP = exports.DEFAULT_CONTROLS_PROP = exports.FLAVOR_PROP = exports.AUTO_START_PROP = exports.END_PLIST = exports.START_PLIST = void 0;
|
|
3
|
+
exports.CONTROLS_PROP_OPTIONS = exports.END_CONTROLS_PROP = exports.START_CONTROLS_PROP = exports.DEFAULT_CONTROLS_PROP = exports.WEBREQUEST_FALLBACK_PROP = exports.FLAVOR_PROP = exports.AUTO_START_PROP = exports.END_PLIST = exports.START_PLIST = void 0;
|
|
4
4
|
exports.START_PLIST = '<plist><dict>';
|
|
5
5
|
exports.END_PLIST = '</dict></plist>';
|
|
6
6
|
exports.AUTO_START_PROP = '<key>DTXAutoStart</key>';
|
|
7
7
|
exports.FLAVOR_PROP = '<key>DTXFlavor</key>\n<string>react_native</string>';
|
|
8
|
+
exports.WEBREQUEST_FALLBACK_PROP = '<key>DTXDisableWebRequestsInstrumentationV2</key>\n<true/>';
|
|
8
9
|
exports.DEFAULT_CONTROLS_PROP = '<key>DTXExcludedControls</key>\n<array>\n\t<string>PickerView</string>\n\t<string>Switch</string>\n</array>';
|
|
9
10
|
exports.START_CONTROLS_PROP = '<key>DTXExcludedControls</key>\n<array>';
|
|
10
11
|
exports.END_CONTROLS_PROP = '\n</array>';
|