@dynatrace/cordova-plugin 1.275.1 → 2.279.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 +44 -14
- package/files/default.config.js +1 -1
- package/files/iOS/Dynatrace.xcframework/Info.plist +9 -9
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Info.plist +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.abi.json +1 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json +1 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +1 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +15 -15
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Info.plist +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +11 -11
- package/files/plugin.gradle +1 -1
- package/networking/NativeNetworkInterceptorUtils.js +1 -1
- package/package.json +4 -5
- package/plugin.xml +3 -3
- package/scripts/Android.js +11 -2
- package/scripts/Install.js +2 -6
- package/scripts/Uninstall.js +5 -13
- package/scripts/config/javascript/JavaScriptAgentMode.js +1 -1
- package/scripts/helpers/InstallHelper.js +7 -76
- package/scripts/helpers/PathHelper.js +2 -2
- package/typings/main.d.ts +4 -4
package/README.md
CHANGED
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
This plugin gives you the ability to use the Dynatrace instrumentation in your hybrid application (Cordova, Ionic, Capacitor ..). It uses the Mobile Agent and the JavaScript Agent. The Mobile Agent will give you all device specific values containing lifecycle information and the JavaScript Agent will allow you to manually instrument your JavaScript/TypeScript code out of the box (TypeScript definitions included). The JavaScript Agent will cover the network calls (depending on your used libraries) and will automatically detect them.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Upgrading major versions
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
If you are upgrading from version 1.xxx.x of the plugin to the new major version 2.xxx.x, please follow the instructions below:
|
|
10
|
+
* Uninstall the version 1.xxx.x of the plugin from the root directory of your project:
|
|
11
|
+
* `cordova plugin remove dynatrace-cordova-plugin`
|
|
12
|
+
* Install the latest version of the plugin:
|
|
13
|
+
* `cordova plugin add @dynatrace/cordova-plugin@latest --save`
|
|
14
|
+
|
|
15
|
+
For information as to why this is necessary, read more [here](#migration-from-major-version-1-to-2).
|
|
10
16
|
|
|
11
17
|
## Requirements
|
|
12
18
|
|
|
@@ -19,13 +25,14 @@ The `dynatrace-cordova-plugin` is the old version of this plugin. Consider it de
|
|
|
19
25
|
* For iOS users: Minimum iOS 11
|
|
20
26
|
* For JavaScript Agent: access to API of cluster
|
|
21
27
|
* Node: >= 16.x
|
|
28
|
+
* Cordova: 10+
|
|
22
29
|
|
|
23
30
|
## Agent Versions
|
|
24
31
|
|
|
25
32
|
This agent versions are configured in this plugin:
|
|
26
33
|
|
|
27
|
-
* Android Agent: 8.
|
|
28
|
-
* iOS Agent: 8.
|
|
34
|
+
* Android Agent: 8.279.1.1002
|
|
35
|
+
* iOS Agent: 8.279.1.1008
|
|
29
36
|
|
|
30
37
|
## Quick Setup
|
|
31
38
|
|
|
@@ -66,7 +73,7 @@ This agent versions are configured in this plugin:
|
|
|
66
73
|
* [Ionic WebView for Cordova](#ionic-webview-for-cordova)
|
|
67
74
|
* [Download older plugin version](#download-older-plugin-version)
|
|
68
75
|
* [Custom arguments for instrumentation script](#custom-arguments-for-instrumentation-script)
|
|
69
|
-
* [Migration from
|
|
76
|
+
* [Migration from major version 1 to 2](#migration-from-major-version-1-to-2)
|
|
70
77
|
* [Updating to Gradle 6](#updating-to-gradle-6)
|
|
71
78
|
* [MavenCentral in top level gradle file](#mavencentral-in-top-level-gradle-file)
|
|
72
79
|
* [Native OneAgent debug logs](#native-oneagent-debug-logs)
|
|
@@ -295,16 +302,16 @@ Basically all needed properties for the JavaScript Agent are predefined by the d
|
|
|
295
302
|
Using a specific mode can allow you during build to insert any of the available JavaScript agent code snippet options that are offered.
|
|
296
303
|
[Click here](https://www.dynatrace.com/support/help/shortlink/rum-injection#manual-insertion) for more details on the options listed below:
|
|
297
304
|
* 0 - `jsInlineScript`
|
|
298
|
-
* 1 - `jsTagComplete`
|
|
299
|
-
* 2 - `syncCS`
|
|
305
|
+
* 1 - `jsTagComplete` (Default)
|
|
306
|
+
* 2 - `syncCS`
|
|
300
307
|
* 3 - `asyncCS`
|
|
301
|
-
* 4 - `jsTag`
|
|
308
|
+
* 4 - `jsTag`
|
|
302
309
|
|
|
303
310
|
```js
|
|
304
311
|
module.exports = {
|
|
305
312
|
js : {
|
|
306
313
|
url : `https://.../jsInlineScript/...`,
|
|
307
|
-
mode:
|
|
314
|
+
mode: 1
|
|
308
315
|
},
|
|
309
316
|
}
|
|
310
317
|
```
|
|
@@ -690,14 +697,25 @@ For the local script file, we copy the specified file 1:1. It is best to downloa
|
|
|
690
697
|
|
|
691
698
|
[]()
|
|
692
699
|
|
|
700
|
+
## Migration from major version 1 to 2
|
|
693
701
|
|
|
694
|
-
|
|
702
|
+
The id has now changed for the plugin from `dynatrace-cordova-plugin` to `@dyntrace/cordova-plugin`. Because of this, there can be some issues with the upgrading of the plugin from major version `1.xxx.x` to `2.xxx.x`. You will likely see the following error if you are just trying to install the newest version of the plugin:
|
|
695
703
|
|
|
696
|
-
|
|
704
|
+
```
|
|
705
|
+
Error during processing of action! Attempting to revert...
|
|
706
|
+
Failed to install '@dynatrace/cordova-plugin': CordovaError: Uh oh!
|
|
707
|
+
"/path/DynatraceCordovaPlugin.java" already exists!
|
|
708
|
+
at copyNewFile (/projectPath/node_modules/cordova-android/lib/pluginHandlers.js:231:45)
|
|
709
|
+
at install (/projectPath/node_modules/cordova-android/lib/pluginHandlers.js:34:17)
|
|
710
|
+
at ActionStack.process (/projectPath/node_modules/cordova-common/src/ActionStack.js:55:25)
|
|
711
|
+
at PluginManager.doOperation (/projectPath/node_modules/cordova-common/src/PluginManager.js:111:24)
|
|
712
|
+
at PluginManager.addPlugin (/projectPath/node_modules/cordova-common/src/PluginManager.js:141:21)
|
|
713
|
+
at /Users/nicholas.mcwherter/projectPath/node_modules/cordova-android/lib/Api.js:155:78
|
|
714
|
+
Uh oh!
|
|
715
|
+
"/projectPath/platforms/android/app/src/main/java/com/dynatrace/cordova/plugin/DynatraceCordovaPlugin.java" already exists!
|
|
716
|
+
```
|
|
697
717
|
|
|
698
|
-
|
|
699
|
-
* The plugin raised the requirements for Gradle to version 6. This can easily be [upgraded](#updating-to-gradle-6) in your project by changing one line.
|
|
700
|
-
* The format of the configuration changed from `dynatrace.config` to `dynatrace.config.js`. The new format can be downloaded via WebUI. If you had some custom settings in Android take a look in the detailed [documentation](#official-documentation). The format of iOS basically stayed the same.
|
|
718
|
+
It will be necessary to follow the steps mentioned [here](#upgrading-major-versions) to resolve this issue.
|
|
701
719
|
|
|
702
720
|
## Updating to Gradle 6
|
|
703
721
|
|
|
@@ -822,6 +840,18 @@ When using Apple Pay with WKWebView, there are specific checks that WebKit (Appl
|
|
|
822
840
|
|
|
823
841
|
## Changelog
|
|
824
842
|
|
|
843
|
+
2.279.1
|
|
844
|
+
* Updated typings
|
|
845
|
+
* Fixed x-dtc issue for native web requests
|
|
846
|
+
* Changed default injection mode from SyncCS to JsTagComplete
|
|
847
|
+
* Fixed issue with path for npx and capacitor
|
|
848
|
+
* Updated Android (8.279.1.1002) & iOS Agent (8.279.1.1008)
|
|
849
|
+
|
|
850
|
+
2.277.1
|
|
851
|
+
* Updated requirements for Cordova 10+
|
|
852
|
+
* Changed plugin id to @dynatrace/cordova-plugin and removed old workarounds used for plugin migration
|
|
853
|
+
* Updated Android (8.277.1.1003) & iOS Agent (8.277.1.1004)
|
|
854
|
+
|
|
825
855
|
1.275.1
|
|
826
856
|
* Updated iOS Agent (8.275.1.1006)
|
|
827
857
|
* Added an [opt-out](#opt-out) feature for modifying package.json
|
package/files/default.config.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>
|
|
9
|
+
<string>tvos-arm64</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>Dynatrace.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
<string>arm64</string>
|
|
15
15
|
</array>
|
|
16
16
|
<key>SupportedPlatform</key>
|
|
17
|
-
<string>
|
|
17
|
+
<string>tvos</string>
|
|
18
18
|
</dict>
|
|
19
19
|
<dict>
|
|
20
20
|
<key>LibraryIdentifier</key>
|
|
21
|
-
<string>
|
|
21
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
22
22
|
<key>LibraryPath</key>
|
|
23
23
|
<string>Dynatrace.framework</string>
|
|
24
24
|
<key>SupportedArchitectures</key>
|
|
@@ -27,36 +27,36 @@
|
|
|
27
27
|
<string>x86_64</string>
|
|
28
28
|
</array>
|
|
29
29
|
<key>SupportedPlatform</key>
|
|
30
|
-
<string>
|
|
30
|
+
<string>ios</string>
|
|
31
31
|
<key>SupportedPlatformVariant</key>
|
|
32
32
|
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
<dict>
|
|
35
35
|
<key>LibraryIdentifier</key>
|
|
36
|
-
<string>tvos-
|
|
36
|
+
<string>tvos-arm64_x86_64-simulator</string>
|
|
37
37
|
<key>LibraryPath</key>
|
|
38
38
|
<string>Dynatrace.framework</string>
|
|
39
39
|
<key>SupportedArchitectures</key>
|
|
40
40
|
<array>
|
|
41
41
|
<string>arm64</string>
|
|
42
|
+
<string>x86_64</string>
|
|
42
43
|
</array>
|
|
43
44
|
<key>SupportedPlatform</key>
|
|
44
45
|
<string>tvos</string>
|
|
46
|
+
<key>SupportedPlatformVariant</key>
|
|
47
|
+
<string>simulator</string>
|
|
45
48
|
</dict>
|
|
46
49
|
<dict>
|
|
47
50
|
<key>LibraryIdentifier</key>
|
|
48
|
-
<string>ios-
|
|
51
|
+
<string>ios-arm64</string>
|
|
49
52
|
<key>LibraryPath</key>
|
|
50
53
|
<string>Dynatrace.framework</string>
|
|
51
54
|
<key>SupportedArchitectures</key>
|
|
52
55
|
<array>
|
|
53
56
|
<string>arm64</string>
|
|
54
|
-
<string>x86_64</string>
|
|
55
57
|
</array>
|
|
56
58
|
<key>SupportedPlatform</key>
|
|
57
59
|
<string>ios</string>
|
|
58
|
-
<key>SupportedPlatformVariant</key>
|
|
59
|
-
<string>simulator</string>
|
|
60
60
|
</dict>
|
|
61
61
|
</array>
|
|
62
62
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
},
|
|
573
573
|
"ConstValues": [
|
|
574
574
|
{
|
|
575
|
-
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.
|
|
575
|
+
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.279.x\/adk\/DynatraceUEM\/Dynatrace\/SwiftUIExtensions.swift",
|
|
576
576
|
"kind": "BooleanLiteral",
|
|
577
577
|
"offset": 1277,
|
|
578
578
|
"length": 4,
|
package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace
CHANGED
|
Binary file
|
package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Info.plist
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
},
|
|
573
573
|
"ConstValues": [
|
|
574
574
|
{
|
|
575
|
-
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.
|
|
575
|
+
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.279.x\/adk\/DynatraceUEM\/Dynatrace\/SwiftUIExtensions.swift",
|
|
576
576
|
"kind": "BooleanLiteral",
|
|
577
577
|
"offset": 1277,
|
|
578
578
|
"length": 4,
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
},
|
|
573
573
|
"ConstValues": [
|
|
574
574
|
{
|
|
575
|
-
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.
|
|
575
|
+
"filePath": "\/opt\/jenkins\/workspace\/eAgent_ios-agent_release_8.279.x\/adk\/DynatraceUEM\/Dynatrace\/SwiftUIExtensions.swift",
|
|
576
576
|
"kind": "BooleanLiteral",
|
|
577
577
|
"offset": 1277,
|
|
578
578
|
"length": 4,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/Dynatrace.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
4R14YNDzQ2t6gVLICOR9y5SdsTQ=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/DynatraceSwiftUI.h</key>
|
|
16
16
|
<data>
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Info.plist</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
YxznMhoJbJd0XUOYxNlbV5t/axE=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
IvyunfBrYVZfGk40Ofg8TNHvz7o=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
afkhswQOQrvBK0pYTn3QObAA+4Y=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
xv2Ho3pny/r5G2cLYIotrVqBC4o=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
McIMSYevb7EMazqlTDW/axnAPck=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
xv2Ho3pny/r5G2cLYIotrVqBC4o=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
60
60
|
<data>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
72
72
|
<data>
|
|
73
|
-
|
|
73
|
+
OPbffP0WHjrZAAnHb+NQ8zA0Xfs=
|
|
74
74
|
</data>
|
|
75
75
|
<key>Modules/module.modulemap</key>
|
|
76
76
|
<data>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<dict>
|
|
91
91
|
<key>hash2</key>
|
|
92
92
|
<data>
|
|
93
|
-
|
|
93
|
+
U9eGbN/8QljNwyzW+pX6rSlRquji362/5Bsv0ZbexOc=
|
|
94
94
|
</data>
|
|
95
95
|
</dict>
|
|
96
96
|
<key>Headers/DynatraceSwiftUI.h</key>
|
|
@@ -111,21 +111,21 @@
|
|
|
111
111
|
<dict>
|
|
112
112
|
<key>hash2</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
icxKwDtCgMuB9/sVmz/HxDjcRNbCSUKRZ4vKV3rdlBs=
|
|
115
115
|
</data>
|
|
116
116
|
</dict>
|
|
117
117
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
|
118
118
|
<dict>
|
|
119
119
|
<key>hash2</key>
|
|
120
120
|
<data>
|
|
121
|
-
|
|
121
|
+
+Wx01nOWAEn0jCjkkYo6kDhEAFpRXt1AVC7FWoScpXg=
|
|
122
122
|
</data>
|
|
123
123
|
</dict>
|
|
124
124
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
125
125
|
<dict>
|
|
126
126
|
<key>hash2</key>
|
|
127
127
|
<data>
|
|
128
|
-
|
|
128
|
+
H7xvM6xiHnJcWchlKEKnEgZlr9CKS8IeaM8rKwZGo9Y=
|
|
129
129
|
</data>
|
|
130
130
|
</dict>
|
|
131
131
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -153,14 +153,14 @@
|
|
|
153
153
|
<dict>
|
|
154
154
|
<key>hash2</key>
|
|
155
155
|
<data>
|
|
156
|
-
|
|
156
|
+
1CfxTeEJBsxtg9l0KUEfcULcNMhLlhrlJS/k5C+GufU=
|
|
157
157
|
</data>
|
|
158
158
|
</dict>
|
|
159
159
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
160
160
|
<dict>
|
|
161
161
|
<key>hash2</key>
|
|
162
162
|
<data>
|
|
163
|
-
|
|
163
|
+
H7xvM6xiHnJcWchlKEKnEgZlr9CKS8IeaM8rKwZGo9Y=
|
|
164
164
|
</data>
|
|
165
165
|
</dict>
|
|
166
166
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
<dict>
|
|
189
189
|
<key>hash2</key>
|
|
190
190
|
<data>
|
|
191
|
-
|
|
191
|
+
8nbYuGCzAnNBz33m1LvZJPmHWne8stV6BIcCU1KtMME=
|
|
192
192
|
</data>
|
|
193
193
|
</dict>
|
|
194
194
|
<key>Modules/module.modulemap</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace
CHANGED
|
Binary file
|
package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/Dynatrace.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
4R14YNDzQ2t6gVLICOR9y5SdsTQ=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/DynatraceSwiftUI.h</key>
|
|
16
16
|
<data>
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Info.plist</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
rDnF0SvyjrOAtz2T8nfj25wKyVE=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
dSJRK9TS+90LUpmmjO0LceG1u7c=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
1GvIA8Piq4aD3RtFBDmrjdyZ8hQ=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
PsqR8XNEaAqsS0PnMk2bjiGF4lA=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json</key>
|
|
56
56
|
<data>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftmodule</key>
|
|
72
72
|
<data>
|
|
73
|
-
|
|
73
|
+
RVGYCD9TSNihbSBpFaBJdenY1qI=
|
|
74
74
|
</data>
|
|
75
75
|
<key>Modules/module.modulemap</key>
|
|
76
76
|
<data>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<dict>
|
|
91
91
|
<key>hash2</key>
|
|
92
92
|
<data>
|
|
93
|
-
|
|
93
|
+
U9eGbN/8QljNwyzW+pX6rSlRquji362/5Bsv0ZbexOc=
|
|
94
94
|
</data>
|
|
95
95
|
</dict>
|
|
96
96
|
<key>Headers/DynatraceSwiftUI.h</key>
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
<dict>
|
|
112
112
|
<key>hash2</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
kyD3Q9yN3SSfJ1uGUf8vRh3uSOCfDp+iYGCJMyGvDz8=
|
|
115
115
|
</data>
|
|
116
116
|
</dict>
|
|
117
117
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
118
118
|
<dict>
|
|
119
119
|
<key>hash2</key>
|
|
120
120
|
<data>
|
|
121
|
-
|
|
121
|
+
hwJTauOU3LSLzojncHKPWaXAAUZE71mVpUJ4kNbYZQ8=
|
|
122
122
|
</data>
|
|
123
123
|
</dict>
|
|
124
124
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json</key>
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
<dict>
|
|
154
154
|
<key>hash2</key>
|
|
155
155
|
<data>
|
|
156
|
-
|
|
156
|
+
7RLSnVnlem6sCnFmVowLLOrpSDT5ROLnxKwwlsVenY0=
|
|
157
157
|
</data>
|
|
158
158
|
</dict>
|
|
159
159
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json</key>
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
<dict>
|
|
189
189
|
<key>hash2</key>
|
|
190
190
|
<data>
|
|
191
|
-
|
|
191
|
+
K+cSCK+4df10M7RMyYcdGm5jv3YJ+vIZc9X0CXWICK0=
|
|
192
192
|
</data>
|
|
193
193
|
</dict>
|
|
194
194
|
<key>Modules/module.modulemap</key>
|
package/files/plugin.gradle
CHANGED
|
@@ -9,7 +9,7 @@ var getDTC = function (actionId) {
|
|
|
9
9
|
dtAdk = getLocalStorageValue('dtAdk');
|
|
10
10
|
}
|
|
11
11
|
return "sn=\"".concat(getSessionNumber(getCookieValue('dtCookie')), "\", pc=\"").concat(patchPageContext(getCookieValue('dtPC'), actionId), "\"")
|
|
12
|
-
+ ", v=\"".concat(getCookieValue('rxVisitor'), "\", r=\"").concat(referer, "\", app=\"").concat(getApplicationId(), "\" adk=\"").concat(dtAdk, "\"");
|
|
12
|
+
+ ", v=\"".concat(getCookieValue('rxVisitor'), "\", r=\"").concat(referer, "\", app=\"").concat(getApplicationId(), "\", adk=\"").concat(dtAdk, "\"");
|
|
13
13
|
};
|
|
14
14
|
var getReferer = function (actionId) {
|
|
15
15
|
var referer = '';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/cordova-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.279.1",
|
|
4
4
|
"description": "This plugin gives you the ability to use the Dynatrace instrumentation in your hybrid application (Cordova, Ionic, ..). It uses the Mobile Agent, the JavaScript Agent. The Mobile Agent will give you all device specific values containing lifecycle information and the Javascript Agent will allow you to manually instrument your JavaScript/TypeScript code out of the box (Typescript definitions included). The JavaScript Agent will cover the network calls and will automatically detect them.",
|
|
5
5
|
"cordova": {
|
|
6
|
-
"id": "dynatrace
|
|
6
|
+
"id": "@dynatrace/cordova-plugin",
|
|
7
7
|
"platforms": [
|
|
8
8
|
"ios",
|
|
9
9
|
"android",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"homepage": "https://www.dynatrace.com/",
|
|
38
38
|
"license" : "SEE LICENSE IN LICENSE.md",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"axios": "^1.
|
|
41
|
-
"cordova-common": "^5.0.0",
|
|
40
|
+
"axios": "^1.6.2",
|
|
42
41
|
"jsdom": "^22.1.0",
|
|
43
42
|
"plist": "^3.1.0"
|
|
44
43
|
},
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"eslint-plugin-jsdoc": "^38.0.6",
|
|
58
57
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
59
58
|
"eslint-plugin-unicorn": "^41.0.1",
|
|
60
|
-
"cordova": "^
|
|
59
|
+
"cordova": "^12.0.0",
|
|
61
60
|
"jest": "^29.2.2",
|
|
62
61
|
"mock-fs": "^5.2.0",
|
|
63
62
|
"npm-check-updates": "^12.5.8",
|
package/plugin.xml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
|
|
3
3
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
|
-
id="dynatrace
|
|
5
|
-
version="
|
|
4
|
+
id="@dynatrace/cordova-plugin"
|
|
5
|
+
version="2.279.1">
|
|
6
6
|
<name>Dynatrace</name>
|
|
7
7
|
<description>Dynatrace Cordova Plugin</description>
|
|
8
8
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<source-file src="other/DynatraceCordovaPlugin.m"/>
|
|
42
42
|
</platform>
|
|
43
43
|
<platform name="android">
|
|
44
|
-
<framework src="com.dynatrace.agent:agent-android:8.
|
|
44
|
+
<framework src="com.dynatrace.agent:agent-android:8.279.1.1002" />
|
|
45
45
|
<source-file src="other/DynatraceCordovaPlugin.java" target-dir="src/com/dynatrace/cordova/plugin" />
|
|
46
46
|
|
|
47
47
|
<config-file target="config.xml" parent="/*">
|
package/scripts/Android.js
CHANGED
|
@@ -8,6 +8,7 @@ var Logger_1 = require("./logger/Logger");
|
|
|
8
8
|
var PathHelper_1 = require("./helpers/PathHelper");
|
|
9
9
|
var GRADLE_CONFIG_IDENTIFIER = '// AUTO - INSERTED';
|
|
10
10
|
var GRADLE_BUILDSCRIPT_IDENTIFIER = 'buildscript';
|
|
11
|
+
var OLD_DYNATRACE_PLUGIN = 'dynatrace-cordova-plugin';
|
|
11
12
|
var getGradleApplyDynatraceScript = function () { return "apply from: \"".concat((0, PathHelper_1.getDynatraceGradleFile)().split(path_1.sep).join("".concat(path_1.sep + path_1.sep)), "\""); };
|
|
12
13
|
exports.getGradleApplyDynatraceScript = getGradleApplyDynatraceScript;
|
|
13
14
|
var getGradleApplyBuildScript = function () {
|
|
@@ -54,7 +55,12 @@ var changeCordovaBuildGradleFile = function (pathToGradle, remove) {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
else {
|
|
57
|
-
|
|
58
|
+
var oldPluginValue = gradleFileContentLines[gradlePluginFileIndex];
|
|
59
|
+
var oldDynatraceValue = gradleFileContentLines[gradleDynatraceFileIndex];
|
|
60
|
+
if (gradlePluginFileIndex === -1 || (oldPluginValue !== undefined && oldPluginValue.includes(OLD_DYNATRACE_PLUGIN))) {
|
|
61
|
+
if (oldPluginValue !== undefined && oldPluginValue.includes(OLD_DYNATRACE_PLUGIN)) {
|
|
62
|
+
gradleFileContentLines.splice(gradlePluginFileIndex, 1);
|
|
63
|
+
}
|
|
58
64
|
var gradleFileCordovaIndex = -1;
|
|
59
65
|
for (var i = 0; i < gradleFileContentLines.length; i++) {
|
|
60
66
|
if (gradleFileContentLines[i].startsWith(GRADLE_BUILDSCRIPT_IDENTIFIER)) {
|
|
@@ -68,7 +74,10 @@ var changeCordovaBuildGradleFile = function (pathToGradle, remove) {
|
|
|
68
74
|
gradleFileContentLines.splice(gradleFileCordovaIndex + 1, 0, (0, exports.getGradleApplyBuildScript)());
|
|
69
75
|
modified = true;
|
|
70
76
|
}
|
|
71
|
-
if (gradleDynatraceFileIndex === -1) {
|
|
77
|
+
if (gradleDynatraceFileIndex === -1 || (oldDynatraceValue !== undefined && oldDynatraceValue.includes(OLD_DYNATRACE_PLUGIN))) {
|
|
78
|
+
if (oldDynatraceValue !== undefined && oldDynatraceValue.includes(OLD_DYNATRACE_PLUGIN)) {
|
|
79
|
+
gradleFileContentLines.splice(gradleDynatraceFileIndex, 1);
|
|
80
|
+
}
|
|
72
81
|
gradleFileContentLines.splice(gradleFileContentLines.length, 0, (0, exports.getGradleApplyDynatraceScript)());
|
|
73
82
|
modified = true;
|
|
74
83
|
}
|
package/scripts/Install.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var ConfigurationUtil_1 = require("./config/ConfigurationUtil");
|
|
4
|
-
var InstallHelper_1 = require("./helpers/InstallHelper");
|
|
5
4
|
module.exports = function (context) { return new Promise(function (resolve) {
|
|
6
|
-
(0,
|
|
7
|
-
(
|
|
8
|
-
(0, ConfigurationUtil_1.checkConfiguration)().then(function () {
|
|
9
|
-
resolve('');
|
|
10
|
-
});
|
|
5
|
+
(0, ConfigurationUtil_1.checkConfiguration)().then(function () {
|
|
6
|
+
resolve('');
|
|
11
7
|
});
|
|
12
8
|
}); };
|
package/scripts/Uninstall.js
CHANGED
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var InstallHelper_1 = require("./helpers/InstallHelper");
|
|
4
4
|
module.exports = function (context) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return new Promise(function (resolve) {
|
|
11
|
-
(0, InstallHelper_1.modifyPackageJson)(false).then(function () { return (0, InstallHelper_1.removeGradleModification)(); }).then(function () { return (0, InstallHelper_1.removePListModification)(); }).then(function () {
|
|
12
|
-
(0, InstallHelper_1.modifyConfigXmlUninstall)();
|
|
13
|
-
resolve('');
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
5
|
+
return new Promise(function (resolve) {
|
|
6
|
+
(0, InstallHelper_1.removeGradleModification)().then(function () { return (0, InstallHelper_1.removePListModification)(); }).then(function () {
|
|
7
|
+
resolve('');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
18
10
|
};
|
|
@@ -9,7 +9,7 @@ var JavaScriptAgentMode;
|
|
|
9
9
|
JavaScriptAgentMode[JavaScriptAgentMode["AsyncCs"] = 3] = "AsyncCs";
|
|
10
10
|
JavaScriptAgentMode[JavaScriptAgentMode["JsTag"] = 4] = "JsTag";
|
|
11
11
|
})(JavaScriptAgentMode = exports.JavaScriptAgentMode || (exports.JavaScriptAgentMode = {}));
|
|
12
|
-
exports.DEFAULT_JAVASCRIPT_AGENT_MODE = JavaScriptAgentMode.
|
|
12
|
+
exports.DEFAULT_JAVASCRIPT_AGENT_MODE = JavaScriptAgentMode.JsTagComplete;
|
|
13
13
|
exports.JAVA_SCRIPT_AGENT_MODE_NAMES = ['jsInlineScript', 'jsTagComplete', 'syncCS', 'asyncCS', 'jsTag'];
|
|
14
14
|
var parseNumberToMode = function (mode) {
|
|
15
15
|
switch (mode) {
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.isOptOut = exports.parsedNpmConfig = exports.parsedCapPackageJson = exports.parsedPluginPackageJson = exports.parsedApplicationPackageJson = exports.removeScriptHookAndDeps = exports.addScriptHook = exports.isCapVersionThreeOneOrHigher = exports.
|
|
39
|
+
exports.isOptOut = exports.parsedNpmConfig = exports.parsedCapPackageJson = exports.parsedPluginPackageJson = exports.parsedApplicationPackageJson = exports.removeScriptHookAndDeps = exports.addScriptHook = exports.isCapVersionThreeOneOrHigher = exports.removePListModification = exports.removeGradleModification = exports.modifyPackageJsonCap = exports.CAP_HOOK = exports.IONIC_HOOK = void 0;
|
|
40
40
|
var path_1 = require("path");
|
|
41
41
|
var fs_1 = require("fs");
|
|
42
42
|
var Android_1 = require("../Android");
|
|
@@ -45,11 +45,9 @@ var Logger_1 = require("../logger/Logger");
|
|
|
45
45
|
var FileHelper_1 = require("./FileHelper");
|
|
46
46
|
var PathHelper_1 = require("./PathHelper");
|
|
47
47
|
var child_process_1 = require("child_process");
|
|
48
|
-
var ConfigParser = require('cordova-common').ConfigParser;
|
|
49
48
|
exports.IONIC_HOOK = 'ionic:capacitor:build:before';
|
|
50
49
|
exports.CAP_HOOK = 'capacitor:sync:after';
|
|
51
50
|
var DYNATRACE_PLUGIN = '@dynatrace/cordova-plugin';
|
|
52
|
-
var OLD_DYNATRACE_PLUGIN = 'dynatrace-cordova-plugin';
|
|
53
51
|
var NPM_CONFIG_OPT_OUT = 'dynatrace-not-adding-scripts';
|
|
54
52
|
var modifyPackageJsonCap = function (install, isOptOut, path) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
53
|
var packageJsonParsed, _a, capPackageJsonParsed, capHookValue, e_1;
|
|
@@ -107,42 +105,6 @@ var modifyPackageJsonCap = function (install, isOptOut, path) { return __awaiter
|
|
|
107
105
|
});
|
|
108
106
|
}); };
|
|
109
107
|
exports.modifyPackageJsonCap = modifyPackageJsonCap;
|
|
110
|
-
var modifyPackageJson = function (install) { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
-
var packageJsonParsed, e_2;
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
switch (_a.label) {
|
|
114
|
-
case 0:
|
|
115
|
-
_a.trys.push([0, 3, , 4]);
|
|
116
|
-
return [4, (0, exports.parsedApplicationPackageJson)()];
|
|
117
|
-
case 1:
|
|
118
|
-
packageJsonParsed = _a.sent();
|
|
119
|
-
if (install) {
|
|
120
|
-
if (packageJsonParsed.scripts === undefined) {
|
|
121
|
-
packageJsonParsed.scripts = {};
|
|
122
|
-
}
|
|
123
|
-
packageJsonParsed.cordova.plugins[DYNATRACE_PLUGIN] = {};
|
|
124
|
-
delete packageJsonParsed.cordova.plugins[OLD_DYNATRACE_PLUGIN];
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
if (packageJsonParsed.cordova !== undefined && packageJsonParsed.cordova.plugins !== undefined) {
|
|
128
|
-
delete packageJsonParsed.cordova.plugins[DYNATRACE_PLUGIN];
|
|
129
|
-
delete packageJsonParsed.cordova.plugins[OLD_DYNATRACE_PLUGIN];
|
|
130
|
-
}
|
|
131
|
-
packageJsonParsed = (0, exports.removeScriptHookAndDeps)(packageJsonParsed);
|
|
132
|
-
}
|
|
133
|
-
return [4, (0, FileHelper_1.writeTextToFile)((0, PathHelper_1.getApplicationPackage)(), JSON.stringify(packageJsonParsed, null, '\t'))];
|
|
134
|
-
case 2:
|
|
135
|
-
_a.sent();
|
|
136
|
-
return [3, 4];
|
|
137
|
-
case 3:
|
|
138
|
-
e_2 = _a.sent();
|
|
139
|
-
Logger_1.Logger.getInstance().logWarning('Cannot find package.json!');
|
|
140
|
-
return [3, 4];
|
|
141
|
-
case 4: return [2];
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}); };
|
|
145
|
-
exports.modifyPackageJson = modifyPackageJson;
|
|
146
108
|
var removeGradleModification = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
109
|
var path;
|
|
148
110
|
return __generator(this, function (_a) {
|
|
@@ -170,7 +132,7 @@ var removeGradleModification = function () { return __awaiter(void 0, void 0, vo
|
|
|
170
132
|
}); };
|
|
171
133
|
exports.removeGradleModification = removeGradleModification;
|
|
172
134
|
var removePListModification = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
|
-
var isCapacitor,
|
|
135
|
+
var isCapacitor, e_2, e_3;
|
|
174
136
|
return __generator(this, function (_a) {
|
|
175
137
|
switch (_a.label) {
|
|
176
138
|
case 0:
|
|
@@ -193,49 +155,18 @@ var removePListModification = function () { return __awaiter(void 0, void 0, voi
|
|
|
193
155
|
_a.label = 5;
|
|
194
156
|
case 5: return [3, 7];
|
|
195
157
|
case 6:
|
|
196
|
-
|
|
158
|
+
e_2 = _a.sent();
|
|
197
159
|
Logger_1.Logger.getInstance().logError("Removal of PList modification didn't work!");
|
|
198
160
|
return [3, 7];
|
|
199
161
|
case 7: return [3, 9];
|
|
200
162
|
case 8:
|
|
201
|
-
|
|
163
|
+
e_3 = _a.sent();
|
|
202
164
|
return [3, 9];
|
|
203
165
|
case 9: return [2];
|
|
204
166
|
}
|
|
205
167
|
});
|
|
206
168
|
}); };
|
|
207
169
|
exports.removePListModification = removePListModification;
|
|
208
|
-
var modifyConfigXmlInstall = function () {
|
|
209
|
-
try {
|
|
210
|
-
var ConfigParser_1 = require('cordova-common').ConfigParser;
|
|
211
|
-
var cfg = new ConfigParser_1((0, path_1.join)((0, PathHelper_1.getApplicationPath)(), 'config.xml'));
|
|
212
|
-
var plugin = cfg.getPlugin('dynatrace-cordova-plugin');
|
|
213
|
-
if (plugin === undefined) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
var pluginWithAt = cfg.getPlugin(DYNATRACE_PLUGIN);
|
|
217
|
-
if (pluginWithAt === undefined) {
|
|
218
|
-
cfg.addPlugin({ name: DYNATRACE_PLUGIN, spec: plugin.spec });
|
|
219
|
-
}
|
|
220
|
-
cfg.removePlugin(OLD_DYNATRACE_PLUGIN);
|
|
221
|
-
cfg.write();
|
|
222
|
-
}
|
|
223
|
-
catch (e) {
|
|
224
|
-
Logger_1.Logger.getInstance().logWarning('Config.xml is not available - Cannot modify Dynatrace dependency');
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
exports.modifyConfigXmlInstall = modifyConfigXmlInstall;
|
|
228
|
-
var modifyConfigXmlUninstall = function () {
|
|
229
|
-
try {
|
|
230
|
-
var cfg = new ConfigParser((0, path_1.join)((0, PathHelper_1.getApplicationPath)(), 'config.xml'));
|
|
231
|
-
cfg.removePlugin(DYNATRACE_PLUGIN);
|
|
232
|
-
cfg.write();
|
|
233
|
-
}
|
|
234
|
-
catch (e) {
|
|
235
|
-
Logger_1.Logger.getInstance().logWarning('Config.xml is not available - Cannot modify Dynatrace dependency');
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
exports.modifyConfigXmlUninstall = modifyConfigXmlUninstall;
|
|
239
170
|
var isCapVersionThreeOneOrHigher = function (packageJson) {
|
|
240
171
|
var version = packageJson.version;
|
|
241
172
|
return Number(version.substring(0, version.lastIndexOf('.'))) >= 3.1;
|
|
@@ -265,7 +196,7 @@ var removeScriptHookAndDeps = function (packageJsonParsed) {
|
|
|
265
196
|
};
|
|
266
197
|
exports.removeScriptHookAndDeps = removeScriptHookAndDeps;
|
|
267
198
|
var parsedPackageJson = function (path) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
-
var _a, _b,
|
|
199
|
+
var _a, _b, e_4;
|
|
269
200
|
return __generator(this, function (_c) {
|
|
270
201
|
switch (_c.label) {
|
|
271
202
|
case 0:
|
|
@@ -274,8 +205,8 @@ var parsedPackageJson = function (path) { return __awaiter(void 0, void 0, void
|
|
|
274
205
|
return [4, (0, FileHelper_1.readTextFromFile)(path)];
|
|
275
206
|
case 1: return [2, _b.apply(_a, [_c.sent()])];
|
|
276
207
|
case 2:
|
|
277
|
-
|
|
278
|
-
Logger_1.Logger.getInstance().logWarning('Error in parsedPackageJson => \n' +
|
|
208
|
+
e_4 = _c.sent();
|
|
209
|
+
Logger_1.Logger.getInstance().logWarning('Error in parsedPackageJson => \n' + e_4 + '\nUnable to find package.json!');
|
|
279
210
|
return [3, 3];
|
|
280
211
|
case 3: return [2];
|
|
281
212
|
}
|
|
@@ -31,7 +31,7 @@ exports.getDynatraceGradleFile = getDynatraceGradleFile;
|
|
|
31
31
|
var getDynatracePluginGradleFile = function () { return (0, path_1.join)(getPluginPath(), FOLDER_FILES, 'plugin.gradle'); };
|
|
32
32
|
exports.getDynatracePluginGradleFile = getDynatracePluginGradleFile;
|
|
33
33
|
var getApplicationPath = function () {
|
|
34
|
-
return
|
|
34
|
+
return (0, path_1.join)(getPluginPath(), '..', '..', '..');
|
|
35
35
|
};
|
|
36
36
|
exports.getApplicationPath = getApplicationPath;
|
|
37
37
|
var getPluginPackage = function () { return (0, path_1.join)(getPluginPath(), FILE_PACKAGE); };
|
|
@@ -130,4 +130,4 @@ var getCapacitorConfig = function (checkForTs) {
|
|
|
130
130
|
exports.getCapacitorConfig = getCapacitorConfig;
|
|
131
131
|
var isCapacitorApp = function () { return (0, fs_1.existsSync)(getCapacitorConfig()) || (0, fs_1.existsSync)(getCapacitorConfig(true)); };
|
|
132
132
|
exports.isCapacitorApp = isCapacitorApp;
|
|
133
|
-
var isNpxCommand = function () { return (0, fs_1.existsSync)((0, path_1.join)(__dirname, '..', '..', '..', '..', '..', 'package.json')); };
|
|
133
|
+
var isNpxCommand = function () { return (0, fs_1.existsSync)((0, path_1.join)(__dirname, '..', '..', '..', '..', '..', 'package.json')) && __dirname.includes('node_modules'); };
|
package/typings/main.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ interface MobileFirstNetworkInterceptor {
|
|
|
29
29
|
/**
|
|
30
30
|
* Disables the interceptor again
|
|
31
31
|
*/
|
|
32
|
-
disableInterceptor();
|
|
32
|
+
disableInterceptor(): void;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface NativeNetworkInterceptorUtils {
|
|
@@ -87,7 +87,7 @@ interface DynatraceMobile {
|
|
|
87
87
|
* @param error callback used when the endSession is not successful
|
|
88
88
|
* @returns Status from if the endVisit call was successful or not
|
|
89
89
|
*/
|
|
90
|
-
endVisit(success: any, error: any);
|
|
90
|
+
endVisit(success: any, error: any): void;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Returns an interceptor which helps you to monitor requests to the Mobile First environment. They are wrapped
|
|
@@ -108,7 +108,7 @@ interface DynatraceMobile {
|
|
|
108
108
|
* @param error callback used when retrieving UserPrivacyOptions is not successful
|
|
109
109
|
* @returns Current user privacy options for the mobile session
|
|
110
110
|
*/
|
|
111
|
-
getUserPrivacyOptions(success: (userPrivacyOptions: UserPrivacyOptions) => any, error: any);
|
|
111
|
+
getUserPrivacyOptions(success: (userPrivacyOptions: UserPrivacyOptions) => any, error: any): void;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Set the data collection level (Off, Performance, UserBehavior)
|
|
@@ -119,7 +119,7 @@ interface DynatraceMobile {
|
|
|
119
119
|
* @param error callback used when applying UserPrivacyOptions is not successful
|
|
120
120
|
* @returns true is applying the UserPrivacyOptions was successful and false if not
|
|
121
121
|
*/
|
|
122
|
-
applyUserPrivacyOptions(dataCollectionLevel: DataCollectionLevel, crashReportingOptedIn: boolean, success: any, error: any);
|
|
122
|
+
applyUserPrivacyOptions(dataCollectionLevel: DataCollectionLevel, crashReportingOptedIn: boolean, success: any, error: any): void;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
interface UserPrivacyOptions {
|