@featurevisor/core 1.18.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -1
- package/CHANGELOG.md +22 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +1 -1
- package/coverage/lcov-report/lib/builder/revision.js.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
- package/coverage/lcov-report/lib/tester/checkIfObjectsAreEqual.js.html +1 -1
- package/coverage/lcov-report/lib/tester/index.html +1 -1
- package/coverage/lcov-report/lib/tester/matrix.js.html +1 -1
- package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
- package/coverage/lcov-report/src/builder/index.html +1 -1
- package/coverage/lcov-report/src/builder/revision.ts.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
- package/coverage/lcov-report/src/tester/checkIfObjectsAreEqual.ts.html +1 -1
- package/coverage/lcov-report/src/tester/index.html +1 -1
- package/coverage/lcov-report/src/tester/matrix.ts.html +1 -1
- package/lib/evaluate/index.d.ts +7 -0
- package/lib/evaluate/index.js +32 -1
- package/lib/evaluate/index.js.map +1 -1
- package/lib/find-duplicate-segments/findDuplicateSegments.d.ts +9 -2
- package/lib/find-duplicate-segments/findDuplicateSegments.js +62 -11
- package/lib/find-duplicate-segments/findDuplicateSegments.js.map +1 -1
- package/lib/find-duplicate-segments/index.d.ts +2 -1
- package/lib/find-duplicate-segments/index.js +15 -8
- package/lib/find-duplicate-segments/index.js.map +1 -1
- package/package.json +3 -3
- package/src/evaluate/index.ts +46 -2
- package/src/find-duplicate-segments/findDuplicateSegments.ts +44 -4
- package/src/find-duplicate-segments/index.ts +16 -7
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/home/runner/work/featurevisor/featurevisor/packages/core/src/assess-distribution/index.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/benchmark/index.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/evaluate/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"58","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"59","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"60","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"61","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"62","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"63","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"64","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/pretty.ts":"65"},{"size":4276,"mtime":1713886872912,"results":"66","hashOfConfig":"67"},{"size":3741,"mtime":1713886872912,"results":"68","hashOfConfig":"67"},{"size":3214,"mtime":1713886872912,"results":"69","hashOfConfig":"67"},{"size":1014,"mtime":1713886872912,"results":"70","hashOfConfig":"67"},{"size":10477,"mtime":1713886872912,"results":"71","hashOfConfig":"67"},{"size":2673,"mtime":1713886872912,"results":"72","hashOfConfig":"67"},{"size":1755,"mtime":1713886872912,"results":"73","hashOfConfig":"67"},{"size":65,"mtime":1713886872912,"results":"74","hashOfConfig":"67"},{"size":688,"mtime":1713886872912,"results":"75","hashOfConfig":"67"},{"size":760,"mtime":1713886872912,"results":"76","hashOfConfig":"67"},{"size":12889,"mtime":1713886872912,"results":"77","hashOfConfig":"67"},{"size":4894,"mtime":1713886872912,"results":"78","hashOfConfig":"67"},{"size":60,"mtime":1713886872912,"results":"79","hashOfConfig":"67"},{"size":1035,"mtime":1713886872912,"results":"80","hashOfConfig":"67"},{"size":4326,"mtime":1713886872912,"results":"81","hashOfConfig":"67"},{"size":1423,"mtime":1713886872912,"results":"82","hashOfConfig":"67"},{"size":5208,"mtime":1713886872912,"results":"83","hashOfConfig":"67"},{"size":10198,"mtime":1713886872912,"results":"84","hashOfConfig":"67"},{"size":94,"mtime":1713886872912,"results":"85","hashOfConfig":"67"},{"size":279,"mtime":1713886872912,"results":"86","hashOfConfig":"67"},{"size":3942,"mtime":1713886872912,"results":"87","hashOfConfig":"67"},{"size":1033,"mtime":1713886872912,"results":"88","hashOfConfig":"67"},{"size":540,"mtime":1713886872912,"results":"89","hashOfConfig":"67"},{"size":9681,"mtime":1713886872912,"results":"90","hashOfConfig":"67"},{"size":1476,"mtime":1713886872912,"results":"91","hashOfConfig":"67"},{"size":6250,"mtime":1713886872912,"results":"92","hashOfConfig":"67"},{"size":444,"mtime":1713886872912,"results":"93","hashOfConfig":"67"},{"size":1308,"mtime":1713886872912,"results":"94","hashOfConfig":"67"},{"size":359,"mtime":1713886872912,"results":"95","hashOfConfig":"67"},{"size":1119,"mtime":1713886872912,"results":"96","hashOfConfig":"67"},{"size":1464,"mtime":1713886872912,"results":"97","hashOfConfig":"67"},{"size":4007,"mtime":1713886872912,"results":"98","hashOfConfig":"67"},{"size":7758,"mtime":1713886872912,"results":"99","hashOfConfig":"67"},{"size":1221,"mtime":1713886872912,"results":"100","hashOfConfig":"67"},{"size":31,"mtime":1713886872912,"results":"101","hashOfConfig":"67"},{"size":9986,"mtime":1713886872916,"results":"102","hashOfConfig":"67"},{"size":982,"mtime":1713886872916,"results":"103","hashOfConfig":"67"},{"size":364,"mtime":1713886872916,"results":"104","hashOfConfig":"67"},{"size":2432,"mtime":1713886872916,"results":"105","hashOfConfig":"67"},{"size":641,"mtime":1713886872916,"results":"106","hashOfConfig":"67"},{"size":1481,"mtime":1713886872916,"results":"107","hashOfConfig":"67"},{"size":1178,"mtime":1713886872916,"results":"108","hashOfConfig":"67"},{"size":6187,"mtime":1713886872916,"results":"109","hashOfConfig":"67"},{"size":516,"mtime":1713886872916,"results":"110","hashOfConfig":"67"},{"size":496,"mtime":1713886872916,"results":"111","hashOfConfig":"67"},{"size":607,"mtime":1713886872916,"results":"112","hashOfConfig":"67"},{"size":1560,"mtime":1713886872916,"results":"113","hashOfConfig":"67"},{"size":59,"mtime":1713886872916,"results":"114","hashOfConfig":"67"},{"size":1681,"mtime":1713886872916,"results":"115","hashOfConfig":"67"},{"size":298,"mtime":1713886872916,"results":"116","hashOfConfig":"67"},{"size":932,"mtime":1713886872916,"results":"117","hashOfConfig":"67"},{"size":468,"mtime":1713886872916,"results":"118","hashOfConfig":"67"},{"size":212,"mtime":1713886872916,"results":"119","hashOfConfig":"67"},{"size":62,"mtime":1713886872916,"results":"120","hashOfConfig":"67"},{"size":1188,"mtime":1713886872916,"results":"121","hashOfConfig":"67"},{"size":5021,"mtime":1713886872916,"results":"122","hashOfConfig":"67"},{"size":516,"mtime":1713886872916,"results":"123","hashOfConfig":"67"},{"size":1691,"mtime":1713886872916,"results":"124","hashOfConfig":"67"},{"size":6968,"mtime":1713886872916,"results":"125","hashOfConfig":"67"},{"size":5702,"mtime":1713886872916,"results":"126","hashOfConfig":"67"},{"size":2328,"mtime":1713886872916,"results":"127","hashOfConfig":"67"},{"size":1993,"mtime":1713886872916,"results":"128","hashOfConfig":"67"},{"size":3641,"mtime":1713886872916,"results":"129","hashOfConfig":"67"},{"size":80,"mtime":1713886872916,"results":"130","hashOfConfig":"67"},{"size":304,"mtime":1713886872916,"results":"131","hashOfConfig":"67"},{"filePath":"132","messages":"133","suppressedMessages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1prqrsx",{"filePath":"135","messages":"136","suppressedMessages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","suppressedMessages":"140","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","suppressedMessages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","suppressedMessages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"147","messages":"148","suppressedMessages":"149","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","suppressedMessages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","suppressedMessages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","suppressedMessages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","suppressedMessages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","suppressedMessages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","suppressedMessages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","suppressedMessages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","suppressedMessages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","suppressedMessages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","suppressedMessages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","suppressedMessages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","suppressedMessages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","suppressedMessages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","suppressedMessages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","suppressedMessages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","suppressedMessages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","suppressedMessages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","suppressedMessages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","suppressedMessages":"206","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"207","messages":"208","suppressedMessages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","suppressedMessages":"212","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"213","messages":"214","suppressedMessages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","suppressedMessages":"218","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"219","messages":"220","suppressedMessages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","suppressedMessages":"224","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"225","messages":"226","suppressedMessages":"227","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","suppressedMessages":"230","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"231","messages":"232","suppressedMessages":"233","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","suppressedMessages":"236","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"237","messages":"238","suppressedMessages":"239","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","suppressedMessages":"242","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"243","messages":"244","suppressedMessages":"245","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","suppressedMessages":"248","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"249","messages":"250","suppressedMessages":"251","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","suppressedMessages":"254","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"255","messages":"256","suppressedMessages":"257","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","suppressedMessages":"260","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"261","messages":"262","suppressedMessages":"263","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","suppressedMessages":"266","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"267","messages":"268","suppressedMessages":"269","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"270","messages":"271","suppressedMessages":"272","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"273","messages":"274","suppressedMessages":"275","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"276","messages":"277","suppressedMessages":"278","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"279","messages":"280","suppressedMessages":"281","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"282","messages":"283","suppressedMessages":"284","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"285","messages":"286","suppressedMessages":"287","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"288","messages":"289","suppressedMessages":"290","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"291","messages":"292","suppressedMessages":"293","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"294","messages":"295","suppressedMessages":"296","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"297","messages":"298","suppressedMessages":"299","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"300","messages":"301","suppressedMessages":"302","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"303","messages":"304","suppressedMessages":"305","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"306","messages":"307","suppressedMessages":"308","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"309","messages":"310","suppressedMessages":"311","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"312","messages":"313","suppressedMessages":"314","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"315","messages":"316","suppressedMessages":"317","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"318","messages":"319","suppressedMessages":"320","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"321","messages":"322","suppressedMessages":"323","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"324","messages":"325","suppressedMessages":"326","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/featurevisor/featurevisor/packages/core/src/assess-distribution/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/benchmark/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts",[],["327","328"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/evaluate/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["329"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/pretty.ts",[],[],{"ruleId":"330","severity":2,"message":"331","line":22,"column":7,"nodeType":"332","messageId":"333","endLine":22,"endColumn":18,"suppressions":"334"},{"ruleId":"335","severity":2,"message":"336","line":22,"column":21,"nodeType":"337","messageId":"338","endLine":22,"endColumn":81,"fix":"339","suppressions":"340"},{"ruleId":"330","severity":2,"message":"341","line":51,"column":10,"nodeType":"332","messageId":"333","endLine":51,"endColumn":38,"suppressions":"342"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["343"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"344","text":"345"},["346"],"'getFeaturevisorTypeFromValue' is defined but never used.",["347"],{"kind":"348","justification":"349"},[515,518]," {3}",{"kind":"348","justification":"349"},{"kind":"348","justification":"349"},"directive",""]
|
|
1
|
+
[{"/home/runner/work/featurevisor/featurevisor/packages/core/src/assess-distribution/index.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/benchmark/index.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/evaluate/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"58","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"59","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"60","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"61","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"62","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"63","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"64","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/pretty.ts":"65"},{"size":4276,"mtime":1714500403246,"results":"66","hashOfConfig":"67"},{"size":3741,"mtime":1714500403246,"results":"68","hashOfConfig":"67"},{"size":3214,"mtime":1714500403246,"results":"69","hashOfConfig":"67"},{"size":1014,"mtime":1714500403246,"results":"70","hashOfConfig":"67"},{"size":10477,"mtime":1714500403246,"results":"71","hashOfConfig":"67"},{"size":2673,"mtime":1714500403246,"results":"72","hashOfConfig":"67"},{"size":1755,"mtime":1714500403246,"results":"73","hashOfConfig":"67"},{"size":65,"mtime":1714500403246,"results":"74","hashOfConfig":"67"},{"size":688,"mtime":1714500403246,"results":"75","hashOfConfig":"67"},{"size":760,"mtime":1714500403246,"results":"76","hashOfConfig":"67"},{"size":12889,"mtime":1714500403246,"results":"77","hashOfConfig":"67"},{"size":4894,"mtime":1714500403246,"results":"78","hashOfConfig":"67"},{"size":60,"mtime":1714500403246,"results":"79","hashOfConfig":"67"},{"size":1035,"mtime":1714500403246,"results":"80","hashOfConfig":"67"},{"size":4326,"mtime":1714500403246,"results":"81","hashOfConfig":"67"},{"size":1423,"mtime":1714500403246,"results":"82","hashOfConfig":"67"},{"size":5208,"mtime":1714500403246,"results":"83","hashOfConfig":"67"},{"size":10198,"mtime":1714500403246,"results":"84","hashOfConfig":"67"},{"size":94,"mtime":1714500403246,"results":"85","hashOfConfig":"67"},{"size":279,"mtime":1714500403246,"results":"86","hashOfConfig":"67"},{"size":4716,"mtime":1714500403246,"results":"87","hashOfConfig":"67"},{"size":1957,"mtime":1714500403246,"results":"88","hashOfConfig":"67"},{"size":820,"mtime":1714500403246,"results":"89","hashOfConfig":"67"},{"size":9681,"mtime":1714500403246,"results":"90","hashOfConfig":"67"},{"size":1476,"mtime":1714500403246,"results":"91","hashOfConfig":"67"},{"size":6250,"mtime":1714500403246,"results":"92","hashOfConfig":"67"},{"size":444,"mtime":1714500403246,"results":"93","hashOfConfig":"67"},{"size":1308,"mtime":1714500403246,"results":"94","hashOfConfig":"67"},{"size":359,"mtime":1714500403246,"results":"95","hashOfConfig":"67"},{"size":1119,"mtime":1714500403246,"results":"96","hashOfConfig":"67"},{"size":1464,"mtime":1714500403246,"results":"97","hashOfConfig":"67"},{"size":4007,"mtime":1714500403246,"results":"98","hashOfConfig":"67"},{"size":7758,"mtime":1714500403246,"results":"99","hashOfConfig":"67"},{"size":1221,"mtime":1714500403246,"results":"100","hashOfConfig":"67"},{"size":31,"mtime":1714500403246,"results":"101","hashOfConfig":"67"},{"size":9986,"mtime":1714500403246,"results":"102","hashOfConfig":"67"},{"size":982,"mtime":1714500403246,"results":"103","hashOfConfig":"67"},{"size":364,"mtime":1714500403246,"results":"104","hashOfConfig":"67"},{"size":2432,"mtime":1714500403246,"results":"105","hashOfConfig":"67"},{"size":641,"mtime":1714500403246,"results":"106","hashOfConfig":"67"},{"size":1481,"mtime":1714500403246,"results":"107","hashOfConfig":"67"},{"size":1178,"mtime":1714500403246,"results":"108","hashOfConfig":"67"},{"size":6187,"mtime":1714500403246,"results":"109","hashOfConfig":"67"},{"size":516,"mtime":1714500403246,"results":"110","hashOfConfig":"67"},{"size":496,"mtime":1714500403246,"results":"111","hashOfConfig":"67"},{"size":607,"mtime":1714500403246,"results":"112","hashOfConfig":"67"},{"size":1560,"mtime":1714500403246,"results":"113","hashOfConfig":"67"},{"size":59,"mtime":1714500403246,"results":"114","hashOfConfig":"67"},{"size":1681,"mtime":1714500403246,"results":"115","hashOfConfig":"67"},{"size":298,"mtime":1714500403246,"results":"116","hashOfConfig":"67"},{"size":932,"mtime":1714500403246,"results":"117","hashOfConfig":"67"},{"size":468,"mtime":1714500403246,"results":"118","hashOfConfig":"67"},{"size":212,"mtime":1714500403246,"results":"119","hashOfConfig":"67"},{"size":62,"mtime":1714500403246,"results":"120","hashOfConfig":"67"},{"size":1188,"mtime":1714500403246,"results":"121","hashOfConfig":"67"},{"size":5021,"mtime":1714500403246,"results":"122","hashOfConfig":"67"},{"size":516,"mtime":1714500403246,"results":"123","hashOfConfig":"67"},{"size":1691,"mtime":1714500403246,"results":"124","hashOfConfig":"67"},{"size":6968,"mtime":1714500403246,"results":"125","hashOfConfig":"67"},{"size":5702,"mtime":1714500403246,"results":"126","hashOfConfig":"67"},{"size":2328,"mtime":1714500403246,"results":"127","hashOfConfig":"67"},{"size":1993,"mtime":1714500403246,"results":"128","hashOfConfig":"67"},{"size":3641,"mtime":1714500403246,"results":"129","hashOfConfig":"67"},{"size":80,"mtime":1714500403246,"results":"130","hashOfConfig":"67"},{"size":304,"mtime":1714500403246,"results":"131","hashOfConfig":"67"},{"filePath":"132","messages":"133","suppressedMessages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1prqrsx",{"filePath":"135","messages":"136","suppressedMessages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","suppressedMessages":"140","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","suppressedMessages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","suppressedMessages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"147","messages":"148","suppressedMessages":"149","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","suppressedMessages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","suppressedMessages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","suppressedMessages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","suppressedMessages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","suppressedMessages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","suppressedMessages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","suppressedMessages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","suppressedMessages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","suppressedMessages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","suppressedMessages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","suppressedMessages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","suppressedMessages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","suppressedMessages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","suppressedMessages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","suppressedMessages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","suppressedMessages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","suppressedMessages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","suppressedMessages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","suppressedMessages":"206","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"207","messages":"208","suppressedMessages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","suppressedMessages":"212","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"213","messages":"214","suppressedMessages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","suppressedMessages":"218","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"219","messages":"220","suppressedMessages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","suppressedMessages":"224","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"225","messages":"226","suppressedMessages":"227","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","suppressedMessages":"230","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"231","messages":"232","suppressedMessages":"233","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","suppressedMessages":"236","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"237","messages":"238","suppressedMessages":"239","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","suppressedMessages":"242","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"243","messages":"244","suppressedMessages":"245","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","suppressedMessages":"248","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"249","messages":"250","suppressedMessages":"251","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","suppressedMessages":"254","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"255","messages":"256","suppressedMessages":"257","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","suppressedMessages":"260","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"261","messages":"262","suppressedMessages":"263","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","suppressedMessages":"266","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"267","messages":"268","suppressedMessages":"269","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"270","messages":"271","suppressedMessages":"272","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"273","messages":"274","suppressedMessages":"275","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"276","messages":"277","suppressedMessages":"278","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"279","messages":"280","suppressedMessages":"281","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"282","messages":"283","suppressedMessages":"284","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"285","messages":"286","suppressedMessages":"287","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"288","messages":"289","suppressedMessages":"290","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"291","messages":"292","suppressedMessages":"293","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"294","messages":"295","suppressedMessages":"296","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"297","messages":"298","suppressedMessages":"299","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"300","messages":"301","suppressedMessages":"302","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"303","messages":"304","suppressedMessages":"305","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"306","messages":"307","suppressedMessages":"308","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"309","messages":"310","suppressedMessages":"311","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"312","messages":"313","suppressedMessages":"314","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"315","messages":"316","suppressedMessages":"317","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"318","messages":"319","suppressedMessages":"320","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"321","messages":"322","suppressedMessages":"323","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"324","messages":"325","suppressedMessages":"326","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/featurevisor/featurevisor/packages/core/src/assess-distribution/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/benchmark/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts",[],["327","328"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/evaluate/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["329"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/pretty.ts",[],[],{"ruleId":"330","severity":2,"message":"331","line":22,"column":7,"nodeType":"332","messageId":"333","endLine":22,"endColumn":18,"suppressions":"334"},{"ruleId":"335","severity":2,"message":"336","line":22,"column":21,"nodeType":"337","messageId":"338","endLine":22,"endColumn":81,"fix":"339","suppressions":"340"},{"ruleId":"330","severity":2,"message":"341","line":51,"column":10,"nodeType":"332","messageId":"333","endLine":51,"endColumn":38,"suppressions":"342"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["343"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"344","text":"345"},["346"],"'getFeaturevisorTypeFromValue' is defined but never used.",["347"],{"kind":"348","justification":"349"},[515,518]," {3}",{"kind":"348","justification":"349"},{"kind":"348","justification":"349"},"directive",""]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.20.0](https://github.com/featurevisor/featurevisor/compare/v1.19.0...v1.20.0) (2024-04-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* allow evaluating in CLI with more verbosity ([#300](https://github.com/featurevisor/featurevisor/issues/300)) ([8c3a096](https://github.com/featurevisor/featurevisor/commit/8c3a0962a5950abf424695db314ee5eeb8e6ccd5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [1.19.0](https://github.com/featurevisor/featurevisor/compare/v1.18.1...v1.19.0) (2024-04-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* find duplicate segments with authors info ([#299](https://github.com/featurevisor/featurevisor/issues/299)) ([5008066](https://github.com/featurevisor/featurevisor/commit/5008066128fb7c732b633856dcffcb768f52c88c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.18.1](https://github.com/featurevisor/featurevisor/compare/v1.18.0...v1.18.1) (2024-04-23)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @featurevisor/core
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1714500542471" clover="3.2.0">
|
|
3
|
+
<project timestamp="1714500542471" name="All files">
|
|
4
4
|
<metrics statements="377" coveredstatements="256" conditionals="190" coveredconditionals="119" methods="54" coveredmethods="37" elements="621" coveredelements="412" complexity="0" loc="377" ncloc="377" packages="4" files="10" classes="10"/>
|
|
5
5
|
<package name="lib.builder">
|
|
6
6
|
<metrics statements="104" coveredstatements="98" conditionals="58" coveredconditionals="48" methods="15" coveredmethods="15"/>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2024-04-
|
|
149
|
+
at 2024-04-30T18:09:02.430Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -175,7 +175,7 @@ exports.getUpdatedAvailableRangesAfterFilling = getUpdatedAvailableRangesAfterFi
|
|
|
175
175
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
176
176
|
Code coverage generated by
|
|
177
177
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
178
|
-
at 2024-04-
|
|
178
|
+
at 2024-04-30T18:09:02.430Z
|
|
179
179
|
</div>
|
|
180
180
|
<script src="../../prettify.js"></script>
|
|
181
181
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2024-04-
|
|
134
|
+
at 2024-04-30T18:09:02.430Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -136,7 +136,7 @@ exports.getNextRevision = getNextRevision;
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
139
|
-
at 2024-04-
|
|
139
|
+
at 2024-04-30T18:09:02.430Z
|
|
140
140
|
</div>
|
|
141
141
|
<script src="../../prettify.js"></script>
|
|
142
142
|
<script>
|
|
@@ -454,7 +454,7 @@ exports.getTraffic = getTraffic;
|
|
|
454
454
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
455
455
|
Code coverage generated by
|
|
456
456
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
457
|
-
at 2024-04-
|
|
457
|
+
at 2024-04-30T18:09:02.430Z
|
|
458
458
|
</div>
|
|
459
459
|
<script src="../../prettify.js"></script>
|
|
460
460
|
<script>
|
|
@@ -139,7 +139,7 @@ exports.checkIfObjectsAreEqual = checkIfObjectsAreEqual;
|
|
|
139
139
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
140
140
|
Code coverage generated by
|
|
141
141
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
142
|
-
at 2024-04-
|
|
142
|
+
at 2024-04-30T18:09:02.430Z
|
|
143
143
|
</div>
|
|
144
144
|
<script src="../../prettify.js"></script>
|
|
145
145
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-04-
|
|
119
|
+
at 2024-04-30T18:09:02.430Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -472,7 +472,7 @@ exports.getSegmentAssertionsFromMatrix = getSegmentAssertionsFromMatrix;
|
|
|
472
472
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
473
473
|
Code coverage generated by
|
|
474
474
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
475
|
-
at 2024-04-
|
|
475
|
+
at 2024-04-30T18:09:02.430Z
|
|
476
476
|
</div>
|
|
477
477
|
<script src="../../prettify.js"></script>
|
|
478
478
|
<script>
|
|
@@ -193,7 +193,7 @@ export function getUpdatedAvailableRangesAfterFilling(
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at 2024-04-
|
|
196
|
+
at 2024-04-30T18:09:02.430Z
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2024-04-
|
|
134
|
+
at 2024-04-30T18:09:02.430Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
139
|
-
at 2024-04-
|
|
139
|
+
at 2024-04-30T18:09:02.430Z
|
|
140
140
|
</div>
|
|
141
141
|
<script src="../../prettify.js"></script>
|
|
142
142
|
<script>
|
|
@@ -565,7 +565,7 @@ export function getTraffic(
|
|
|
565
565
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
566
566
|
Code coverage generated by
|
|
567
567
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
568
|
-
at 2024-04-
|
|
568
|
+
at 2024-04-30T18:09:02.430Z
|
|
569
569
|
</div>
|
|
570
570
|
<script src="../../prettify.js"></script>
|
|
571
571
|
<script>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
143
143
|
Code coverage generated by
|
|
144
144
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
145
|
-
at 2024-04-
|
|
145
|
+
at 2024-04-30T18:09:02.430Z
|
|
146
146
|
</div>
|
|
147
147
|
<script src="../../prettify.js"></script>
|
|
148
148
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-04-
|
|
119
|
+
at 2024-04-30T18:09:02.430Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -625,7 +625,7 @@ export function <span class="fstat-no" title="function not covered" >getSegmentA
|
|
|
625
625
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
626
626
|
Code coverage generated by
|
|
627
627
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
628
|
-
at 2024-04-
|
|
628
|
+
at 2024-04-30T18:09:02.430Z
|
|
629
629
|
</div>
|
|
630
630
|
<script src="../../prettify.js"></script>
|
|
631
631
|
<script>
|
package/lib/evaluate/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LogLevel, LogMessage, LogDetails } from "@featurevisor/sdk";
|
|
1
2
|
import { Dependencies } from "../dependencies";
|
|
2
3
|
export interface EvaluateOptions {
|
|
3
4
|
environment: string;
|
|
@@ -5,5 +6,11 @@ export interface EvaluateOptions {
|
|
|
5
6
|
context: Record<string, unknown>;
|
|
6
7
|
print?: boolean;
|
|
7
8
|
pretty?: boolean;
|
|
9
|
+
verbose?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface Log {
|
|
12
|
+
level: LogLevel;
|
|
13
|
+
message: LogMessage;
|
|
14
|
+
details?: LogDetails;
|
|
8
15
|
}
|
|
9
16
|
export declare function evaluateFeature(deps: Dependencies, options: EvaluateOptions): Promise<void>;
|
package/lib/evaluate/index.js
CHANGED
|
@@ -35,6 +35,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
+
if (ar || !(i in from)) {
|
|
41
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
+
ar[i] = from[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
+
};
|
|
38
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
48
|
exports.evaluateFeature = void 0;
|
|
40
49
|
var sdk_1 = require("@featurevisor/sdk");
|
|
@@ -59,6 +68,12 @@ function printEvaluationDetails(evaluation) {
|
|
|
59
68
|
console.log("-", "".concat(key, ":"), value);
|
|
60
69
|
}
|
|
61
70
|
}
|
|
71
|
+
function printLogs(logs) {
|
|
72
|
+
logs.forEach(function (log) {
|
|
73
|
+
console.log("[".concat(log.level, "] ").concat(log.message), log.details);
|
|
74
|
+
console.log("");
|
|
75
|
+
});
|
|
76
|
+
}
|
|
62
77
|
function printHeader(message) {
|
|
63
78
|
console.log("\n\n###############");
|
|
64
79
|
console.log("# ".concat(message));
|
|
@@ -67,7 +82,7 @@ function printHeader(message) {
|
|
|
67
82
|
function evaluateFeature(deps, options) {
|
|
68
83
|
var _a;
|
|
69
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var datasource, projectConfig, existingState, datafileContent, logs, f, flagEvaluation, variationEvaluation, variableEvaluations, feature, allEvaluations, _i, _b, _c, key, value;
|
|
85
|
+
var datasource, projectConfig, existingState, datafileContent, logs, f, flagEvaluation, flagEvaluationLogs, variationEvaluation, variationEvaluationLogs, variableEvaluations, variableEvaluationLogs, feature, allEvaluations, _i, _b, _c, key, value;
|
|
71
86
|
return __generator(this, function (_d) {
|
|
72
87
|
switch (_d.label) {
|
|
73
88
|
case 0:
|
|
@@ -97,12 +112,19 @@ function evaluateFeature(deps, options) {
|
|
|
97
112
|
}),
|
|
98
113
|
});
|
|
99
114
|
flagEvaluation = f.evaluateFlag(options.feature, options.context);
|
|
115
|
+
flagEvaluationLogs = __spreadArray([], logs, true);
|
|
116
|
+
logs = [];
|
|
100
117
|
variationEvaluation = f.evaluateVariation(options.feature, options.context);
|
|
118
|
+
variationEvaluationLogs = __spreadArray([], logs, true);
|
|
119
|
+
logs = [];
|
|
101
120
|
variableEvaluations = {};
|
|
121
|
+
variableEvaluationLogs = {};
|
|
102
122
|
feature = f.getFeature(options.feature);
|
|
103
123
|
if (feature === null || feature === void 0 ? void 0 : feature.variablesSchema) {
|
|
104
124
|
feature.variablesSchema.forEach(function (v) {
|
|
105
125
|
var variableEvaluation = f.evaluateVariable(options.feature, v.key, options.context);
|
|
126
|
+
variableEvaluationLogs[v.key] = __spreadArray([], logs, true);
|
|
127
|
+
logs = [];
|
|
106
128
|
variableEvaluations[v.key] = variableEvaluation;
|
|
107
129
|
});
|
|
108
130
|
}
|
|
@@ -120,12 +142,18 @@ function evaluateFeature(deps, options) {
|
|
|
120
142
|
console.log("Against context: ".concat(JSON.stringify(options.context)));
|
|
121
143
|
// flag
|
|
122
144
|
printHeader("Is enabled?");
|
|
145
|
+
if (options.verbose) {
|
|
146
|
+
printLogs(flagEvaluationLogs);
|
|
147
|
+
}
|
|
123
148
|
console.log("Value:", flagEvaluation.enabled);
|
|
124
149
|
console.log("\nDetails:\n");
|
|
125
150
|
printEvaluationDetails(flagEvaluation);
|
|
126
151
|
// variation
|
|
127
152
|
printHeader("Variation");
|
|
128
153
|
if (feature === null || feature === void 0 ? void 0 : feature.variations) {
|
|
154
|
+
if (options.verbose) {
|
|
155
|
+
printLogs(variationEvaluationLogs);
|
|
156
|
+
}
|
|
129
157
|
console.log("Value:", JSON.stringify((_a = variationEvaluation.variation) === null || _a === void 0 ? void 0 : _a.value));
|
|
130
158
|
console.log("\nDetails:\n");
|
|
131
159
|
printEvaluationDetails(variationEvaluation);
|
|
@@ -138,6 +166,9 @@ function evaluateFeature(deps, options) {
|
|
|
138
166
|
for (_i = 0, _b = Object.entries(variableEvaluations); _i < _b.length; _i++) {
|
|
139
167
|
_c = _b[_i], key = _c[0], value = _c[1];
|
|
140
168
|
printHeader("Variable: ".concat(key));
|
|
169
|
+
if (options.verbose) {
|
|
170
|
+
printLogs(variableEvaluationLogs[key]);
|
|
171
|
+
}
|
|
141
172
|
console.log("Value:", typeof value.variableValue !== "undefined"
|
|
142
173
|
? JSON.stringify(value.variableValue)
|
|
143
174
|
: value.variableValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/evaluate/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/evaluate/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { SegmentKey } from "@featurevisor/types";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import { Dependencies } from "../dependencies";
|
|
3
|
+
export interface DuplicateSegmentsOptions {
|
|
4
|
+
authors?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface DuplicateSegmentsResult {
|
|
7
|
+
segments: SegmentKey[];
|
|
8
|
+
authors?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function findDuplicateSegments(deps: Dependencies, options?: DuplicateSegmentsOptions): Promise<DuplicateSegmentsResult[]>;
|
|
@@ -38,30 +38,33 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.findDuplicateSegments = void 0;
|
|
40
40
|
var crypto = require("crypto");
|
|
41
|
-
function findDuplicateSegments(
|
|
41
|
+
function findDuplicateSegments(deps, options) {
|
|
42
|
+
if (options === void 0) { options = {}; }
|
|
42
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var segments, segmentsWithHash, _i, segments_1, segmentKey, segment, conditions, hash, groupedSegments, result;
|
|
44
|
-
return __generator(this, function (
|
|
45
|
-
switch (
|
|
46
|
-
case 0:
|
|
44
|
+
var datasource, segments, segmentsWithHash, _i, segments_1, segmentKey, segment, conditions, hash, groupedSegments, duplicateSegments, result, _loop_1, _a, duplicateSegments_1, segmentKeys;
|
|
45
|
+
return __generator(this, function (_b) {
|
|
46
|
+
switch (_b.label) {
|
|
47
|
+
case 0:
|
|
48
|
+
datasource = deps.datasource;
|
|
49
|
+
return [4 /*yield*/, datasource.listSegments()];
|
|
47
50
|
case 1:
|
|
48
|
-
segments =
|
|
51
|
+
segments = _b.sent();
|
|
49
52
|
segmentsWithHash = [];
|
|
50
53
|
_i = 0, segments_1 = segments;
|
|
51
|
-
|
|
54
|
+
_b.label = 2;
|
|
52
55
|
case 2:
|
|
53
56
|
if (!(_i < segments_1.length)) return [3 /*break*/, 5];
|
|
54
57
|
segmentKey = segments_1[_i];
|
|
55
58
|
return [4 /*yield*/, datasource.readSegment(segmentKey)];
|
|
56
59
|
case 3:
|
|
57
|
-
segment =
|
|
60
|
+
segment = _b.sent();
|
|
58
61
|
conditions = JSON.stringify(segment.conditions);
|
|
59
62
|
hash = crypto.createHash("sha256").update(conditions).digest("hex");
|
|
60
63
|
segmentsWithHash.push({
|
|
61
64
|
segmentKey: segmentKey,
|
|
62
65
|
hash: hash,
|
|
63
66
|
});
|
|
64
|
-
|
|
67
|
+
_b.label = 4;
|
|
65
68
|
case 4:
|
|
66
69
|
_i++;
|
|
67
70
|
return [3 /*break*/, 2];
|
|
@@ -74,8 +77,56 @@ function findDuplicateSegments(datasource) {
|
|
|
74
77
|
acc[hash].push(segmentKey);
|
|
75
78
|
return acc;
|
|
76
79
|
}, {});
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
duplicateSegments = Object.values(groupedSegments).filter(function (segmentKeys) { return segmentKeys.length > 1; });
|
|
81
|
+
result = [];
|
|
82
|
+
_loop_1 = function (segmentKeys) {
|
|
83
|
+
var entry, historyEntries_1, _c, segmentKeys_1, segmentKey, entries, authors;
|
|
84
|
+
return __generator(this, function (_d) {
|
|
85
|
+
switch (_d.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
entry = {
|
|
88
|
+
segments: segmentKeys,
|
|
89
|
+
};
|
|
90
|
+
if (!options.authors) return [3 /*break*/, 5];
|
|
91
|
+
historyEntries_1 = [];
|
|
92
|
+
_c = 0, segmentKeys_1 = segmentKeys;
|
|
93
|
+
_d.label = 1;
|
|
94
|
+
case 1:
|
|
95
|
+
if (!(_c < segmentKeys_1.length)) return [3 /*break*/, 4];
|
|
96
|
+
segmentKey = segmentKeys_1[_c];
|
|
97
|
+
return [4 /*yield*/, datasource.listHistoryEntries("segment", segmentKey)];
|
|
98
|
+
case 2:
|
|
99
|
+
entries = _d.sent();
|
|
100
|
+
entries.forEach(function (entry) {
|
|
101
|
+
historyEntries_1.push(entry);
|
|
102
|
+
});
|
|
103
|
+
_d.label = 3;
|
|
104
|
+
case 3:
|
|
105
|
+
_c++;
|
|
106
|
+
return [3 /*break*/, 1];
|
|
107
|
+
case 4:
|
|
108
|
+
authors = Array.from(new Set(historyEntries_1.map(function (entry) { return entry.author; })));
|
|
109
|
+
entry.authors = authors;
|
|
110
|
+
_d.label = 5;
|
|
111
|
+
case 5:
|
|
112
|
+
result.push(entry);
|
|
113
|
+
return [2 /*return*/];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
_a = 0, duplicateSegments_1 = duplicateSegments;
|
|
118
|
+
_b.label = 6;
|
|
119
|
+
case 6:
|
|
120
|
+
if (!(_a < duplicateSegments_1.length)) return [3 /*break*/, 9];
|
|
121
|
+
segmentKeys = duplicateSegments_1[_a];
|
|
122
|
+
return [5 /*yield**/, _loop_1(segmentKeys)];
|
|
123
|
+
case 7:
|
|
124
|
+
_b.sent();
|
|
125
|
+
_b.label = 8;
|
|
126
|
+
case 8:
|
|
127
|
+
_a++;
|
|
128
|
+
return [3 /*break*/, 6];
|
|
129
|
+
case 9: return [2 /*return*/, result];
|
|
79
130
|
}
|
|
80
131
|
});
|
|
81
132
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findDuplicateSegments.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/findDuplicateSegments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;
|
|
1
|
+
{"version":3,"file":"findDuplicateSegments.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/findDuplicateSegments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAejC,SAAsB,qBAAqB,CACzC,IAAkB,EAClB,OAAsC;IAAtC,wBAAA,EAAA,YAAsC;;;;;;oBAE9B,UAAU,GAAK,IAAI,WAAT,CAAU;oBAEX,qBAAM,UAAU,CAAC,YAAY,EAAE,EAAA;;oBAA1C,QAAQ,GAAG,SAA+B;oBAE1C,gBAAgB,GAA+C,EAAE,CAAC;0BACvC,EAAR,qBAAQ;;;yBAAR,CAAA,sBAAQ,CAAA;oBAAtB,UAAU;oBACH,qBAAM,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,EAAA;;oBAAlD,OAAO,GAAG,SAAwC;oBAClD,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;oBAChD,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAE1E,gBAAgB,CAAC,IAAI,CAAC;wBACpB,UAAU,YAAA;wBACV,IAAI,MAAA;qBACL,CAAC,CAAC;;;oBARoB,IAAQ,CAAA;;;oBAW3B,eAAe,GAAqC,gBAAgB,CAAC,MAAM,CAC/E,UAAC,GAAG,EAAE,EAAoB;4BAAlB,UAAU,gBAAA,EAAE,IAAI,UAAA;wBACtB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;4BACd,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;yBAChB;wBACD,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;wBAC3B,OAAO,GAAG,CAAC;oBACb,CAAC,EACD,EAAE,CACH,CAAC;oBAEI,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,MAAM,CAC7D,UAAC,WAAW,IAAK,OAAA,WAAW,CAAC,MAAM,GAAG,CAAC,EAAtB,CAAsB,CACxC,CAAC;oBACI,MAAM,GAA8B,EAAE,CAAC;wCAElC,WAAW;;;;;oCACd,KAAK,GAA4B;wCACrC,QAAQ,EAAE,WAAW;qCACtB,CAAC;yCAEE,OAAO,CAAC,OAAO,EAAf,wBAAe;oCACX,mBAAiC,EAAE,CAAC;0CAEN,EAAX,2BAAW;;;yCAAX,CAAA,yBAAW,CAAA;oCAAzB,UAAU;oCACH,qBAAM,UAAU,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,EAAA;;oCAApE,OAAO,GAAG,SAA0D;oCAE1E,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK;wCACpB,gBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oCAC7B,CAAC,CAAC,CAAC;;;oCALoB,IAAW,CAAA;;;oCAQ9B,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,gBAAc,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,MAAM,EAAZ,CAAY,CAAC,CAAC,CAAC,CAAC;oCACjF,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;;;oCAG1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;;0BApBsB,EAAjB,uCAAiB;;;yBAAjB,CAAA,+BAAiB,CAAA;oBAAhC,WAAW;kDAAX,WAAW;;;;;oBAAI,IAAiB,CAAA;;wBAuB3C,sBAAO,MAAM,EAAC;;;;CACf;AA5DD,sDA4DC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { DuplicateSegmentsOptions } from "./findDuplicateSegments";
|
|
1
2
|
import { Dependencies } from "../dependencies";
|
|
2
|
-
export declare function findDuplicateSegmentsInProject(deps: Dependencies): Promise<void>;
|
|
3
|
+
export declare function findDuplicateSegmentsInProject(deps: Dependencies, options?: DuplicateSegmentsOptions): Promise<void>;
|
|
@@ -38,23 +38,30 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.findDuplicateSegmentsInProject = void 0;
|
|
40
40
|
var findDuplicateSegments_1 = require("./findDuplicateSegments");
|
|
41
|
-
function findDuplicateSegmentsInProject(deps) {
|
|
41
|
+
function findDuplicateSegmentsInProject(deps, options) {
|
|
42
|
+
if (options === void 0) { options = {}; }
|
|
42
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var
|
|
44
|
+
var duplicates;
|
|
44
45
|
return __generator(this, function (_a) {
|
|
45
46
|
switch (_a.label) {
|
|
46
|
-
case 0:
|
|
47
|
-
datasource = deps.datasource;
|
|
48
|
-
return [4 /*yield*/, (0, findDuplicateSegments_1.findDuplicateSegments)(datasource)];
|
|
47
|
+
case 0: return [4 /*yield*/, (0, findDuplicateSegments_1.findDuplicateSegments)(deps, options)];
|
|
49
48
|
case 1:
|
|
50
49
|
duplicates = _a.sent();
|
|
50
|
+
console.log("");
|
|
51
51
|
if (duplicates.length === 0) {
|
|
52
52
|
console.log("No duplicate segments found");
|
|
53
53
|
return [2 /*return*/];
|
|
54
54
|
}
|
|
55
|
-
console.log("Found ".concat(duplicates.length, "
|
|
56
|
-
duplicates.forEach(function (
|
|
57
|
-
|
|
55
|
+
console.log("Found ".concat(duplicates.length, " duplicate(s):\n"));
|
|
56
|
+
duplicates.forEach(function (entry) {
|
|
57
|
+
if (options.authors) {
|
|
58
|
+
console.log(" - Segments: ".concat(entry.segments.join(", ")));
|
|
59
|
+
console.log(" Authors: ".concat(entry.authors && entry.authors.join(", ")));
|
|
60
|
+
console.log("");
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
console.log(" - ".concat(entry.segments.join(", ")));
|
|
64
|
+
}
|
|
58
65
|
});
|
|
59
66
|
return [2 /*return*/];
|
|
60
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAA0F;AAG1F,SAAsB,8BAA8B,CAClD,IAAkB,EAClB,OAAsC;IAAtC,wBAAA,EAAA,YAAsC;;;;;wBAEnB,qBAAM,IAAA,6CAAqB,EAAC,IAAI,EAAE,OAAO,CAAC,EAAA;;oBAAvD,UAAU,GAAG,SAA0C;oBAE7D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAEhB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC3B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;wBAC3C,sBAAO;qBACR;oBAED,OAAO,CAAC,GAAG,CAAC,gBAAS,UAAU,CAAC,MAAM,qBAAkB,CAAC,CAAC;oBAE1D,UAAU,CAAC,OAAO,CAAC,UAAC,KAAK;wBACvB,IAAI,OAAO,CAAC,OAAO,EAAE;4BACnB,OAAO,CAAC,GAAG,CAAC,wBAAiB,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC;4BAC1D,OAAO,CAAC,GAAG,CAAC,wBAAiB,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC;4BAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;yBACjB;6BAAM;4BACL,OAAO,CAAC,GAAG,CAAC,cAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC;yBACjD;oBACH,CAAC,CAAC,CAAC;;;;;CACJ;AAxBD,wEAwBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "Core package of Featurevisor for Node.js usage",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@featurevisor/sdk": "^1.
|
|
47
|
+
"@featurevisor/sdk": "^1.20.0",
|
|
48
48
|
"@featurevisor/site": "^1.18.1",
|
|
49
49
|
"@featurevisor/types": "^1.3.0",
|
|
50
50
|
"axios": "^1.3.4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"@types/js-yaml": "^4.0.5",
|
|
58
58
|
"@types/tar": "^6.1.4"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "2a66f338222849d2a40c31424d79e080e02f4e97"
|
|
61
61
|
}
|
package/src/evaluate/index.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Context } from "@featurevisor/types";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Evaluation,
|
|
4
|
+
createInstance,
|
|
5
|
+
createLogger,
|
|
6
|
+
LogLevel,
|
|
7
|
+
LogMessage,
|
|
8
|
+
LogDetails,
|
|
9
|
+
} from "@featurevisor/sdk";
|
|
3
10
|
|
|
4
11
|
import { Dependencies } from "../dependencies";
|
|
5
12
|
import { SCHEMA_VERSION } from "../config";
|
|
@@ -28,6 +35,13 @@ function printEvaluationDetails(evaluation: Evaluation) {
|
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
37
|
|
|
38
|
+
function printLogs(logs: Log[]) {
|
|
39
|
+
logs.forEach((log) => {
|
|
40
|
+
console.log(`[${log.level}] ${log.message}`, log.details);
|
|
41
|
+
console.log("");
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
function printHeader(message: string) {
|
|
32
46
|
console.log("\n\n###############");
|
|
33
47
|
console.log(`# ${message}`);
|
|
@@ -40,6 +54,13 @@ export interface EvaluateOptions {
|
|
|
40
54
|
context: Record<string, unknown>;
|
|
41
55
|
print?: boolean;
|
|
42
56
|
pretty?: boolean;
|
|
57
|
+
verbose?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Log {
|
|
61
|
+
level: LogLevel;
|
|
62
|
+
message: LogMessage;
|
|
63
|
+
details?: LogDetails;
|
|
43
64
|
}
|
|
44
65
|
|
|
45
66
|
export async function evaluateFeature(deps: Dependencies, options: EvaluateOptions) {
|
|
@@ -57,7 +78,7 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
57
78
|
existingState,
|
|
58
79
|
);
|
|
59
80
|
|
|
60
|
-
|
|
81
|
+
let logs: Log[] = [];
|
|
61
82
|
const f = createInstance({
|
|
62
83
|
datafile: datafileContent,
|
|
63
84
|
logger: createLogger({
|
|
@@ -73,8 +94,15 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
73
94
|
});
|
|
74
95
|
|
|
75
96
|
const flagEvaluation = f.evaluateFlag(options.feature, options.context as Context);
|
|
97
|
+
const flagEvaluationLogs = [...logs];
|
|
98
|
+
logs = [];
|
|
99
|
+
|
|
76
100
|
const variationEvaluation = f.evaluateVariation(options.feature, options.context as Context);
|
|
101
|
+
const variationEvaluationLogs = [...logs];
|
|
102
|
+
logs = [];
|
|
103
|
+
|
|
77
104
|
const variableEvaluations: Record<string, Evaluation> = {};
|
|
105
|
+
const variableEvaluationLogs: Record<string, Log[]> = {};
|
|
78
106
|
|
|
79
107
|
const feature = f.getFeature(options.feature);
|
|
80
108
|
if (feature?.variablesSchema) {
|
|
@@ -84,6 +112,10 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
84
112
|
v.key,
|
|
85
113
|
options.context as Context,
|
|
86
114
|
);
|
|
115
|
+
|
|
116
|
+
variableEvaluationLogs[v.key] = [...logs];
|
|
117
|
+
logs = [];
|
|
118
|
+
|
|
87
119
|
variableEvaluations[v.key] = variableEvaluation;
|
|
88
120
|
});
|
|
89
121
|
}
|
|
@@ -109,6 +141,10 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
109
141
|
// flag
|
|
110
142
|
printHeader("Is enabled?");
|
|
111
143
|
|
|
144
|
+
if (options.verbose) {
|
|
145
|
+
printLogs(flagEvaluationLogs);
|
|
146
|
+
}
|
|
147
|
+
|
|
112
148
|
console.log("Value:", flagEvaluation.enabled);
|
|
113
149
|
console.log("\nDetails:\n");
|
|
114
150
|
|
|
@@ -118,6 +154,10 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
118
154
|
printHeader("Variation");
|
|
119
155
|
|
|
120
156
|
if (feature?.variations) {
|
|
157
|
+
if (options.verbose) {
|
|
158
|
+
printLogs(variationEvaluationLogs);
|
|
159
|
+
}
|
|
160
|
+
|
|
121
161
|
console.log("Value:", JSON.stringify(variationEvaluation.variation?.value));
|
|
122
162
|
console.log("\nDetails:\n");
|
|
123
163
|
|
|
@@ -131,6 +171,10 @@ export async function evaluateFeature(deps: Dependencies, options: EvaluateOptio
|
|
|
131
171
|
for (const [key, value] of Object.entries(variableEvaluations)) {
|
|
132
172
|
printHeader(`Variable: ${key}`);
|
|
133
173
|
|
|
174
|
+
if (options.verbose) {
|
|
175
|
+
printLogs(variableEvaluationLogs[key]);
|
|
176
|
+
}
|
|
177
|
+
|
|
134
178
|
console.log(
|
|
135
179
|
"Value:",
|
|
136
180
|
typeof value.variableValue !== "undefined"
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import * as crypto from "crypto";
|
|
2
2
|
|
|
3
|
-
import { SegmentKey } from "@featurevisor/types";
|
|
3
|
+
import { HistoryEntry, SegmentKey } from "@featurevisor/types";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Dependencies } from "../dependencies";
|
|
6
|
+
|
|
7
|
+
export interface DuplicateSegmentsOptions {
|
|
8
|
+
authors?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface DuplicateSegmentsResult {
|
|
12
|
+
segments: SegmentKey[];
|
|
13
|
+
authors?: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function findDuplicateSegments(
|
|
17
|
+
deps: Dependencies,
|
|
18
|
+
options: DuplicateSegmentsOptions = {},
|
|
19
|
+
): Promise<DuplicateSegmentsResult[]> {
|
|
20
|
+
const { datasource } = deps;
|
|
6
21
|
|
|
7
|
-
export async function findDuplicateSegments(datasource: Datasource): Promise<SegmentKey[][]> {
|
|
8
22
|
const segments = await datasource.listSegments();
|
|
9
23
|
|
|
10
24
|
const segmentsWithHash: { segmentKey: SegmentKey; hash: string }[] = [];
|
|
@@ -30,7 +44,33 @@ export async function findDuplicateSegments(datasource: Datasource): Promise<Seg
|
|
|
30
44
|
{},
|
|
31
45
|
);
|
|
32
46
|
|
|
33
|
-
const
|
|
47
|
+
const duplicateSegments = Object.values(groupedSegments).filter(
|
|
48
|
+
(segmentKeys) => segmentKeys.length > 1,
|
|
49
|
+
);
|
|
50
|
+
const result: DuplicateSegmentsResult[] = [];
|
|
51
|
+
|
|
52
|
+
for (const segmentKeys of duplicateSegments) {
|
|
53
|
+
const entry: DuplicateSegmentsResult = {
|
|
54
|
+
segments: segmentKeys,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if (options.authors) {
|
|
58
|
+
const historyEntries: HistoryEntry[] = [];
|
|
59
|
+
|
|
60
|
+
for (const segmentKey of segmentKeys) {
|
|
61
|
+
const entries = await datasource.listHistoryEntries("segment", segmentKey);
|
|
62
|
+
|
|
63
|
+
entries.forEach((entry) => {
|
|
64
|
+
historyEntries.push(entry);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const authors = Array.from(new Set(historyEntries.map((entry) => entry.author)));
|
|
69
|
+
entry.authors = authors;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
result.push(entry);
|
|
73
|
+
}
|
|
34
74
|
|
|
35
75
|
return result;
|
|
36
76
|
}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { findDuplicateSegments } from "./findDuplicateSegments";
|
|
1
|
+
import { findDuplicateSegments, DuplicateSegmentsOptions } from "./findDuplicateSegments";
|
|
2
2
|
import { Dependencies } from "../dependencies";
|
|
3
3
|
|
|
4
|
-
export async function findDuplicateSegmentsInProject(
|
|
5
|
-
|
|
4
|
+
export async function findDuplicateSegmentsInProject(
|
|
5
|
+
deps: Dependencies,
|
|
6
|
+
options: DuplicateSegmentsOptions = {},
|
|
7
|
+
) {
|
|
8
|
+
const duplicates = await findDuplicateSegments(deps, options);
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
console.log("");
|
|
8
11
|
|
|
9
12
|
if (duplicates.length === 0) {
|
|
10
13
|
console.log("No duplicate segments found");
|
|
11
14
|
return;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
console.log(`Found ${duplicates.length}
|
|
17
|
+
console.log(`Found ${duplicates.length} duplicate(s):\n`);
|
|
15
18
|
|
|
16
|
-
duplicates.forEach((
|
|
17
|
-
|
|
19
|
+
duplicates.forEach((entry) => {
|
|
20
|
+
if (options.authors) {
|
|
21
|
+
console.log(` - Segments: ${entry.segments.join(", ")}`);
|
|
22
|
+
console.log(` Authors: ${entry.authors && entry.authors.join(", ")}`);
|
|
23
|
+
console.log("");
|
|
24
|
+
} else {
|
|
25
|
+
console.log(` - ${entry.segments.join(", ")}`);
|
|
26
|
+
}
|
|
18
27
|
});
|
|
19
28
|
}
|