@@ -91,6 +91,9 @@ export class UserStorageMockttpController {
9191 request : Pick < CompletedRequest , 'path' | 'headers' > ,
9292 statusCode : number = 200 ,
9393 ) => {
94+ // #region agent log
95+ console . log ( `[SYNC_DEBUG:onGet] path=${ path } , url=${ request . path } ` ) ;
96+ // #endregion
9497 const srpIdentifier = getSrpIdentifierFromHeaders ( request . headers ) ;
9598 const internalPathData = this . paths . get ( path ) ;
9699
@@ -154,6 +157,9 @@ export class UserStorageMockttpController {
154157 request : Pick < CompletedRequest , 'path' | 'body' | 'headers' > ,
155158 statusCode : number = 204 ,
156159 ) => {
160+ // #region agent log
161+ console . log ( `[SYNC_DEBUG:onPut] path=${ path } , url=${ request . path } ` ) ;
162+ // #endregion
157163 const srpIdentifier = getSrpIdentifierFromHeaders ( request . headers ) ;
158164 const isFeatureEntry = determineIfFeatureEntryFromURL ( request . path ) ;
159165
@@ -330,6 +336,15 @@ export class UserStorageMockttpController {
330336 } ,
331337 ) => {
332338 const previouslySetupPath = this . paths . get ( path ) ;
339+ // #region agent log
340+ const hadPreviousData = ! ! previouslySetupPath ;
341+ const previousResponseCount = previouslySetupPath ?. response ?. length ?? 0 ;
342+ const newResponseCount =
343+ overrides ?. getResponse ?. length ?? previousResponseCount ;
344+ console . log (
345+ `[SYNC_DEBUG:setupPath] path=${ path } , hadPreviousData=${ hadPreviousData } , previousResponseCount=${ previousResponseCount } , newResponseCount=${ newResponseCount } ` ,
346+ ) ;
347+ // #endregion
333348
334349 this . paths . set ( path , {
335350 response : overrides ?. getResponse || previouslySetupPath ?. response || [ ] ,
@@ -357,5 +372,8 @@ export class UserStorageMockttpController {
357372 . thenCallback ( ( request ) =>
358373 this . onDelete ( path , request , overrides ?. deleteStatusCode ) ,
359374 ) ;
375+ // #region agent log
376+ console . log ( `[SYNC_DEBUG:setupPath] Handlers registered for path=${ path } ` ) ;
377+ // #endregion
360378 } ;
361379}
0 commit comments