@flakiness/sdk
Advanced tools
+9
-4
@@ -1342,3 +1342,3 @@ var __defProp = Object.defineProperty; | ||
| }; | ||
| constructor(pathPrefix, folderPath, cors) { | ||
| constructor(pathPrefix, folderPath, cors = []) { | ||
| this._pathPrefix = "/" + pathPrefix.replace(/^\//, "").replace(/\/$/, ""); | ||
@@ -1418,5 +1418,6 @@ this._absoluteFolderPath = path3.resolve(folderPath); | ||
| const { url, method } = req; | ||
| if (this._cors) { | ||
| if (this._cors.length && req.headers.origin && this._cors.includes(req.headers.origin)) { | ||
| res.setHeader("Access-Control-Allow-Headers", "*"); | ||
| res.setHeader("Access-Control-Allow-Origin", this._cors); | ||
| res.setHeader("Vary", "Origin"); | ||
| res.setHeader("Access-Control-Allow-Origin", req.headers.origin); | ||
| res.setHeader("Access-Control-Allow-Methods", "*"); | ||
@@ -1473,3 +1474,7 @@ if (req.method === "OPTIONS") { | ||
| const token = randomUUIDBase62(); | ||
| const server = new StaticServer(token, reportFolder, reportViewerEndpoint); | ||
| const server = new StaticServer(token, reportFolder, [ | ||
| reportViewerEndpoint, | ||
| // trace.playwright.dev is used to load & display Playwright Test traces. | ||
| "https://trace.playwright.dev" | ||
| ]); | ||
| await server.start(9373, "127.0.0.1"); | ||
@@ -1476,0 +1481,0 @@ const url = new URL(reportViewerEndpoint); |
+1
-1
| { | ||
| "name": "@flakiness/sdk", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "private": false, | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"showReport.d.ts","sourceRoot":"","sources":["../../src/showReport.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,iBAqBpD"} | ||
| {"version":3,"file":"showReport.d.ts","sourceRoot":"","sources":["../../src/showReport.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,iBAyBpD"} |
@@ -5,5 +5,5 @@ export declare class StaticServer { | ||
| private _pathPrefix; | ||
| private _cors?; | ||
| private _cors; | ||
| private _mimeTypes; | ||
| constructor(pathPrefix: string, folderPath: string, cors?: string); | ||
| constructor(pathPrefix: string, folderPath: string, cors?: string[]); | ||
| port(): number | undefined; | ||
@@ -10,0 +10,0 @@ address(): string | undefined; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"staticServer.d.ts","sourceRoot":"","sources":["../../src/staticServer.ts"],"names":[],"mappings":"AAQA,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,KAAK,CAAC,CAAS;IAEvB,OAAO,CAAC,UAAU,CAWhB;gBAEU,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAQjE,IAAI;IAOJ,OAAO,IAAI,MAAM,GAAC,SAAS;YASb,YAAY;IAkBpB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAoB;IAyB7C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;CAiEvB"} | ||
| {"version":3,"file":"staticServer.d.ts","sourceRoot":"","sources":["../../src/staticServer.ts"],"names":[],"mappings":"AAQA,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,UAAU,CAWhB;gBAEU,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO;IAQvE,IAAI;IAOJ,OAAO,IAAI,MAAM,GAAC,SAAS;YASb,YAAY;IAkBpB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAoB;IAyB7C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;CAkEvB"} |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 14 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 14 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
116228
0.21%2663
0.19%