Skip to content

Commit e95d07e

Browse files
wrapper registry
1 parent aa28b70 commit e95d07e

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

tools/ipa/rulesets/IPA-104.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# http://go/ipa/104
33

44
functions:
5-
- eachResourceHasGetMethod
6-
- withTracking
5+
- "wrapperRegistry"
6+
77

88
rules:
99
xgen-IPA-104-resource-has-GET:
@@ -13,7 +13,4 @@ rules:
1313
given: "$.paths"
1414
then:
1515
field: "@key"
16-
function: "withTracking"
17-
functionOptions:
18-
ruleName: "xgen-IPA-104-resource-has-GET"
19-
originalFunction: "eachResourceHasGetMethod"
16+
function: "eachResourceHasGetMethod"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { withTracking } = require('./hitTracker');
2+
const eachResourceHasGetMethod = require('./eachResourceHasGetMethod');
3+
// Add additional imports as needed
4+
5+
// Wrap functions with tracking
6+
const wrappedFunctions = {
7+
eachResourceHasGetMethodWithTracking: withTracking(
8+
'xgen-IPA-104-resource-has-GET',
9+
eachResourceHasGetMethod
10+
),
11+
// Add more wrapped functions here
12+
};
13+
14+
// Export the wrapped functions
15+
module.exports = wrappedFunctions;

0 commit comments

Comments
 (0)