@dynatrace/cordova-plugin 2.329.1 → 2.331.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/Package.swift +32 -0
- package/README.md +46 -2
- package/files/iOS/Dynatrace.xcframework/Info.plist +8 -8
- 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 +69 -69
- 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.h +49 -41
- 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 +2 -2
- 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 +49 -41
- 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 +2 -2
- package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +2 -2
- 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 +49 -41
- 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 +49 -41
- 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/package.json +13 -8
- package/plugin.xml +2 -2
- package/scripts/InstrumentCap.js +6 -1
- package/scripts/helpers/InstallHelper.js +67 -1
- package/scripts/helpers/PathHelper.js +16 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Dynatrace.h
|
|
2
|
-
// Version: 8.
|
|
2
|
+
// Version: 8.331.1.1008
|
|
3
3
|
//
|
|
4
4
|
// These materials contain confidential information and
|
|
5
5
|
// trade secrets of Dynatrace Corporation. You shall
|
|
@@ -528,42 +528,6 @@ typedef NS_ENUM(int, DTX_StatusCode) {
|
|
|
528
528
|
|
|
529
529
|
@end
|
|
530
530
|
|
|
531
|
-
/*************************************************************************************************/
|
|
532
|
-
|
|
533
|
-
/*!
|
|
534
|
-
@brief Encapsulates contextual data for a single captured web request.
|
|
535
|
-
@property request The request associated with the web request event.
|
|
536
|
-
@property response The response returned by the server. Nil if no response was obtained.
|
|
537
|
-
@property responseBody Raw response body data (may be nil or truncated based on configuration).
|
|
538
|
-
@property error Transport or protocol error if the request failed. Nil on success.
|
|
539
|
-
*/
|
|
540
|
-
|
|
541
|
-
@interface DTXHttpRequestEventContext : NSObject
|
|
542
|
-
|
|
543
|
-
@property (nonatomic, strong, readonly, nonnull) NSURLRequest *request;
|
|
544
|
-
@property (nonatomic, strong, readonly, nullable) NSURLResponse *response;
|
|
545
|
-
@property (nonatomic, strong, readonly, nullable) NSData *responseBody;
|
|
546
|
-
@property (nonatomic, strong, readonly, nullable) NSError *error;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
@brief Designated initializer.
|
|
550
|
-
|
|
551
|
-
@param request The NSURLRequest associated with the event.
|
|
552
|
-
@param response The NSURLResponse (if available) or nil.
|
|
553
|
-
@param responseBody The raw body payload (if available) or nil.
|
|
554
|
-
@param error The error encountered (nil for successful responses).
|
|
555
|
-
*/
|
|
556
|
-
- (instancetype _Nonnull)initWithRequest:(NSURLRequest *_Nonnull)request
|
|
557
|
-
response:(NSURLResponse * _Nullable)response
|
|
558
|
-
responseBody:(NSData * _Nullable)responseBody
|
|
559
|
-
error:(NSError * _Nullable)error;
|
|
560
|
-
|
|
561
|
-
/// Unavailable. Use the designated initializer.
|
|
562
|
-
- (instancetype _Nonnull)init NS_UNAVAILABLE;
|
|
563
|
-
|
|
564
|
-
@end
|
|
565
|
-
|
|
566
|
-
/*************************************************************************************************/
|
|
567
531
|
/*!
|
|
568
532
|
@brief Provides the ability to manually create custom events.
|
|
569
533
|
|
|
@@ -638,6 +602,42 @@ typedef NS_ENUM(int, DTX_StatusCode) {
|
|
|
638
602
|
- (DTXSessionPropertyEventData* _Nonnull)addSessionProperty:(NSString* _Nonnull)property value:(id _Nullable)value;
|
|
639
603
|
|
|
640
604
|
@end
|
|
605
|
+
/*************************************************************************************************/
|
|
606
|
+
|
|
607
|
+
/*!
|
|
608
|
+
@brief Encapsulates contextual data for a single captured web request.
|
|
609
|
+
@property request The request associated with the web request event.
|
|
610
|
+
@property response The response returned by the server. Nil if no response was obtained.
|
|
611
|
+
@property responseBody Raw response body data (may be nil or truncated based on configuration).
|
|
612
|
+
@property error Transport or protocol error if the request failed. Nil on success.
|
|
613
|
+
*/
|
|
614
|
+
|
|
615
|
+
@interface DTXHttpRequestEventContext : NSObject
|
|
616
|
+
|
|
617
|
+
@property (nonatomic, strong, readonly, nonnull) NSURLRequest *request;
|
|
618
|
+
@property (nonatomic, strong, readonly, nullable) NSURLResponse *response;
|
|
619
|
+
@property (nonatomic, strong, readonly, nullable) NSData *responseBody;
|
|
620
|
+
@property (nonatomic, strong, readonly, nullable) NSError *error;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
@brief Designated initializer.
|
|
624
|
+
|
|
625
|
+
@param request The NSURLRequest associated with the event.
|
|
626
|
+
@param response The NSURLResponse (if available) or nil.
|
|
627
|
+
@param responseBody The raw body payload (if available) or nil.
|
|
628
|
+
@param error The error encountered (nil for successful responses).
|
|
629
|
+
*/
|
|
630
|
+
- (instancetype _Nonnull)initWithRequest:(NSURLRequest *_Nonnull)request
|
|
631
|
+
response:(NSURLResponse * _Nullable)response
|
|
632
|
+
responseBody:(NSData * _Nullable)responseBody
|
|
633
|
+
error:(NSError * _Nullable)error;
|
|
634
|
+
|
|
635
|
+
/// Unavailable. Use the designated initializer.
|
|
636
|
+
- (instancetype _Nonnull)init NS_UNAVAILABLE;
|
|
637
|
+
|
|
638
|
+
@end
|
|
639
|
+
|
|
640
|
+
/*************************************************************************************************/
|
|
641
641
|
|
|
642
642
|
/*!
|
|
643
643
|
@brief DTXUserPrivacyOptions protocol should be implemented by objects passed to applyUserPrivacyOptions:completion: method.
|
|
@@ -991,8 +991,7 @@ When the user optin feature is not used:
|
|
|
991
991
|
With sendBizEvent, you can report a business event. These standalone events are being sent detached from user actions or sessions.
|
|
992
992
|
The 'dt' key, as well as all 'dt.' prefixed keys are considered reserved by Dynatrace and will be stripped from the passed in attributes.
|
|
993
993
|
Note: Business events are only supported on Dynatrace SaaS deployments currently.
|
|
994
|
-
https://
|
|
995
|
-
|
|
994
|
+
https://docs.dynatrace.com/docs/observe/business-observability/bo-events-capturing#report-business-event-rum
|
|
996
995
|
@param type type of the event being sent
|
|
997
996
|
@param attributes dictionary of attributes being attached to the sent event
|
|
998
997
|
*/
|
|
@@ -1019,7 +1018,7 @@ When the user optin feature is not used:
|
|
|
1019
1018
|
+ (void)sendEvent:(DTXEventData* _Nullable)data;
|
|
1020
1019
|
|
|
1021
1020
|
/*!
|
|
1022
|
-
* @brief Sends a web request event with the fields set in the
|
|
1021
|
+
* @brief Sends a web request event with the fields set in the data object. Use the data object to add data to the request event.
|
|
1023
1022
|
*
|
|
1024
1023
|
* The keys of the fields added via addEventProperty() have to be prefixed with `event_properties.` in order to be handled by the agent. All other fields will be dropped.
|
|
1025
1024
|
*
|
|
@@ -1094,6 +1093,15 @@ When the user optin feature is not used:
|
|
|
1094
1093
|
*/
|
|
1095
1094
|
+ (void)sendSessionPropertyEvent:(DTXSessionPropertyEventData* _Nullable)data;
|
|
1096
1095
|
|
|
1096
|
+
/*!
|
|
1097
|
+
* @brief Set the URLSession used by the agent for network requests.
|
|
1098
|
+
*
|
|
1099
|
+
* Note: This feature is currently only supported for Real User Monitoring powered by Grail on Dynatrace SaaS deployments.
|
|
1100
|
+
*
|
|
1101
|
+
* @param urlSession new URLSession to be used by the agent for network requests.
|
|
1102
|
+
*/
|
|
1103
|
+
+ (void)setURLSession:(NSURLSession* _Nonnull)urlSession;
|
|
1104
|
+
|
|
1097
1105
|
@end
|
|
1098
1106
|
#endif
|
|
1099
1107
|
|
|
@@ -1330,7 +1338,7 @@ extern NSString *_Nonnull const kDTXDetectRageTaps;
|
|
|
1330
1338
|
@const kDTXInstrumentFrameworks
|
|
1331
1339
|
Flag to force the agent to also look for viewControllers inside the frameworks linked with the application
|
|
1332
1340
|
*/
|
|
1333
|
-
extern NSString *_Nonnull const kDTXInstrumentFrameworks;
|
|
1341
|
+
extern NSString *_Nonnull const kDTXInstrumentFrameworks __deprecated_msg("Deprecated as of version 8.331 with no replacement, do not use this flag anymore, it will be ignored.");
|
|
1334
1342
|
/*!
|
|
1335
1343
|
@const kDTXUIActionNamePrivacy
|
|
1336
1344
|
If set to true, a label or accessibility identifier of a view will be replaced by the view class name when reporting a touch event.
|
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
|
+
jajRIjuHpmWFFnoTO9MywwUH2eQ=
|
|
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
|
+
u65bUxoSRsetE6qm6p3Y4TBzrjw=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
oGHg1zHpatLmNH0hKjUSgvi6DJo=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
5Okn2qhtQ2XvXsNYRsI9e1BWj2I=
|
|
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
|
+
oMMq4KM0QVIg1/+QWpsZ8GroSxc=
|
|
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
|
+
Cf8t2TIZfQXpUwHBeZnVCoVIdTQ=
|
|
74
74
|
</data>
|
|
75
75
|
<key>Modules/module.modulemap</key>
|
|
76
76
|
<data>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<dict>
|
|
95
95
|
<key>hash2</key>
|
|
96
96
|
<data>
|
|
97
|
-
|
|
97
|
+
J2Pbsy0U+a5fERuIeS8/2QfnGf1AgY4rswHMcCICVfc=
|
|
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
|
+
TTTPk5VFSNFN4dAhhUuHlVgV+abge+rNRW4ISyW3Kuo=
|
|
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
|
+
Wznf9xXzEQSLDDsseX+1LHdfTMJex4xT1XnvzLXbBS8=
|
|
126
126
|
</data>
|
|
127
127
|
</dict>
|
|
128
128
|
<key>Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json</key>
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<dict>
|
|
158
158
|
<key>hash2</key>
|
|
159
159
|
<data>
|
|
160
|
-
|
|
160
|
+
0+QjK+9/wqDwCWscrUMZ+OYYHnniXKlLUafMDpugrZo=
|
|
161
161
|
</data>
|
|
162
162
|
</dict>
|
|
163
163
|
<key>Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json</key>
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
<dict>
|
|
193
193
|
<key>hash2</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
KXRSVDdV3mb3CZiOTU0x3C/AZ6xuPZ23sWLHTgdYcRU=
|
|
196
196
|
</data>
|
|
197
197
|
</dict>
|
|
198
198
|
<key>Modules/module.modulemap</key>
|
package/files/plugin.gradle
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/cordova-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.331.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,23 +40,24 @@
|
|
|
40
40
|
"homepage": "https://www.dynatrace.com/",
|
|
41
41
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"axios": "^1.13.
|
|
43
|
+
"axios": "^1.13.5",
|
|
44
44
|
"jsdom": "^27.0.0",
|
|
45
45
|
"plist": "^3.1.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
48
49
|
"@types/jest": "^29.2.0",
|
|
49
50
|
"@types/jsdom": "^21.1.7",
|
|
50
51
|
"@types/mock-fs": "^4.13.1",
|
|
51
52
|
"@types/node": "^18.19.71",
|
|
52
53
|
"@types/plist": "^3.0.2",
|
|
53
54
|
"@types/shelljs": "^0.8.9",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
55
|
-
"@typescript-eslint/parser": "^
|
|
56
|
-
"eslint": "^
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
56
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
57
|
+
"eslint": "^9.39.2",
|
|
57
58
|
"eslint-config-prettier": "^8.5.0",
|
|
58
59
|
"eslint-plugin-import": "^2.25.4",
|
|
59
|
-
"eslint-plugin-jsdoc": "^
|
|
60
|
+
"eslint-plugin-jsdoc": "^62.5.0",
|
|
60
61
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
61
62
|
"eslint-plugin-unicorn": "^41.0.1",
|
|
62
63
|
"husky": "^9.1.7",
|
|
@@ -68,7 +69,8 @@
|
|
|
68
69
|
"shelljs": "^0.8.4",
|
|
69
70
|
"ts-jest": "^29.0.3",
|
|
70
71
|
"ts-node": "^10.2.1",
|
|
71
|
-
"typescript": "^4.8.4"
|
|
72
|
+
"typescript": "^4.8.4",
|
|
73
|
+
"typescript-eslint": "^8.54.0"
|
|
72
74
|
},
|
|
73
75
|
"files": [
|
|
74
76
|
"assets/*",
|
|
@@ -81,7 +83,10 @@
|
|
|
81
83
|
"scripts/*",
|
|
82
84
|
"model/*",
|
|
83
85
|
"typings/main.d.ts",
|
|
84
|
-
"package.json"
|
|
86
|
+
"package.json",
|
|
87
|
+
"ios/*",
|
|
88
|
+
"Package.swift",
|
|
89
|
+
"Package.resolved"
|
|
85
90
|
],
|
|
86
91
|
"jest-junit": {
|
|
87
92
|
"suiteName": "jest tests",
|
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.331.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.331.1.1004" />
|
|
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/InstrumentCap.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var InstallHelper_1 = require("./helpers/InstallHelper");
|
|
3
4
|
var InstrumentHelper_1 = require("./helpers/InstrumentHelper");
|
|
4
5
|
module.exports = (function (context) { return new Promise(function (resolve) {
|
|
5
6
|
(0, InstrumentHelper_1.instrument)(process).then(function () {
|
|
6
|
-
|
|
7
|
+
(0, InstallHelper_1.replacePackageSwiftWithOriginal)().then(function () {
|
|
8
|
+
(0, InstallHelper_1.moveIosFilesForSPM)().then(function () {
|
|
9
|
+
resolve('');
|
|
10
|
+
});
|
|
11
|
+
});
|
|
7
12
|
});
|
|
8
13
|
}); })();
|
|
@@ -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.removePListModification = exports.removeGradleModification = exports.modifyPackageJsonCap = exports.CAP_HOOK = exports.IONIC_HOOK = void 0;
|
|
39
|
+
exports.moveIosFilesForSPM = exports.replacePackageSwiftWithOriginal = 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");
|
|
@@ -237,3 +237,69 @@ var isOptOut = function (parsedNpmConfig) {
|
|
|
237
237
|
return parsedNpmConfig !== undefined && parsedNpmConfig[NPM_CONFIG_OPT_OUT] !== undefined ? parsedNpmConfig[NPM_CONFIG_OPT_OUT] : false;
|
|
238
238
|
};
|
|
239
239
|
exports.isOptOut = isOptOut;
|
|
240
|
+
var replacePackageSwiftWithOriginal = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
241
|
+
var originalPackageSwiftContent, e_5;
|
|
242
|
+
return __generator(this, function (_a) {
|
|
243
|
+
switch (_a.label) {
|
|
244
|
+
case 0:
|
|
245
|
+
if (!(0, PathHelper_1.isCapacitorUsingSPM)()) return [3, 6];
|
|
246
|
+
if (!(0, fs_1.existsSync)((0, PathHelper_1.getIosPackageSwiftCapacitor)())) {
|
|
247
|
+
Logger_1.Logger.getInstance().logWarning('Cannot replace Package.swift file, as it does not exist in the DynatraceCordovaPlugin folder inside the iOS Platform.');
|
|
248
|
+
return [2];
|
|
249
|
+
}
|
|
250
|
+
_a.label = 1;
|
|
251
|
+
case 1:
|
|
252
|
+
_a.trys.push([1, 4, , 5]);
|
|
253
|
+
return [4, (0, FileHelper_1.readTextFromFile)((0, PathHelper_1.getOriginalPackageSwiftCapacitor)())];
|
|
254
|
+
case 2:
|
|
255
|
+
originalPackageSwiftContent = _a.sent();
|
|
256
|
+
return [4, (0, FileHelper_1.writeTextToFile)((0, PathHelper_1.getIosPackageSwiftCapacitor)(), originalPackageSwiftContent)];
|
|
257
|
+
case 3:
|
|
258
|
+
_a.sent();
|
|
259
|
+
return [3, 5];
|
|
260
|
+
case 4:
|
|
261
|
+
e_5 = _a.sent();
|
|
262
|
+
Logger_1.Logger.getInstance().logError("Unable to replace the Package.swift file! " + e_5);
|
|
263
|
+
return [3, 5];
|
|
264
|
+
case 5: return [3, 7];
|
|
265
|
+
case 6:
|
|
266
|
+
Logger_1.Logger.getInstance().logInfo('Capacitor iOS project is not using Swift Package Manager. There is no Package.swift file to replace.');
|
|
267
|
+
_a.label = 7;
|
|
268
|
+
case 7: return [2];
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}); };
|
|
272
|
+
exports.replacePackageSwiftWithOriginal = replacePackageSwiftWithOriginal;
|
|
273
|
+
var moveIosFilesForSPM = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
274
|
+
var dirPath, e_6;
|
|
275
|
+
return __generator(this, function (_a) {
|
|
276
|
+
switch (_a.label) {
|
|
277
|
+
case 0:
|
|
278
|
+
if (!(0, PathHelper_1.isCapacitorUsingSPM)()) return [3, 7];
|
|
279
|
+
dirPath = (0, path_1.join)((0, PathHelper_1.getIosSPMCordovaPluginCapacitor)(), 'ios');
|
|
280
|
+
return [4, (0, FileHelper_1.createDirectory)(dirPath)];
|
|
281
|
+
case 1:
|
|
282
|
+
_a.sent();
|
|
283
|
+
_a.label = 2;
|
|
284
|
+
case 2:
|
|
285
|
+
_a.trys.push([2, 5, , 6]);
|
|
286
|
+
return [4, (0, FileHelper_1.renameFile)((0, path_1.join)((0, PathHelper_1.getIosSPMCordovaPluginCapacitor)(), PathHelper_1.FILE_IOS_HEADER), (0, path_1.join)(dirPath, PathHelper_1.FILE_IOS_HEADER))];
|
|
287
|
+
case 3:
|
|
288
|
+
_a.sent();
|
|
289
|
+
return [4, (0, FileHelper_1.renameFile)((0, path_1.join)((0, PathHelper_1.getIosSPMCordovaPluginCapacitor)(), PathHelper_1.FILE_IOS_IMPL), (0, path_1.join)(dirPath, PathHelper_1.FILE_IOS_IMPL))];
|
|
290
|
+
case 4:
|
|
291
|
+
_a.sent();
|
|
292
|
+
return [3, 6];
|
|
293
|
+
case 5:
|
|
294
|
+
e_6 = _a.sent();
|
|
295
|
+
Logger_1.Logger.getInstance().logError("Moving of iOS files for SPM failed! " + e_6);
|
|
296
|
+
return [3, 6];
|
|
297
|
+
case 6: return [3, 8];
|
|
298
|
+
case 7:
|
|
299
|
+
Logger_1.Logger.getInstance().logInfo('Capacitor iOS project is not using Swift Package Manager. There are no iOS files to move.');
|
|
300
|
+
_a.label = 8;
|
|
301
|
+
case 8: return [2];
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}); };
|
|
305
|
+
exports.moveIosFilesForSPM = moveIosFilesForSPM;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCapacitorApp = exports.getCapacitorCookieProxyPath = exports.getCapacitorConfig = exports.getCapCliPackage = exports.getIosAssetsPathCapacitor = exports.getAndroidAssetsPathCapacitor = exports.getIosPlistPathCapacitor = exports.getAndroidPathCapacitor = exports.getIosPathCapacitor = exports.getDynatracePluginGradleFile = exports.getDynatraceGradleFile = exports.getLogPath = exports.getCurrentLogPath = exports.getCookieProxyPath = exports.getSwallowApiPath = exports.getDownloadJSAgentPath = exports.getIOSAssetsPath = exports.getAndroidAssetsPath = exports.getConfigFilePath = exports.getDefaultConfig = exports.getAndroidGradleVersionNewer = exports.getAndroidGradleVersion = exports.dynatraceConfigExists = exports.isIonic = exports.getIonicConfig = exports.getDoctorLogPath = exports.getAndroidGradleFile = exports.getPluginPath = exports.getPluginPackage = exports.getAndroidPath = exports.getIosPath = exports.getApplicationPackage = exports.getApplicationPath = exports.setRoot = exports.FILE_CAPACITOR_COOKIE_PROXY = exports.FILE_COOKIE_PROXY = exports.FILE_SWALLOW_API = exports.FILE_JSAGENT = exports.FOLDER_ASSETS = void 0;
|
|
3
|
+
exports.getOriginalPackageSwiftCapacitor = exports.getIosPackageSwiftCapacitor = exports.getIosSPMCordovaPluginCapacitor = exports.isCapacitorUsingSPM = exports.isCapacitorApp = exports.getCapacitorCookieProxyPath = exports.getCapacitorConfig = exports.getCapCliPackage = exports.getIosAssetsPathCapacitor = exports.getAndroidAssetsPathCapacitor = exports.getIosPlistPathCapacitor = exports.getAndroidPathCapacitor = exports.getIosPathCapacitor = exports.getDynatracePluginGradleFile = exports.getDynatraceGradleFile = exports.getLogPath = exports.getCurrentLogPath = exports.getCookieProxyPath = exports.getSwallowApiPath = exports.getDownloadJSAgentPath = exports.getIOSAssetsPath = exports.getAndroidAssetsPath = exports.getConfigFilePath = exports.getDefaultConfig = exports.getAndroidGradleVersionNewer = exports.getAndroidGradleVersion = exports.dynatraceConfigExists = exports.isIonic = exports.getIonicConfig = exports.getDoctorLogPath = exports.getAndroidGradleFile = exports.getPluginPath = exports.getPluginPackage = exports.getAndroidPath = exports.getIosPath = exports.getApplicationPackage = exports.getApplicationPath = exports.setRoot = exports.FILE_IOS_IMPL = exports.FILE_IOS_HEADER = exports.FILE_CAPACITOR_COOKIE_PROXY = exports.FILE_COOKIE_PROXY = exports.FILE_SWALLOW_API = exports.FILE_JSAGENT = exports.FOLDER_ASSETS = void 0;
|
|
4
4
|
var path_1 = require("path");
|
|
5
5
|
var fs_1 = require("fs");
|
|
6
6
|
var FOLDER_PLATFORMS = 'platforms';
|
|
@@ -11,15 +11,19 @@ var FOLDER_FILES = 'files';
|
|
|
11
11
|
var FOLDER_LOGS = 'logs';
|
|
12
12
|
var FOLDER_ANDROID_APP = 'app';
|
|
13
13
|
var FOLDER_NODE_MODULES = 'node_modules';
|
|
14
|
+
var FOLDER_CAP_SPM = 'CapApp-SPM';
|
|
14
15
|
var FILE_PACKAGE = 'package.json';
|
|
15
16
|
var FILE_CONFIG = 'dynatrace.config.js';
|
|
16
17
|
var FILE_CURRENT_LOG = 'currentLog.txt';
|
|
17
18
|
var FILE_CAPACITOR_CONFIG_TS = (0, path_1.join)(__dirname, '..', '..', '..', '..', '..', 'capacitor.config.ts');
|
|
18
19
|
var FILE_CAPACITOR_CONFIG_JSON = (0, path_1.join)(__dirname, '..', '..', '..', '..', '..', 'capacitor.config.json');
|
|
20
|
+
var FILE_PACKAGE_SWIFT_SPM = 'Package.swift';
|
|
19
21
|
exports.FILE_JSAGENT = 'dtAgent.js';
|
|
20
22
|
exports.FILE_SWALLOW_API = 'dtrum-swallow-api.js';
|
|
21
23
|
exports.FILE_COOKIE_PROXY = 'dt-cookie-proxy.js';
|
|
22
24
|
exports.FILE_CAPACITOR_COOKIE_PROXY = 'dt-cookie-proxy-cap.js';
|
|
25
|
+
exports.FILE_IOS_HEADER = 'DynatraceCordovaPlugin.h';
|
|
26
|
+
exports.FILE_IOS_IMPL = 'DynatraceCordovaPlugin.m';
|
|
23
27
|
var rootPath = __dirname;
|
|
24
28
|
var setRoot = function (newRoot) {
|
|
25
29
|
rootPath = (0, path_1.resolve)(newRoot);
|
|
@@ -109,6 +113,13 @@ var getAndroidPathCapacitor = function () { return (0, path_1.join)(getApplicati
|
|
|
109
113
|
exports.getAndroidPathCapacitor = getAndroidPathCapacitor;
|
|
110
114
|
var getIosPlistPathCapacitor = function () { return (0, path_1.join)(getIosPathCapacitor(), 'App', 'Info.plist'); };
|
|
111
115
|
exports.getIosPlistPathCapacitor = getIosPlistPathCapacitor;
|
|
116
|
+
var getIosSPMCapacitor = function () { return (0, path_1.join)(getIosPathCapacitor(), FOLDER_CAP_SPM); };
|
|
117
|
+
var getIosSPMCordovaPluginCapacitor = function () { return (0, path_1.join)(getIosPathCapacitor(), '..', 'capacitor-cordova-ios-plugins', 'sources', 'DynatraceCordovaPlugin'); };
|
|
118
|
+
exports.getIosSPMCordovaPluginCapacitor = getIosSPMCordovaPluginCapacitor;
|
|
119
|
+
var getIosPackageSwiftCapacitor = function () { return (0, path_1.join)(getIosSPMCordovaPluginCapacitor(), FILE_PACKAGE_SWIFT_SPM); };
|
|
120
|
+
exports.getIosPackageSwiftCapacitor = getIosPackageSwiftCapacitor;
|
|
121
|
+
var getOriginalPackageSwiftCapacitor = function () { return (0, path_1.join)(getApplicationPath(), FOLDER_NODE_MODULES, '@dynatrace', 'cordova-plugin', FILE_PACKAGE_SWIFT_SPM); };
|
|
122
|
+
exports.getOriginalPackageSwiftCapacitor = getOriginalPackageSwiftCapacitor;
|
|
112
123
|
var getAndroidAssetsPathCapacitor = function () {
|
|
113
124
|
if ((0, fs_1.existsSync)((0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public'))) {
|
|
114
125
|
return (0, path_1.join)(getAndroidPathCapacitor(), FOLDER_ANDROID_APP, 'src', 'main', exports.FOLDER_ASSETS, 'public');
|
|
@@ -141,3 +152,7 @@ exports.getCapacitorConfig = getCapacitorConfig;
|
|
|
141
152
|
var isCapacitorApp = function () { return (0, fs_1.existsSync)(getCapacitorConfig()) || (0, fs_1.existsSync)(getCapacitorConfig(true)); };
|
|
142
153
|
exports.isCapacitorApp = isCapacitorApp;
|
|
143
154
|
var isNpxCommand = function () { return (0, fs_1.existsSync)((0, path_1.join)(__dirname, '..', '..', '..', '..', '..', 'package.json')) && __dirname.includes('node_modules'); };
|
|
155
|
+
var isCapacitorUsingSPM = function () {
|
|
156
|
+
return (0, fs_1.existsSync)(getIosSPMCapacitor());
|
|
157
|
+
};
|
|
158
|
+
exports.isCapacitorUsingSPM = isCapacitorUsingSPM;
|