@@ -101,7 +101,7 @@ export async function deletePackage(this: Pick<PackageUninstallHost, 'deleteMeta
101101 // guard's own throw propagates as is — an uninstall a guard could not
102102 // judge does not proceed. With no guard registered nothing is asked, and
103103 // the verb behaves exactly as it did before guards existed.
104- await runUninstallGuards . call ( this , request ) ;
104+ await runUninstallGuards ( this , request ) ;
105105
106106 const where : Record < string , unknown > = { package_id : request . packageId } ;
107107 // [#8136] This read is the uninstall's FIRST database touch, and until
@@ -392,7 +392,7 @@ export async function deletePackage(this: Pick<PackageUninstallHost, 'deleteMeta
392392 // registry did not hold and the store bound no metadata to was not a
393393 // package, so it writes none either: the `DELETE` door answers that `404`.
394394 if ( installed . held || deleted . length > 0 || failed . length > 0 ) {
395- await recordPackageUninstall . call ( this , {
395+ await recordPackageUninstall ( this , {
396396 packageId : request . packageId ,
397397 ...( installed . version ? { version : installed . version } : { } ) ,
398398 ...( request . actor ? { actor : request . actor } : { } ) ,
@@ -414,22 +414,22 @@ export async function deletePackage(this: Pick<PackageUninstallHost, 'deleteMeta
414414
415415/** The body of `ObjectStackProtocolImplementation#runUninstallGuards`; the method's docblock there is its contract. */
416416export async function runUninstallGuards (
417- this : Pick < PackageUninstallHost , 'uninstallGuards' > ,
417+ host : Pick < PackageUninstallHost , 'uninstallGuards' > ,
418418 request : Pick < DeletePackageRequest , 'packageId' | 'actor' > ,
419419) : Promise < void > {
420- await askUninstallGuards ( this . uninstallGuards , request ) ;
420+ await askUninstallGuards ( host . uninstallGuards , request ) ;
421421}
422422
423423/** The body of `ObjectStackProtocolImplementation#recordPackageUninstall`; the method's docblock there is its contract. */
424424export async function recordPackageUninstall (
425- this : Pick < PackageUninstallHost , 'environmentId' | 'getServicesRegistry' > ,
425+ host : Pick < PackageUninstallHost , 'environmentId' | 'getServicesRegistry' > ,
426426 record : PackageUninstallRecord ,
427427) : Promise < void > {
428- await writePackageUninstallEvent ( this . getServicesRegistry ?.( ) ?. get ( 'audit' ) , {
428+ await writePackageUninstallEvent ( host . getServicesRegistry ?.( ) ?. get ( 'audit' ) , {
429429 action : 'package_uninstall' ,
430430 packageId : record . packageId ,
431431 ...( record . version ? { version : record . version } : { } ) ,
432- ...( this . environmentId ? { environmentId : this . environmentId } : { } ) ,
432+ ...( host . environmentId ? { environmentId : host . environmentId } : { } ) ,
433433 ...( record . actor ? { actor : record . actor } : { } ) ,
434434 ...( record . keepData === true ? { keepData : true } : { } ) ,
435435 itemsRemoved : record . itemsRemoved ,
0 commit comments