aws-xray-sdk-hapi
Advanced tools
Comparing version 3.3.3 to 3.3.4
@@ -1,2 +0,2 @@ | ||
import * as AWSXRay from "aws-xray-sdk-core"; | ||
import * as AWSXRay from 'aws-xray-sdk-core'; | ||
@@ -11,2 +11,2 @@ declare global { | ||
export * from "./index"; | ||
export * from './index'; |
@@ -1,5 +0,5 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const AWSXray = require("aws-xray-sdk-core"); | ||
const AWSXray = require('aws-xray-sdk-core'); | ||
const { middleware: mwUtils } = AWSXray; | ||
@@ -45,8 +45,8 @@ | ||
if (localOptions.captureAWS) { | ||
AWSXray.captureAWS(require("aws-sdk")); | ||
AWSXray.captureAWS(require('aws-sdk')); | ||
} | ||
if (localOptions.captureHTTP) { | ||
AWSXray.captureHTTPsGlobal(require("http"), true); | ||
AWSXray.captureHTTPsGlobal(require("https"), true); | ||
AWSXray.captureHTTPsGlobal(require('http'), true); | ||
AWSXray.captureHTTPsGlobal(require('https'), true); | ||
} | ||
@@ -79,3 +79,3 @@ | ||
mwUtils.middlewareLog("Starting Hapi XRay segment", request.url, segment); | ||
mwUtils.middlewareLog('Starting Hapi XRay segment', request.url, segment); | ||
@@ -121,3 +121,3 @@ if (AWSXray.isAutomaticMode()) { | ||
mwUtils.middlewareLog( | ||
"Hapi XRay segment encountered an error", | ||
'Hapi XRay segment encountered an error', | ||
request.url, | ||
@@ -154,3 +154,3 @@ segment | ||
mwUtils.middlewareLog( | ||
"Closed Hapi XRay segment successfully", | ||
'Closed Hapi XRay segment successfully', | ||
request.url, | ||
@@ -167,7 +167,7 @@ segment | ||
createSegmentName: function () { | ||
let segmentName = "service"; | ||
const pkgPath = path.join(process.cwd(), "package.json"); | ||
let segmentName = 'service'; | ||
const pkgPath = path.join(process.cwd(), 'package.json'); | ||
if (fs.existsSync(pkgPath)) { | ||
const pjson = require(pkgPath); | ||
segmentName = `${pjson.name || "service"}_${pjson.version || "v1"}`; | ||
segmentName = `${pjson.name || 'service'}_${pjson.version || 'v1'}`; | ||
} | ||
@@ -174,0 +174,0 @@ return segmentName; |
{ | ||
"name": "aws-xray-sdk-hapi", | ||
"version": "3.3.3", | ||
"version": "3.3.4", | ||
"description": "AWS X-Ray plugin for Hapi.JS", | ||
@@ -17,3 +17,3 @@ "author": "Amazon Web Services", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix ./src", | ||
"lint:fix": "eslint --fix .", | ||
"test": "mocha --recursive --exit ./test/ -R spec && tsd", | ||
@@ -28,3 +28,3 @@ "test-d": "tsd", | ||
"@hapi/hapi": ">=18.x", | ||
"aws-xray-sdk-core": "^3.3.3" | ||
"aws-xray-sdk-core": "^3.3.4" | ||
}, | ||
@@ -45,3 +45,3 @@ "keywords": [ | ||
"repository": "https://github.com/aws/aws-xray-sdk-node/tree/sdk_contrib/koa", | ||
"gitHead": "ff228eeee2009711553cbcac5033d525206aba96" | ||
"gitHead": "c74bc4a3aa7aa349f2c3e970135664d689ba717b" | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
20338