@dynatrace/react-native-plugin
Version:
This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.
19 lines (18 loc) • 596 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHostAppBundleInfo = void 0;
const fs_1 = require("fs");
const pluginName = '@dynatrace/react-native-plugin';
const getHostAppBundleInfo = (path, allowInternal = false) => {
try {
const pkg = JSON.parse((0, fs_1.readFileSync)(path, 'utf8'));
if (pkg.name === pluginName && !allowInternal) {
return null;
}
return { name: pkg.name, version: pkg.version };
}
catch (_a) {
return null;
}
};
exports.getHostAppBundleInfo = getHostAppBundleInfo;