@dynatrace/react-native-plugin
Version:
This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.
17 lines (16 loc) • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const GetValuesFromPackage_1 = require("../lib/core/util/GetValuesFromPackage");
const PathsConstants_1 = require("../scripts/PathsConstants");
const LineOffsetAnalyzeCall_1 = require("./core/LineOffsetAnalyzeCall");
module.exports = (() => {
const args = process.argv.slice(2);
const appBundleInfo = Object.assign({}, (0, GetValuesFromPackage_1.getHostAppBundleInfo)(PathsConstants_1.default.getPackageJsonFile()));
const pluginInfo = Object.assign({}, (0, GetValuesFromPackage_1.getHostAppBundleInfo)(PathsConstants_1.default.getInternalPackageJsonFile(), true));
appBundleInfo.pluginVersion = ((pluginInfo === null || pluginInfo === void 0 ? void 0 : pluginInfo.version) != null) ? pluginInfo === null || pluginInfo === void 0 ? void 0 : pluginInfo.version : '0';
const projectRoot = args[0] || PathsConstants_1.default.getApplicationPath();
const buildPath = args[1] || PathsConstants_1.default.getBuildPath();
const analyzer = new LineOffsetAnalyzeCall_1.LineOffsetAnalyzer(projectRoot, buildPath, appBundleInfo);
analyzer.run();
})();