@dynatrace/cordova-plugin 2.331.1 → 2.335.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 +154 -138
- package/files/iOS/Dynatrace.xcframework/Info.plist +11 -11
- package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeResources +135 -135
- package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeSignature +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +3 -1
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +37 -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 +10 -2
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.private.swiftinterface +4 -4
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftinterface +4 -4
- 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-Swift.h +6 -2
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +37 -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 +10 -2
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +4 -4
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -4
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +10 -2
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +4 -4
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +4 -4
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +29 -29
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +3 -1
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +37 -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/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.private.swiftinterface +3 -3
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftinterface +3 -3
- 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-Swift.h +6 -2
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +37 -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/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.private.swiftinterface +3 -3
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftinterface +3 -3
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.private.swiftinterface +3 -3
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftdoc +0 -0
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface +3 -3
- package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +25 -25
- package/files/plugin.gradle +1 -1
- package/networking/NativeNetworkInterceptorUtils.js +2 -2
- package/package.json +2 -2
- package/plugin.xml +2 -2
- package/scripts/helpers/FileHelper.js +4 -4
- package/scripts/helpers/InstallHelper.js +9 -15
- package/scripts/helpers/PathHelper.js +2 -14
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/Dynatrace-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
JPTJnEGc1ujLzn/bS39s2ePHtqY=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/Dynatrace.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
4129c9b7CHW2ROL0W3GHhaT6nO4=
|
|
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
|
+
O/5pC5dkpDQcfp6aurLPCS1eD/8=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
d9xq5v8c12x8TugSe432FC8Fj/A=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
qeUS2TWJKNO0yyoE0glI38/N+ho=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
iWW39j0zrY7kCNR1YH7dAzo3t+E=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftdoc</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
TaK6FEb/VtglVhZ0uzznbICcqoQ=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
iWW39j0zrY7kCNR1YH7dAzo3t+E=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
tGGX02VHV5WTke4Unfgn7lpzxM8=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json</key>
|
|
56
56
|
<data>
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.private.swiftinterface</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
30AmIfXsb1ENiRGE0SrhnWC2zrU=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftdoc</key>
|
|
64
64
|
<data>
|
|
65
|
-
|
|
65
|
+
7bavbhFP7nlggkTRSJou+sQZL9M=
|
|
66
66
|
</data>
|
|
67
67
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
30AmIfXsb1ENiRGE0SrhnWC2zrU=
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftmodule</key>
|
|
72
72
|
<data>
|
|
73
|
-
|
|
73
|
+
NMU7qHVi1h7R/aTijAempxmc9aA=
|
|
74
74
|
</data>
|
|
75
75
|
<key>Modules/module.modulemap</key>
|
|
76
76
|
<data>
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
<dict>
|
|
88
88
|
<key>hash2</key>
|
|
89
89
|
<data>
|
|
90
|
-
|
|
90
|
+
00MPik1nU/D3MIauZvu27bSIOL/9AMwZQj32bdUVd5A=
|
|
91
91
|
</data>
|
|
92
92
|
</dict>
|
|
93
93
|
<key>Headers/Dynatrace.h</key>
|
|
94
94
|
<dict>
|
|
95
95
|
<key>hash2</key>
|
|
96
96
|
<data>
|
|
97
|
-
|
|
97
|
+
i0VMPSoOXJqnX6dqD/b1/Yqd5Op/8YUBt8S7OLcuaOo=
|
|
98
98
|
</data>
|
|
99
99
|
</dict>
|
|
100
100
|
<key>Headers/DynatraceSwiftUI.h</key>
|
|
@@ -115,14 +115,14 @@
|
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
RvdY7h5gJBFpn2i0V577JeQ/7EtkXJ4hd5H3OI0OoaM=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
122
122
|
<dict>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
s+YsqyOTA03k7gN6AYnPbr1lXYHcnzeTjiJqAO6vzf0=
|
|
126
126
|
</data>
|
|
127
127
|
</dict>
|
|
128
128
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json</key>
|
|
@@ -136,28 +136,28 @@
|
|
|
136
136
|
<dict>
|
|
137
137
|
<key>hash2</key>
|
|
138
138
|
<data>
|
|
139
|
-
|
|
139
|
+
ZHwazMDO2VrPBewQORdVEoqdhBSFLJwsp0ckjBhBfF4=
|
|
140
140
|
</data>
|
|
141
141
|
</dict>
|
|
142
142
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftdoc</key>
|
|
143
143
|
<dict>
|
|
144
144
|
<key>hash2</key>
|
|
145
145
|
<data>
|
|
146
|
-
|
|
146
|
+
jDsK6mD08z6dnABd3uZq5sleVSRQ7JkjbHUmeIkTq64=
|
|
147
147
|
</data>
|
|
148
148
|
</dict>
|
|
149
149
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftinterface</key>
|
|
150
150
|
<dict>
|
|
151
151
|
<key>hash2</key>
|
|
152
152
|
<data>
|
|
153
|
-
|
|
153
|
+
ZHwazMDO2VrPBewQORdVEoqdhBSFLJwsp0ckjBhBfF4=
|
|
154
154
|
</data>
|
|
155
155
|
</dict>
|
|
156
156
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftmodule</key>
|
|
157
157
|
<dict>
|
|
158
158
|
<key>hash2</key>
|
|
159
159
|
<data>
|
|
160
|
-
|
|
160
|
+
au+DXTFHDTUh1R5HLFJ2aLolrcfu3D0kDPECLgG5C6w=
|
|
161
161
|
</data>
|
|
162
162
|
</dict>
|
|
163
163
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json</key>
|
|
@@ -171,28 +171,28 @@
|
|
|
171
171
|
<dict>
|
|
172
172
|
<key>hash2</key>
|
|
173
173
|
<data>
|
|
174
|
-
|
|
174
|
+
Ek4KlNj1XU7faUk5y6b/PWb+3a7mQW7bgqwPOmkiY2Q=
|
|
175
175
|
</data>
|
|
176
176
|
</dict>
|
|
177
177
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftdoc</key>
|
|
178
178
|
<dict>
|
|
179
179
|
<key>hash2</key>
|
|
180
180
|
<data>
|
|
181
|
-
|
|
181
|
+
iXZ0RYONs7MnnED3ggHu42sFMoolXa6/qYrZXUqcDRY=
|
|
182
182
|
</data>
|
|
183
183
|
</dict>
|
|
184
184
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface</key>
|
|
185
185
|
<dict>
|
|
186
186
|
<key>hash2</key>
|
|
187
187
|
<data>
|
|
188
|
-
|
|
188
|
+
Ek4KlNj1XU7faUk5y6b/PWb+3a7mQW7bgqwPOmkiY2Q=
|
|
189
189
|
</data>
|
|
190
190
|
</dict>
|
|
191
191
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftmodule</key>
|
|
192
192
|
<dict>
|
|
193
193
|
<key>hash2</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
fq3YTur20EWQnGNqH+1nB8AQvDGAVmz6oFy9zEdpldk=
|
|
196
196
|
</data>
|
|
197
197
|
</dict>
|
|
198
198
|
<key>Modules/module.modulemap</key>
|
package/files/plugin.gradle
CHANGED
|
@@ -33,7 +33,7 @@ var getReferer = function (actionId) {
|
|
|
33
33
|
};
|
|
34
34
|
var patchPageContext = function (pcCookie, actionId) {
|
|
35
35
|
if (pcCookie != null && pcCookie.length > 0) {
|
|
36
|
-
var groups = pcCookie.match(
|
|
36
|
+
var groups = pcCookie.match(/^([^h]+)h([^v]+)v(.+)$/);
|
|
37
37
|
if (groups != null && groups.length === 4) {
|
|
38
38
|
return "".concat(groups[1], "h").concat(actionId, "v").concat(groups[3]);
|
|
39
39
|
}
|
|
@@ -46,7 +46,7 @@ var patchPageContext = function (pcCookie, actionId) {
|
|
|
46
46
|
var getApplicationId = function () { return typeof dT_ !== 'undefined' && typeof dT_.scv !== 'undefined' ? dT_.scv('app') : ''; };
|
|
47
47
|
var getSessionNumber = function (dtCookie) {
|
|
48
48
|
if (dtCookie !== undefined) {
|
|
49
|
-
var groups = dtCookie.match(
|
|
49
|
+
var groups = dtCookie.match(/^v_([^_]+)_srv_([^_]+)_sn_([^_]+)_(.+)$/);
|
|
50
50
|
if (groups != null && groups.length === 5) {
|
|
51
51
|
return "v_".concat(groups[1], "_srv_").concat(groups[2], "_sn_").concat(groups[3]);
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/cordova-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.335.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
6
|
"id": "@dynatrace/cordova-plugin",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"homepage": "https://www.dynatrace.com/",
|
|
41
41
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"axios": "^1.
|
|
43
|
+
"axios": "^1.15.0",
|
|
44
44
|
"jsdom": "^27.0.0",
|
|
45
45
|
"plist": "^3.1.0"
|
|
46
46
|
},
|
package/plugin.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
4
|
id="@dynatrace/cordova-plugin"
|
|
5
|
-
version="2.
|
|
5
|
+
version="2.335.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.335.1.1001" />
|
|
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="/*">
|
|
@@ -67,7 +67,7 @@ var _searchFilePatternInDirectory = function (searchPath, foundFiles, pattern, f
|
|
|
67
67
|
return [2, new Promise(function (resolve, reject) {
|
|
68
68
|
(0, fs_1.readdir)(searchPath, function (err, files) {
|
|
69
69
|
if (err) {
|
|
70
|
-
reject('Directory could not be read: ' + (0, path_1.resolve)(searchPath));
|
|
70
|
+
reject(new Error('Directory could not be read: ' + (0, path_1.resolve)(searchPath)));
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
var promiseArr = [];
|
|
@@ -145,7 +145,7 @@ var readTextFromFile = function (_file) { return __awaiter(void 0, void 0, void
|
|
|
145
145
|
return [2, new Promise(function (resolve, reject) {
|
|
146
146
|
(0, fs_1.readFile)(_file, 'utf8', function (err, data) {
|
|
147
147
|
if (err) {
|
|
148
|
-
reject(err + 'Could not read the file: ' + (0, path_1.resolve)(_file));
|
|
148
|
+
reject(new Error(err.message + ' Could not read the file: ' + (0, path_1.resolve)(_file)));
|
|
149
149
|
}
|
|
150
150
|
resolve(data);
|
|
151
151
|
});
|
|
@@ -158,7 +158,7 @@ var writeTextToFile = function (_file, _text) { return __awaiter(void 0, void 0,
|
|
|
158
158
|
return [2, new Promise(function (resolve, reject) {
|
|
159
159
|
(0, fs_1.writeFile)(_file, _text, function (err) {
|
|
160
160
|
if (err) {
|
|
161
|
-
reject(err + ' Could not write to file: ' + (0, path_1.resolve)(_file));
|
|
161
|
+
reject(new Error(err.message + ' Could not write to file: ' + (0, path_1.resolve)(_file)));
|
|
162
162
|
}
|
|
163
163
|
resolve(_file);
|
|
164
164
|
});
|
|
@@ -238,7 +238,7 @@ exports.deleteDirectory = deleteDirectory;
|
|
|
238
238
|
var deleteDirectorySync = function (dir) {
|
|
239
239
|
(0, fs_1.accessSync)(dir);
|
|
240
240
|
var files = (0, fs_1.readdirSync)(dir);
|
|
241
|
-
files.
|
|
241
|
+
files.forEach(function (file) { return (0, exports.deleteFileSync)((0, path_1.join)(dir, file)); });
|
|
242
242
|
(0, fs_1.rmdirSync)(dir);
|
|
243
243
|
};
|
|
244
244
|
var deleteFile = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -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.moveIosFilesForSPM = exports.replacePackageSwiftWithOriginal = exports.isOptOut = exports.parsedNpmConfig = exports.parsedCapPackageJson = exports.parsedPluginPackageJson = exports.parsedApplicationPackageJson = exports.removeScriptHookAndDeps = exports.addScriptHook = exports.
|
|
39
|
+
exports.moveIosFilesForSPM = exports.replacePackageSwiftWithOriginal = exports.isOptOut = exports.parsedNpmConfig = exports.parsedCapPackageJson = exports.parsedPluginPackageJson = exports.parsedApplicationPackageJson = exports.removeScriptHookAndDeps = exports.addScriptHook = 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");
|
|
@@ -75,14 +75,9 @@ var modifyPackageJsonCap = function (install, isOptOut, path) { return __awaiter
|
|
|
75
75
|
if (packageJsonParsed.scripts === undefined) {
|
|
76
76
|
packageJsonParsed.scripts = {};
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
delete packageJsonParsed.scripts[exports.IONIC_HOOK];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
packageJsonParsed = (0, exports.addScriptHook)(packageJsonParsed, exports.IONIC_HOOK, capHookValue);
|
|
78
|
+
packageJsonParsed = (0, exports.addScriptHook)(packageJsonParsed, exports.CAP_HOOK, capHookValue);
|
|
79
|
+
if (packageJsonParsed.scripts[exports.IONIC_HOOK]) {
|
|
80
|
+
delete packageJsonParsed.scripts[exports.IONIC_HOOK];
|
|
86
81
|
}
|
|
87
82
|
}
|
|
88
83
|
else {
|
|
@@ -167,11 +162,6 @@ var removePListModification = function () { return __awaiter(void 0, void 0, voi
|
|
|
167
162
|
});
|
|
168
163
|
}); };
|
|
169
164
|
exports.removePListModification = removePListModification;
|
|
170
|
-
var isCapVersionThreeOneOrHigher = function (packageJson) {
|
|
171
|
-
var version = packageJson.version;
|
|
172
|
-
return Number(version.substring(0, version.lastIndexOf('.'))) >= 3.1;
|
|
173
|
-
};
|
|
174
|
-
exports.isCapVersionThreeOneOrHigher = isCapVersionThreeOneOrHigher;
|
|
175
165
|
var addScriptHook = function (packageJsonParsed, hook, value) {
|
|
176
166
|
if (packageJsonParsed.scripts[hook] !== value) {
|
|
177
167
|
packageJsonParsed.scripts[hook] = value;
|
|
@@ -226,7 +216,11 @@ var parsedCapPackageJson = function () { return __awaiter(void 0, void 0, void 0
|
|
|
226
216
|
exports.parsedCapPackageJson = parsedCapPackageJson;
|
|
227
217
|
var parsedNpmConfig = function () {
|
|
228
218
|
try {
|
|
229
|
-
|
|
219
|
+
var npmBin = process.platform === 'win32'
|
|
220
|
+
? (0, path_1.join)((0, path_1.dirname)(process.execPath), 'npm.cmd')
|
|
221
|
+
: (0, path_1.join)((0, path_1.dirname)(process.execPath), 'npm');
|
|
222
|
+
var result = (0, child_process_1.spawnSync)(npmBin, ['config', 'list', '--json'], { encoding: 'utf8' });
|
|
223
|
+
return JSON.parse(result.stdout);
|
|
230
224
|
}
|
|
231
225
|
catch (e) {
|
|
232
226
|
Logger_1.Logger.getInstance().logWarning('Error in parsedNpmConfig => \n' + e + '\nUnable to retrieve npm config list!');
|
|
@@ -57,12 +57,7 @@ var getConfigFilePath = function () { return (0, path_1.join)(getApplicationPath
|
|
|
57
57
|
exports.getConfigFilePath = getConfigFilePath;
|
|
58
58
|
var getAndroidAssetsPath = function () {
|
|
59
59
|
if (isCapacitorApp()) {
|
|
60
|
-
|
|
61
|
-
return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public');
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public');
|
|
65
|
-
}
|
|
60
|
+
return getAndroidAssetsPathCapacitor();
|
|
66
61
|
}
|
|
67
62
|
else {
|
|
68
63
|
if ((0, fs_1.existsSync)((0, path_1.join)(getAndroidPath(), exports.FOLDER_ASSETS, FOLDER_WWW))) {
|
|
@@ -120,14 +115,7 @@ var getIosPackageSwiftCapacitor = function () { return (0, path_1.join)(getIosSP
|
|
|
120
115
|
exports.getIosPackageSwiftCapacitor = getIosPackageSwiftCapacitor;
|
|
121
116
|
var getOriginalPackageSwiftCapacitor = function () { return (0, path_1.join)(getApplicationPath(), FOLDER_NODE_MODULES, '@dynatrace', 'cordova-plugin', FILE_PACKAGE_SWIFT_SPM); };
|
|
122
117
|
exports.getOriginalPackageSwiftCapacitor = getOriginalPackageSwiftCapacitor;
|
|
123
|
-
var getAndroidAssetsPathCapacitor = function () {
|
|
124
|
-
if ((0, fs_1.existsSync)((0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public'))) {
|
|
125
|
-
return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public');
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public');
|
|
129
|
-
}
|
|
130
|
-
};
|
|
118
|
+
var getAndroidAssetsPathCapacitor = function () { return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public'); };
|
|
131
119
|
exports.getAndroidAssetsPathCapacitor = getAndroidAssetsPathCapacitor;
|
|
132
120
|
var getIosAssetsPathCapacitor = function () {
|
|
133
121
|
if ((0, fs_1.existsSync)((0, path_1.join)(getIosPathCapacitor(), 'public'))) {
|