@@ -259,8 +259,10 @@ 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 } ` )
263
+ console . log ( 'startChannel._stores' , startChannel . _stores )
262
264
if ( ! startChannel . hasSubscribers ) return original . apply ( this , arguments )
263
-
265
+ console . log ( `HAS_SUBSCRIBERS - name: ${ name } , method: ${ method } , operation: ${ operation } ` )
264
266
const lastIndex = arguments . length - 1
265
267
const cb = typeof arguments [ lastIndex ] === 'function' && arguments [ lastIndex ]
266
268
const params = getMethodParamsRelationByPrefix ( prefix ) [ operation ]
@@ -272,6 +274,7 @@ function createWrapFunction (prefix = '', override = '') {
272
274
ctx . error = error
273
275
errorChannel . publish ( ctx )
274
276
}
277
+ console . log ( 'finishChannel.runStores(ctx, cb)' )
275
278
return finishChannel . runStores ( ctx , cb )
276
279
}
277
280
@@ -282,6 +285,7 @@ function createWrapFunction (prefix = '', override = '') {
282
285
}
283
286
284
287
return startChannel . runStores ( ctx , ( ) => {
288
+ console . log ( `startChannel.runStores: name: ${ name } , method: ${ method } , operation: ${ operation } ` )
285
289
if ( abortController . signal . aborted ) {
286
290
const error = abortController . signal . reason || new Error ( 'Aborted' )
287
291
@@ -319,7 +323,7 @@ function createWrapFunction (prefix = '', override = '') {
319
323
}
320
324
)
321
325
}
322
-
326
+ console . log ( 'finishChannel.runStores(ctx, () => {}): L324' )
323
327
finishChannel . runStores ( ctx , ( ) => { } )
324
328
325
329
return result
0 commit comments