@@ -259,8 +259,9 @@ function createWrapFunction (prefix = '', override = '') {
259
259
const operation = name . match ( / ^ ( .+ ?) ( S y n c ) ? ( \. n a t i v e ) ? $ / ) [ 1 ]
260
260
261
261
return function ( ) {
262
+ console . log ( `wrapFunction => function(): name: ${ name } , method: ${ method } , operation: ${ operation } ` )
262
263
if ( ! startChannel . hasSubscribers ) return original . apply ( this , arguments )
263
-
264
+ console . log ( `HAS_SUBSCRIBERS - name: ${ name } , method: ${ method } , operation: ${ operation } ` )
264
265
const lastIndex = arguments . length - 1
265
266
const cb = typeof arguments [ lastIndex ] === 'function' && arguments [ lastIndex ]
266
267
const params = getMethodParamsRelationByPrefix ( prefix ) [ operation ]
@@ -272,6 +273,7 @@ function createWrapFunction (prefix = '', override = '') {
272
273
ctx . error = error
273
274
errorChannel . publish ( ctx )
274
275
}
276
+ console . log ( 'finishChannel.runStores(ctx, cb)' )
275
277
return finishChannel . runStores ( ctx , cb )
276
278
}
277
279
@@ -282,6 +284,7 @@ function createWrapFunction (prefix = '', override = '') {
282
284
}
283
285
284
286
return startChannel . runStores ( ctx , ( ) => {
287
+ console . log ( `startChannel.runStores: name: ${ name } , method: ${ method } , operation: ${ operation } ` )
285
288
if ( abortController . signal . aborted ) {
286
289
const error = abortController . signal . reason || new Error ( 'Aborted' )
287
290
@@ -319,7 +322,7 @@ function createWrapFunction (prefix = '', override = '') {
319
322
}
320
323
)
321
324
}
322
-
325
+ console . log ( 'finishChannel.runStores(ctx, () => {}): L324' )
323
326
finishChannel . runStores ( ctx , ( ) => { } )
324
327
325
328
return result
0 commit comments