11/* eslint-disable @typescript-eslint/no-explicit-any */
22import { AsyncLocalStorage } from 'async_hooks' ;
33
4- import { v4 as uuidv4 } from 'uuid' ;
5-
64import { EngineNodeData , EngineNodeTrace , isEngineNodeTrace } from '../common/models/engineNodeData.model' ;
75import { EngineEdge , EngineNode , EngineTrace } from '../common/models/engineTrace.model' ;
86import { DEFAULT_TRACE_CONFIG , TraceOptions } from '../common/models/engineTraceOptions.model' ;
@@ -154,7 +152,7 @@ export class TraceableEngine {
154152 inputs : Array < unknown > = [ ] ,
155153 options : TraceOptions < Array < any > , O > | TraceOptions < Array < any > , O > [ 'trace' ] = {
156154 trace : {
157- id : [ blockFunction . name ? blockFunction . name . replace ( 'bound ' , '' ) : 'function' , new Date ( ) ?. getTime ( ) , uuidv4 ( ) ] ?. join ( '_' ) ,
155+ id : [ blockFunction . name ? blockFunction . name . replace ( 'bound ' , '' ) : 'function' , new Date ( ) ?. getTime ( ) , crypto . randomUUID ( ) ] ?. join ( '_' ) ,
158156 label : blockFunction . name ? blockFunction . name . replace ( 'bound ' , '' ) : 'function'
159157 } ,
160158 config : DEFAULT_TRACE_CONFIG
@@ -176,7 +174,7 @@ export class TraceableEngine {
176174 id : [
177175 blockFunction . name ? blockFunction . name . replace ( 'bound ' , '' ) : 'function' ,
178176 executionTimer ?. getStartDate ( ) ?. getTime ( ) ,
179- uuidv4 ( )
177+ crypto . randomUUID ( )
180178 ] ?. join ( '_' ) ,
181179 label : [
182180 ( this . nodes ?. length ?? 0 ) + 1 ,
0 commit comments