backtrace-service
Advanced tools
Comparing version 3.3.0-alpha.2 to 3.3.0
@@ -40,1 +40,2 @@ /** | ||
export { asyncWrapper } from './utils/asyncWrapper'; | ||
export { PackageUtils } from './utils/packageUtils'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.asyncWrapper = exports.UniverseHelper = exports.ServiceConfiguration = exports.BacktraceService = exports.ErrorScope = exports.ApiError = exports.MetricsStorage = exports.Logger = exports.IdentityManager = exports.listenDescriptor = exports.getDescriptor = void 0; | ||
exports.PackageUtils = exports.asyncWrapper = exports.UniverseHelper = exports.ServiceConfiguration = exports.BacktraceService = exports.ErrorScope = exports.ApiError = exports.MetricsStorage = exports.Logger = exports.IdentityManager = exports.listenDescriptor = exports.getDescriptor = void 0; | ||
/** | ||
@@ -43,2 +43,4 @@ * Identity | ||
Object.defineProperty(exports, "asyncWrapper", { enumerable: true, get: function () { return asyncWrapper_1.asyncWrapper; } }); | ||
var packageUtils_1 = require("./utils/packageUtils"); | ||
Object.defineProperty(exports, "PackageUtils", { enumerable: true, get: function () { return packageUtils_1.PackageUtils; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -52,3 +52,2 @@ "use strict"; | ||
var nocache_1 = __importDefault(require("nocache")); | ||
var path_1 = __importDefault(require("path")); | ||
var __1 = require(".."); | ||
@@ -58,2 +57,3 @@ var logger_1 = require("../log/logger"); | ||
var errorScope_1 = require("../model/errorScope"); | ||
var packageUtils_1 = require("../utils/packageUtils"); | ||
var projectValidation_1 = require("./projectValidation"); | ||
@@ -129,7 +129,7 @@ var serviceConfiguration_1 = require("./serviceConfiguration"); | ||
} | ||
var defaultPackagePath = path_1.default.join(process.cwd(), 'package.json'); | ||
if (!fs_1.default.existsSync(defaultPackagePath)) { | ||
var servicePackageJsonPath = packageUtils_1.PackageUtils.packageJsonPath; | ||
if (!servicePackageJsonPath || !fs_1.default.existsSync(servicePackageJsonPath)) { | ||
return undefined; | ||
} | ||
var version = require(defaultPackagePath).version; | ||
var version = require(servicePackageJsonPath).version; | ||
this._serviceVersion = version; | ||
@@ -136,0 +136,0 @@ return this._serviceVersion; |
@@ -41,5 +41,6 @@ import { Logger } from '..'; | ||
* the package.json package name will be returned. Otherwise a service | ||
* name with the "backtrace-" prefix. | ||
* name with the "backtrace-" prefix or name of the package available in | ||
* the package snapshot. | ||
*/ | ||
private getPackageName; | ||
} |
@@ -10,2 +10,3 @@ "use strict"; | ||
var __1 = require(".."); | ||
var packageUtils_1 = require("../utils/packageUtils"); | ||
/** | ||
@@ -96,7 +97,11 @@ * Backtrace service configuration. Class responsible for managing configuration paths/parsing them. | ||
* the package.json package name will be returned. Otherwise a service | ||
* name with the "backtrace-" prefix. | ||
* name with the "backtrace-" prefix or name of the package available in | ||
* the package snapshot. | ||
*/ | ||
ServiceConfiguration.prototype.getPackageName = function (serviceName) { | ||
return this._isExecutable && process.env.npm_package_name | ||
? process.env.npm_package_name | ||
if (process.env.npm_package_name) { | ||
return process.env.npm_package_name; | ||
} | ||
return packageUtils_1.PackageUtils.isPackage | ||
? packageUtils_1.PackageUtils.packageName | ||
: "backtrace-".concat(serviceName); | ||
@@ -103,0 +108,0 @@ }; |
{ | ||
"name": "backtrace-service", | ||
"version": "3.3.0-alpha.2", | ||
"version": "3.3.0", | ||
"description": "Common tools for Backtrace Node services", | ||
@@ -5,0 +5,0 @@ "author": "Backtrace", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
211534
79
3079
1