UNPKG

@dynatrace/react-native-plugin

Version:

This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.

29 lines (28 loc) 1.49 kB
#!/usr/bin/env node 'use strict'; 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 = (() => { var _a, _b; const args = process.argv.slice(2); const parsedArgs = args.reduce((acc, arg) => { const [key, value] = arg.split('='); if (key && value !== undefined) { acc[key] = value; } return acc; }, {}); const isProd = parsedArgs.env === 'prod'; const options = { isProd, projectRoot: parsedArgs.projectRoot || PathsConstants_1.default.getApplicationPath(), buildPath: parsedArgs.buildPath || PathsConstants_1.default.getBuildPath(), androidSourcemapPath: parsedArgs.androidSourcemapPath || '', iosSourcemapPath: parsedArgs.iosSourcemapPath || '', appBundleInfo: Object.assign(Object.assign({}, (0, GetValuesFromPackage_1.getHostAppBundleInfo)(PathsConstants_1.default.getPackageJsonFile())), { pluginVersion: (_b = (_a = (0, GetValuesFromPackage_1.getHostAppBundleInfo)(PathsConstants_1.default.getInternalPackageJsonFile(), true)) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : '0' }), }; const analyzer = new LineOffsetAnalyzeCall_1.LineOffsetAnalyzer(options); analyzer.run(); })();