@vtex/diagnostics-nodejs
Version:
Diagnostics library for Node.js applications
39 lines • 1.37 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLibraryName = exports.getLibraryVersion = void 0;
const DEV_VERSION = 'v0.0.0-dev';
const DEV_NAME = 'diagnostics-nodejs-dev';
/*
* This file is automatically generated. Do not edit manually.
* To update the version or name, run the build script.
* The version and name are injected at build time.
*/
const getRawVersion = () => {
return '__DIAGNOSTICS_VERSION__';
};
const getRawLibraryName = () => {
return '__DIAGNOSTICS_NAME__';
};
/*
* Returns the version of the library.
* The version is injected at build time.
* If the version is not available, it returns a default development version.
* @returns {string} - The version of the library
*/
const getLibraryVersion = () => {
const version = getRawVersion();
return version === '__DIAGNOSTICS_VERSION__' ? DEV_VERSION : version;
};
exports.getLibraryVersion = getLibraryVersion;
/*
* Returns the name of the library.
* The name is injected at build time.
* If the name is not available, it returns a default development name.
* @returns {string} - The name of the library
*/
const getLibraryName = () => {
const name = getRawLibraryName();
return name === '__DIAGNOSTICS_NAME__' ? DEV_NAME : name;
};
exports.getLibraryName = getLibraryName;
//# sourceMappingURL=version.js.map