+9
-3
@@ -67,2 +67,8 @@ "use strict"; | ||
| } | ||
| class CnysaMarkResource extends ah.AsyncResource { | ||
| constructor(tag) { | ||
| super(`(${tag})`); | ||
| this.emitDestroy(); | ||
| } | ||
| } | ||
| /** | ||
@@ -81,3 +87,3 @@ * A class that collects AsyncResource lifecycle events for visualization | ||
| this.resources = { | ||
| 1: { uid: 1, type: '(initial)', parents: [], stack: [], internal: false, custom: false } | ||
| 1: { uid: 1, type: '(initial)', parents: [], stack: [], internal: true, custom: false } | ||
| }; | ||
@@ -98,3 +104,3 @@ this.currentScopes = [{ id: 1, stack: [] }]; | ||
| const stack = stack_trace_1.createStackTrace().slice(4); | ||
| const internal = type.startsWith('cnysa'); | ||
| const internal = resource instanceof CnysaMarkResource; | ||
| const custom = resource instanceof ah.AsyncResource; | ||
@@ -218,3 +224,3 @@ this.resources[uid] = { uid, type, parents: this.currentScopes.map(x => x.id), stack, internal, custom }; | ||
| } | ||
| new ah.AsyncResource(`cnysa(${tag})`).emitDestroy(); | ||
| new CnysaMarkResource(tag); | ||
| return this; | ||
@@ -221,0 +227,0 @@ } |
+1
-1
| { | ||
| "name": "cnysa", | ||
| "version": "0.5.0", | ||
| "version": "0.5.1", | ||
| "description": "A tool for understanding async-hooks", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance 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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance 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
33084
0.38%666
0.91%