@contrast/patcher
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,16 @@ | ||
/* | ||
* Copyright: 2022 Contrast Security, Inc | ||
* Contact: support@contrastsecurity.com | ||
* License: Commercial | ||
* NOTICE: This Software and the patented inventions embodied within may only be | ||
* used as part of Contrast Security’s commercial offerings. Even though it is | ||
* made available through public repositories, use of this Software is subject to | ||
* the applicable End User Licensing Agreement found at | ||
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed | ||
* between Contrast Security and the End User. The Software may not be reverse | ||
* engineered, modified, repackaged, sold, redistributed or otherwise used in a | ||
* way not consistent with the End User License Agreement. | ||
*/ | ||
import { Core } from '@contrast/core'; | ||
@@ -5,9 +20,10 @@ | ||
export interface Patcher { | ||
patch: () => void, | ||
patch: (obj: function | class | { [key: string]: any }, prop: string, options: { name: string, | ||
patchType: string, pre?: function, around?: function, post?: function }) => function | class | { [key: string]: any }, | ||
resetInstrumentation: () => void, | ||
unpatch: () => void, | ||
unwrap: () => void | ||
isContrastHooked: () => void | ||
hookedFunctionToString: () => void | ||
hookedFunctions: () => void | ||
unpatch: (fn: function, funcName: string, patchType: string) => void, | ||
unwrap: (fn: function) => function | ||
isContrastHooked: (fn: function) => boolean | ||
hookedFunctionToString: (fn: function) => string | ||
hookedFunctions: WeakMap<K<function>, V<{ fn: function }>> | ||
} | ||
@@ -14,0 +30,0 @@ |
@@ -0,1 +1,16 @@ | ||
/* | ||
* Copyright: 2022 Contrast Security, Inc | ||
* Contact: support@contrastsecurity.com | ||
* License: Commercial | ||
* NOTICE: This Software and the patented inventions embodied within may only be | ||
* used as part of Contrast Security’s commercial offerings. Even though it is | ||
* made available through public repositories, use of this Software is subject to | ||
* the applicable End User Licensing Agreement found at | ||
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed | ||
* between Contrast Security and the End User. The Software may not be reverse | ||
* engineered, modified, repackaged, sold, redistributed or otherwise used in a | ||
* way not consistent with the End User License Agreement. | ||
*/ | ||
'use strict'; | ||
@@ -132,2 +147,3 @@ | ||
hooked, | ||
orig: fn, | ||
funcKey, | ||
@@ -134,0 +150,0 @@ obj: new.target || this, |
{ | ||
"name": "@contrast/patcher", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Advanced monkey patching--registers hooks to run in and around functions", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18043
421