Socket
Socket
Sign inDemoInstall

@dynatrace/cordova-plugin

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace/cordova-plugin - npm Package Compare versions

Comparing version 1.261.2 to 1.261.3

2

package.json
{
"name": "@dynatrace/cordova-plugin",
"version": "1.261.2",
"version": "1.261.3",
"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,0 +5,0 @@ "cordova": {

@@ -805,3 +805,3 @@ [![N|Solid](https://assets.dynatrace.com/content/dam/dynatrace/misc/dynatrace_web.png)](https://dynatrace.com)

1.261.2
1.261.3
* Updated Android (8.261.2.1013) & iOS Agent (8.261.1.1006)

@@ -808,0 +808,0 @@ * Fixed file not found during doctor command

@@ -67,2 +67,5 @@ "use strict";

javascriptConfigurationBuilder.setAnyCertificateAllowed(Boolean(rawConfig.js.allowanycert));
if (rawConfig.js.htmlFiles !== undefined) {
javascriptConfigurationBuilder.setHtmlFiles(rawConfig.js.htmlFiles);
}
return javascriptConfigurationBuilder.build();

@@ -69,0 +72,0 @@ }

@@ -85,5 +85,5 @@ "use strict";

var instrument = function (process) { return __awaiter(void 0, void 0, void 0, function () {
var _a, cliBuildArgs, jsagentContent, configJson, buildProperties, htmlFiles, htmlInstrumentation, e_1, htmlInstrumentation, e_2, e_3;
return __generator(this, function (_b) {
switch (_b.label) {
var _a, cliBuildArgs, jsagentContent, configJson, buildProperties, htmlFiles, htmlInstrumentation, _b, e_1, htmlInstrumentation, _c, e_2, e_3;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:

@@ -94,3 +94,3 @@ Logger_1.Logger.getInstance().logInfo('Starting Configuration of application ..');

case 1:
_a.apply(void 0, [_b.sent()]);
_a.apply(void 0, [_d.sent()]);
cliBuildArgs = (0, InstrumentUtil_1.setCliBuildArgs)(process);

@@ -102,5 +102,5 @@ buildProperties = (0, InstrumentUtil_1.setBuildProperties)(instrumentHelper.parseCommandLine(process.argv.slice(2)));

}
_b.label = 2;
_d.label = 2;
case 2:
_b.trys.push([2, 24, , 25]);
_d.trys.push([2, 24, , 25]);
Logger_1.Logger.getInstance().logInfo('Trying to read configuration file: ' + buildProperties.pathToConfig);

@@ -114,8 +114,8 @@ if (!(buildProperties.pathToConfig !== undefined)) return [3, 23];

case 3:
jsagentContent = _b.sent();
jsagentContent = _d.sent();
return [3, 6];
case 4: return [4, (0, DownloadAgent_1.downloadAgent)(configJson)];
case 5:
jsagentContent = _b.sent();
_b.label = 6;
jsagentContent = _d.sent();
_d.label = 6;
case 6:

@@ -128,5 +128,5 @@ htmlFiles = [];

((cliBuildArgs.android === true) || cliBuildArgs.capacitor === 'android'))) return [3, 14];
_b.label = 7;
_d.label = 7;
case 7:
_b.trys.push([7, 12, 13, 14]);
_d.trys.push([7, 12, 13, 14]);
Logger_1.Logger.getInstance().logInfo('Starting Android Configuration with Dynatrace!');

@@ -148,12 +148,11 @@ if (buildProperties.pathToGradle != null) {

htmlInstrumentation = new HtmlInstrumentation_1.HTMLInstrumentation(buildProperties.androidAssetPath, jsagentContent, configJson.getCordovaPluginConfiguration().isCookieProxyEnabled(), htmlFiles);
_b = UpdateSecurity_1.updateSecurity;
return [4, htmlInstrumentation.instrument()];
case 9:
_b.sent();
return [4, (0, UpdateSecurity_1.updateSecurity)(buildProperties.androidAssetPath, configJson)];
case 9: return [4, _b.apply(void 0, [_d.sent(), configJson])];
case 10:
_b.sent();
_b.label = 11;
_d.sent();
_d.label = 11;
case 11: return [3, 14];
case 12:
e_1 = _b.sent();
e_1 = _d.sent();
if (e_1 instanceof Error) {

@@ -168,9 +167,9 @@ Logger_1.Logger.getInstance().logError(e_1.message);

if (!((buildProperties.iosAvailable === true) && ((cliBuildArgs.ios === true) || cliBuildArgs.capacitor === 'ios'))) return [3, 23];
_b.label = 15;
_d.label = 15;
case 15:
_b.trys.push([15, 21, 22, 23]);
_d.trys.push([15, 21, 22, 23]);
Logger_1.Logger.getInstance().logInfo('Starting iOS Configuration with Dynatrace!');
return [4, (0, Ios_1.modifyPListFile)(buildProperties.pathToPList, configJson.getIosConfiguration(), false)];
case 16:
_b.sent();
_d.sent();
buildProperties.iosAssetsPath = (0, PathHelper_1.getIOSAssetsPath)();

@@ -187,12 +186,11 @@ if ((buildProperties.isCapacitor === false) && buildProperties.iosAssetsPath !== undefined) {

htmlInstrumentation = new HtmlInstrumentation_1.HTMLInstrumentation(buildProperties.iosAssetsPath, jsagentContent, configJson.getCordovaPluginConfiguration().isCookieProxyEnabled(), htmlFiles);
_c = UpdateSecurity_1.updateSecurity;
return [4, htmlInstrumentation.instrument()];
case 18:
_b.sent();
return [4, (0, UpdateSecurity_1.updateSecurity)(buildProperties.iosAssetsPath, configJson)];
case 18: return [4, _c.apply(void 0, [_d.sent(), configJson])];
case 19:
_b.sent();
_b.label = 20;
_d.sent();
_d.label = 20;
case 20: return [3, 23];
case 21:
e_2 = _b.sent();
e_2 = _d.sent();
if (e_2 instanceof Error) {

@@ -207,3 +205,3 @@ Logger_1.Logger.getInstance().logError(e_2.message);

case 24:
e_3 = _b.sent();
e_3 = _d.sent();
if (e_3 instanceof Error) {

@@ -219,3 +217,3 @@ Logger_1.Logger.getInstance().logError(e_3.message);

Logger_1.Logger.getInstance().logWarning('Both Android and iOS Folder are not available - Skip Configuration.');
_b.label = 27;
_d.label = 27;
case 27:

@@ -222,0 +220,0 @@ Logger_1.Logger.getInstance().logInfo('Finished Configuration of Cordova application ..');

@@ -61,3 +61,3 @@ "use strict";

case 2:
_b.apply(_a, [_c.sent()]);
htmlFiles = _b.apply(_a, [_c.sent()]);
if (!(htmlFiles.length === 0)) return [3, 3];

@@ -86,3 +86,3 @@ Logger_1.Logger.getInstance().logInfo('No HTML files to instrument!');

_c.label = 8;
case 8: return [2];
case 8: return [2, htmlFiles];
}

@@ -89,0 +89,0 @@ });

@@ -45,4 +45,4 @@ "use strict";

var CONNECT_SRC = 'connect-src';
var updateSecurity = function (path, configuration) { return __awaiter(void 0, void 0, void 0, function () {
var htmlFiles, e_1;
var updateSecurity = function (htmlFiles, configuration) { return __awaiter(void 0, void 0, void 0, function () {
var _i, htmlFiles_1, htmlFile;
return __generator(this, function (_a) {

@@ -56,28 +56,25 @@ switch (_a.label) {

}
try {
htmlFiles = htmlFiles.filter(function (value) { return (0, exports.checkForPolicy)(value.getPath()); });
}
catch (e) {
if (e instanceof Error) {
Logger_1.Logger.getInstance().logError('Error during updating CSP: ' + e.message);
}
}
if (!(htmlFiles.length > 0)) return [3, 5];
_i = 0, htmlFiles_1 = htmlFiles;
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4, (0, FileHelper_1.searchFileExtInDirectoryNonRecursive)(path, '.html', [])];
if (!(_i < htmlFiles_1.length)) return [3, 4];
htmlFile = htmlFiles_1[_i];
return [4, updateCSPInHtml(htmlFile.getPath(), configuration.getCordovaPluginConfiguration().getCSPUrl())];
case 2:
htmlFiles = _a.sent();
htmlFiles = htmlFiles.filter(function (value) { return (0, exports.checkForPolicy)(value); });
return [3, 4];
_a.sent();
_a.label = 3;
case 3:
e_1 = _a.sent();
if (e_1 instanceof Error) {
Logger_1.Logger.getInstance().logError('Error during updating CSP: ' + e_1.message);
}
htmlFiles = [];
return [3, 4];
case 4:
if (!(htmlFiles.length > 1)) return [3, 5];
Logger_1.Logger.getInstance().logWarning('Will not update security policy as the policy is available in two different files.');
return [2, false];
_i++;
return [3, 1];
case 4: return [2, true];
case 5:
if (!(htmlFiles.length === 1)) return [3, 7];
return [4, updateCSPInHtml(htmlFiles[0], configuration.getCordovaPluginConfiguration().getCSPUrl())];
case 6:
_a.sent();
return [2, true];
case 7:
Logger_1.Logger.getInstance().logWarning("Will not update security policy as the plugin didn't find a html file containing csp.");

@@ -115,3 +112,3 @@ return [2, false];

_a.sent();
Logger_1.Logger.getInstance().logInfo('Successfully updated the CSP!');
Logger_1.Logger.getInstance().logInfo('Successfully updated the CSP: ' + htmlFile);
return [2];

@@ -118,0 +115,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc