@featurevisor/core 1.13.1 → 1.15.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.
Files changed (31) hide show
  1. package/.eslintcache +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/coverage/clover.xml +2 -2
  4. package/coverage/lcov-report/index.html +1 -1
  5. package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
  6. package/coverage/lcov-report/lib/builder/index.html +1 -1
  7. package/coverage/lcov-report/lib/builder/revision.js.html +1 -1
  8. package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
  9. package/coverage/lcov-report/lib/tester/checkIfObjectsAreEqual.js.html +1 -1
  10. package/coverage/lcov-report/lib/tester/index.html +1 -1
  11. package/coverage/lcov-report/lib/tester/matrix.js.html +1 -1
  12. package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
  13. package/coverage/lcov-report/src/builder/index.html +1 -1
  14. package/coverage/lcov-report/src/builder/revision.ts.html +1 -1
  15. package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
  16. package/coverage/lcov-report/src/tester/checkIfObjectsAreEqual.ts.html +1 -1
  17. package/coverage/lcov-report/src/tester/index.html +1 -1
  18. package/coverage/lcov-report/src/tester/matrix.ts.html +1 -1
  19. package/lib/benchmark/index.d.ts +18 -0
  20. package/lib/benchmark/index.js +139 -0
  21. package/lib/benchmark/index.js.map +1 -0
  22. package/lib/config/projectConfig.d.ts +5 -0
  23. package/lib/config/projectConfig.js +28 -9
  24. package/lib/config/projectConfig.js.map +1 -1
  25. package/lib/index.d.ts +1 -0
  26. package/lib/index.js +1 -0
  27. package/lib/index.js.map +1 -1
  28. package/package.json +2 -2
  29. package/src/benchmark/index.ts +150 -0
  30. package/src/config/projectConfig.ts +41 -11
  31. package/src/index.ts +1 -0
package/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"58","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"59","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"60","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"61"},{"size":3214,"mtime":1711561830018,"results":"62","hashOfConfig":"63"},{"size":1014,"mtime":1711561830018,"results":"64","hashOfConfig":"63"},{"size":10477,"mtime":1711561830018,"results":"65","hashOfConfig":"63"},{"size":2673,"mtime":1711561830018,"results":"66","hashOfConfig":"63"},{"size":1755,"mtime":1711561830018,"results":"67","hashOfConfig":"63"},{"size":65,"mtime":1711561830018,"results":"68","hashOfConfig":"63"},{"size":688,"mtime":1711561830018,"results":"69","hashOfConfig":"63"},{"size":760,"mtime":1711561830018,"results":"70","hashOfConfig":"63"},{"size":12889,"mtime":1711561830018,"results":"71","hashOfConfig":"63"},{"size":4894,"mtime":1711561830018,"results":"72","hashOfConfig":"63"},{"size":60,"mtime":1711561830018,"results":"73","hashOfConfig":"63"},{"size":1035,"mtime":1711561830018,"results":"74","hashOfConfig":"63"},{"size":3555,"mtime":1711561830018,"results":"75","hashOfConfig":"63"},{"size":1423,"mtime":1711561830018,"results":"76","hashOfConfig":"63"},{"size":5208,"mtime":1711561830018,"results":"77","hashOfConfig":"63"},{"size":10198,"mtime":1711561830018,"results":"78","hashOfConfig":"63"},{"size":94,"mtime":1711561830018,"results":"79","hashOfConfig":"63"},{"size":279,"mtime":1711561830018,"results":"80","hashOfConfig":"63"},{"size":1033,"mtime":1711561830018,"results":"81","hashOfConfig":"63"},{"size":540,"mtime":1711561830018,"results":"82","hashOfConfig":"63"},{"size":9681,"mtime":1711561830018,"results":"83","hashOfConfig":"63"},{"size":1476,"mtime":1711561830018,"results":"84","hashOfConfig":"63"},{"size":6250,"mtime":1711561830018,"results":"85","hashOfConfig":"63"},{"size":348,"mtime":1711561830018,"results":"86","hashOfConfig":"63"},{"size":1308,"mtime":1711561830018,"results":"87","hashOfConfig":"63"},{"size":359,"mtime":1711561830018,"results":"88","hashOfConfig":"63"},{"size":1119,"mtime":1711561830018,"results":"89","hashOfConfig":"63"},{"size":1464,"mtime":1711561830022,"results":"90","hashOfConfig":"63"},{"size":4007,"mtime":1711561830022,"results":"91","hashOfConfig":"63"},{"size":7758,"mtime":1711561830022,"results":"92","hashOfConfig":"63"},{"size":1221,"mtime":1711561830022,"results":"93","hashOfConfig":"63"},{"size":31,"mtime":1711561830022,"results":"94","hashOfConfig":"63"},{"size":9986,"mtime":1711561830022,"results":"95","hashOfConfig":"63"},{"size":982,"mtime":1711561830022,"results":"96","hashOfConfig":"63"},{"size":364,"mtime":1711561830022,"results":"97","hashOfConfig":"63"},{"size":2432,"mtime":1711561830022,"results":"98","hashOfConfig":"63"},{"size":641,"mtime":1711561830022,"results":"99","hashOfConfig":"63"},{"size":1481,"mtime":1711561830022,"results":"100","hashOfConfig":"63"},{"size":1178,"mtime":1711561830022,"results":"101","hashOfConfig":"63"},{"size":6187,"mtime":1711561830022,"results":"102","hashOfConfig":"63"},{"size":516,"mtime":1711561830022,"results":"103","hashOfConfig":"63"},{"size":496,"mtime":1711561830022,"results":"104","hashOfConfig":"63"},{"size":607,"mtime":1711561830022,"results":"105","hashOfConfig":"63"},{"size":1560,"mtime":1711561830022,"results":"106","hashOfConfig":"63"},{"size":59,"mtime":1711561830022,"results":"107","hashOfConfig":"63"},{"size":1681,"mtime":1711561830022,"results":"108","hashOfConfig":"63"},{"size":298,"mtime":1711561830022,"results":"109","hashOfConfig":"63"},{"size":932,"mtime":1711561830022,"results":"110","hashOfConfig":"63"},{"size":468,"mtime":1711561830022,"results":"111","hashOfConfig":"63"},{"size":212,"mtime":1711561830022,"results":"112","hashOfConfig":"63"},{"size":62,"mtime":1711561830022,"results":"113","hashOfConfig":"63"},{"size":1188,"mtime":1711561830022,"results":"114","hashOfConfig":"63"},{"size":5021,"mtime":1711561830022,"results":"115","hashOfConfig":"63"},{"size":516,"mtime":1711561830022,"results":"116","hashOfConfig":"63"},{"size":1691,"mtime":1711561830022,"results":"117","hashOfConfig":"63"},{"size":6968,"mtime":1711561830022,"results":"118","hashOfConfig":"63"},{"size":5702,"mtime":1711561830022,"results":"119","hashOfConfig":"63"},{"size":2328,"mtime":1711561830022,"results":"120","hashOfConfig":"63"},{"size":1993,"mtime":1711561830022,"results":"121","hashOfConfig":"63"},{"size":3641,"mtime":1711561830022,"results":"122","hashOfConfig":"63"},{"size":54,"mtime":1711561830022,"results":"123","hashOfConfig":"63"},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2syfed",{"filePath":"127","messages":"128","suppressedMessages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","suppressedMessages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","suppressedMessages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","suppressedMessages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","suppressedMessages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","suppressedMessages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","suppressedMessages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","suppressedMessages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","suppressedMessages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","suppressedMessages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","suppressedMessages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","suppressedMessages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","suppressedMessages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","suppressedMessages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","suppressedMessages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","suppressedMessages":"174","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","suppressedMessages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","suppressedMessages":"180","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","suppressedMessages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","suppressedMessages":"186","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","suppressedMessages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","suppressedMessages":"192","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","suppressedMessages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","suppressedMessages":"198","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"199","messages":"200","suppressedMessages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","suppressedMessages":"204","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"205","messages":"206","suppressedMessages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","suppressedMessages":"210","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"211","messages":"212","suppressedMessages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","suppressedMessages":"216","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","suppressedMessages":"219","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","suppressedMessages":"222","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"223","messages":"224","suppressedMessages":"225","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"226","messages":"227","suppressedMessages":"228","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"229","messages":"230","suppressedMessages":"231","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"232","messages":"233","suppressedMessages":"234","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"235","messages":"236","suppressedMessages":"237","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","suppressedMessages":"240","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"241","messages":"242","suppressedMessages":"243","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"244","messages":"245","suppressedMessages":"246","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"247","messages":"248","suppressedMessages":"249","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","suppressedMessages":"252","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"253","messages":"254","suppressedMessages":"255","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"256","messages":"257","suppressedMessages":"258","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"259","messages":"260","suppressedMessages":"261","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","suppressedMessages":"264","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"265","messages":"266","suppressedMessages":"267","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","suppressedMessages":"270","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"271","messages":"272","suppressedMessages":"273","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","suppressedMessages":"276","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"277","messages":"278","suppressedMessages":"279","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","suppressedMessages":"282","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"283","messages":"284","suppressedMessages":"285","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","suppressedMessages":"288","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"289","messages":"290","suppressedMessages":"291","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"292","messages":"293","suppressedMessages":"294","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"295","messages":"296","suppressedMessages":"297","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"298","messages":"299","suppressedMessages":"300","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"301","messages":"302","suppressedMessages":"303","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"304","messages":"305","suppressedMessages":"306","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/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",[],["307","308"],"/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/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",[],["309"],"/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",[],[],{"ruleId":"310","severity":2,"message":"311","line":22,"column":7,"nodeType":"312","messageId":"313","endLine":22,"endColumn":18,"suppressions":"314"},{"ruleId":"315","severity":2,"message":"316","line":22,"column":21,"nodeType":"317","messageId":"318","endLine":22,"endColumn":81,"fix":"319","suppressions":"320"},{"ruleId":"310","severity":2,"message":"321","line":51,"column":10,"nodeType":"312","messageId":"313","endLine":51,"endColumn":38,"suppressions":"322"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["323"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"324","text":"325"},["326"],"'getFeaturevisorTypeFromValue' is defined but never used.",["327"],{"kind":"328","justification":"329"},[515,518]," {3}",{"kind":"328","justification":"329"},{"kind":"328","justification":"329"},"directive",""]
1
+ [{"/home/runner/work/featurevisor/featurevisor/packages/core/src/benchmark/index.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.spec.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/revision.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-usage/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"58","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"59","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"60","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"61","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"62"},{"size":3741,"mtime":1712248292373,"results":"63","hashOfConfig":"64"},{"size":3214,"mtime":1712248292373,"results":"65","hashOfConfig":"64"},{"size":1014,"mtime":1712248292373,"results":"66","hashOfConfig":"64"},{"size":10477,"mtime":1712248292373,"results":"67","hashOfConfig":"64"},{"size":2673,"mtime":1712248292373,"results":"68","hashOfConfig":"64"},{"size":1755,"mtime":1712248292373,"results":"69","hashOfConfig":"64"},{"size":65,"mtime":1712248292373,"results":"70","hashOfConfig":"64"},{"size":688,"mtime":1712248292373,"results":"71","hashOfConfig":"64"},{"size":760,"mtime":1712248292373,"results":"72","hashOfConfig":"64"},{"size":12889,"mtime":1712248292373,"results":"73","hashOfConfig":"64"},{"size":4894,"mtime":1712248292373,"results":"74","hashOfConfig":"64"},{"size":60,"mtime":1712248292373,"results":"75","hashOfConfig":"64"},{"size":1035,"mtime":1712248292373,"results":"76","hashOfConfig":"64"},{"size":4326,"mtime":1712248292373,"results":"77","hashOfConfig":"64"},{"size":1423,"mtime":1712248292373,"results":"78","hashOfConfig":"64"},{"size":5208,"mtime":1712248292373,"results":"79","hashOfConfig":"64"},{"size":10198,"mtime":1712248292373,"results":"80","hashOfConfig":"64"},{"size":94,"mtime":1712248292373,"results":"81","hashOfConfig":"64"},{"size":279,"mtime":1712248292373,"results":"82","hashOfConfig":"64"},{"size":1033,"mtime":1712248292373,"results":"83","hashOfConfig":"64"},{"size":540,"mtime":1712248292373,"results":"84","hashOfConfig":"64"},{"size":9681,"mtime":1712248292373,"results":"85","hashOfConfig":"64"},{"size":1476,"mtime":1712248292373,"results":"86","hashOfConfig":"64"},{"size":6250,"mtime":1712248292373,"results":"87","hashOfConfig":"64"},{"size":377,"mtime":1712248292373,"results":"88","hashOfConfig":"64"},{"size":1308,"mtime":1712248292373,"results":"89","hashOfConfig":"64"},{"size":359,"mtime":1712248292373,"results":"90","hashOfConfig":"64"},{"size":1119,"mtime":1712248292373,"results":"91","hashOfConfig":"64"},{"size":1464,"mtime":1712248292373,"results":"92","hashOfConfig":"64"},{"size":4007,"mtime":1712248292373,"results":"93","hashOfConfig":"64"},{"size":7758,"mtime":1712248292373,"results":"94","hashOfConfig":"64"},{"size":1221,"mtime":1712248292373,"results":"95","hashOfConfig":"64"},{"size":31,"mtime":1712248292373,"results":"96","hashOfConfig":"64"},{"size":9986,"mtime":1712248292373,"results":"97","hashOfConfig":"64"},{"size":982,"mtime":1712248292373,"results":"98","hashOfConfig":"64"},{"size":364,"mtime":1712248292373,"results":"99","hashOfConfig":"64"},{"size":2432,"mtime":1712248292373,"results":"100","hashOfConfig":"64"},{"size":641,"mtime":1712248292373,"results":"101","hashOfConfig":"64"},{"size":1481,"mtime":1712248292373,"results":"102","hashOfConfig":"64"},{"size":1178,"mtime":1712248292373,"results":"103","hashOfConfig":"64"},{"size":6187,"mtime":1712248292373,"results":"104","hashOfConfig":"64"},{"size":516,"mtime":1712248292373,"results":"105","hashOfConfig":"64"},{"size":496,"mtime":1712248292373,"results":"106","hashOfConfig":"64"},{"size":607,"mtime":1712248292373,"results":"107","hashOfConfig":"64"},{"size":1560,"mtime":1712248292373,"results":"108","hashOfConfig":"64"},{"size":59,"mtime":1712248292373,"results":"109","hashOfConfig":"64"},{"size":1681,"mtime":1712248292373,"results":"110","hashOfConfig":"64"},{"size":298,"mtime":1712248292373,"results":"111","hashOfConfig":"64"},{"size":932,"mtime":1712248292373,"results":"112","hashOfConfig":"64"},{"size":468,"mtime":1712248292373,"results":"113","hashOfConfig":"64"},{"size":212,"mtime":1712248292373,"results":"114","hashOfConfig":"64"},{"size":62,"mtime":1712248292373,"results":"115","hashOfConfig":"64"},{"size":1188,"mtime":1712248292373,"results":"116","hashOfConfig":"64"},{"size":5021,"mtime":1712248292377,"results":"117","hashOfConfig":"64"},{"size":516,"mtime":1712248292377,"results":"118","hashOfConfig":"64"},{"size":1691,"mtime":1712248292377,"results":"119","hashOfConfig":"64"},{"size":6968,"mtime":1712248292377,"results":"120","hashOfConfig":"64"},{"size":5702,"mtime":1712248292377,"results":"121","hashOfConfig":"64"},{"size":2328,"mtime":1712248292377,"results":"122","hashOfConfig":"64"},{"size":1993,"mtime":1712248292377,"results":"123","hashOfConfig":"64"},{"size":3641,"mtime":1712248292377,"results":"124","hashOfConfig":"64"},{"size":54,"mtime":1712248292377,"results":"125","hashOfConfig":"64"},{"filePath":"126","messages":"127","suppressedMessages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2syfed",{"filePath":"129","messages":"130","suppressedMessages":"131","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","suppressedMessages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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",[],["312","313"],"/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/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",[],["314"],"/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",[],[],{"ruleId":"315","severity":2,"message":"316","line":22,"column":7,"nodeType":"317","messageId":"318","endLine":22,"endColumn":18,"suppressions":"319"},{"ruleId":"320","severity":2,"message":"321","line":22,"column":21,"nodeType":"322","messageId":"323","endLine":22,"endColumn":81,"fix":"324","suppressions":"325"},{"ruleId":"315","severity":2,"message":"326","line":51,"column":10,"nodeType":"317","messageId":"318","endLine":51,"endColumn":38,"suppressions":"327"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["328"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"329","text":"330"},["331"],"'getFeaturevisorTypeFromValue' is defined but never used.",["332"],{"kind":"333","justification":"334"},[515,518]," {3}",{"kind":"333","justification":"334"},{"kind":"333","justification":"334"},"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.15.0](https://github.com/featurevisor/featurevisor/compare/v1.14.0...v1.15.0) (2024-04-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * show project configuration via CLI ([#293](https://github.com/featurevisor/featurevisor/issues/293)) ([a83f6fa](https://github.com/featurevisor/featurevisor/commit/a83f6fa4d21012b2e0c0d97ab6bb182f9aa4c1af))
12
+
13
+
14
+
15
+
16
+
17
+ # [1.14.0](https://github.com/featurevisor/featurevisor/compare/v1.13.1...v1.14.0) (2024-04-02)
18
+
19
+
20
+ ### Features
21
+
22
+ * benchmarking option in CLI ([#292](https://github.com/featurevisor/featurevisor/issues/292)) ([6abcecc](https://github.com/featurevisor/featurevisor/commit/6abcecc3a92f00ccea7dcb542676126b6eb3b778))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.13.1](https://github.com/featurevisor/featurevisor/compare/v1.13.0...v1.13.1) (2024-03-27)
7
29
 
8
30
 
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1711561969668" clover="3.2.0">
3
- <project timestamp="1711561969668" name="All files">
2
+ <coverage generated="1712248432114" clover="3.2.0">
3
+ <project timestamp="1712248432114" 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-03-27T17:52:49.611Z
149
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
178
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
134
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
139
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
457
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
142
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
119
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
475
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
196
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
134
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
139
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
568
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
145
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
119
+ at 2024-04-04T16:33:52.075Z
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-03-27T17:52:49.611Z
628
+ at 2024-04-04T16:33:52.075Z
629
629
  </div>
630
630
  <script src="../../prettify.js"></script>
631
631
  <script>
@@ -0,0 +1,18 @@
1
+ import { FeaturevisorInstance } from "@featurevisor/sdk";
2
+ import { Dependencies } from "../dependencies";
3
+ export interface BenchmarkOutput {
4
+ value: any;
5
+ duration: number;
6
+ }
7
+ export declare function benchmarkFeatureFlag(f: FeaturevisorInstance, featureKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput;
8
+ export declare function benchmarkFeatureVariation(f: FeaturevisorInstance, featureKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput;
9
+ export declare function benchmarkFeatureVariable(f: FeaturevisorInstance, featureKey: string, variableKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput;
10
+ export interface BenchmarkOptions {
11
+ environment: string;
12
+ feature: string;
13
+ n: number;
14
+ context: Record<string, unknown>;
15
+ variation?: boolean;
16
+ variable?: string;
17
+ }
18
+ export declare function benchmarkFeature(deps: Dependencies, options: BenchmarkOptions): Promise<void>;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.benchmarkFeature = exports.benchmarkFeatureVariable = exports.benchmarkFeatureVariation = exports.benchmarkFeatureFlag = void 0;
40
+ var sdk_1 = require("@featurevisor/sdk");
41
+ var config_1 = require("../config");
42
+ var builder_1 = require("../builder");
43
+ var prettyDuration_1 = require("../tester/prettyDuration");
44
+ function benchmarkFeatureFlag(f, featureKey, context, n) {
45
+ var start = Date.now();
46
+ var value;
47
+ for (var i = 0; i < n; i++) {
48
+ value = f.isEnabled(featureKey, context);
49
+ }
50
+ var duration = Date.now() - start;
51
+ return {
52
+ value: value,
53
+ duration: duration,
54
+ };
55
+ }
56
+ exports.benchmarkFeatureFlag = benchmarkFeatureFlag;
57
+ function benchmarkFeatureVariation(f, featureKey, context, n) {
58
+ var start = Date.now();
59
+ var value;
60
+ for (var i = 0; i < n; i++) {
61
+ value = f.getVariation(featureKey, context);
62
+ }
63
+ var duration = Date.now() - start;
64
+ return {
65
+ value: value,
66
+ duration: duration,
67
+ };
68
+ }
69
+ exports.benchmarkFeatureVariation = benchmarkFeatureVariation;
70
+ function benchmarkFeatureVariable(f, featureKey, variableKey, context, n) {
71
+ var start = Date.now();
72
+ var value;
73
+ for (var i = 0; i < n; i++) {
74
+ value = f.getVariable(featureKey, variableKey, context);
75
+ }
76
+ var duration = Date.now() - start;
77
+ return {
78
+ value: value,
79
+ duration: duration,
80
+ };
81
+ }
82
+ exports.benchmarkFeatureVariable = benchmarkFeatureVariable;
83
+ function benchmarkFeature(deps, options) {
84
+ return __awaiter(this, void 0, void 0, function () {
85
+ var datasource, projectConfig, datafileBuildStart, existingState, datafileContent, datafileBuildDuration, f, output;
86
+ return __generator(this, function (_a) {
87
+ switch (_a.label) {
88
+ case 0:
89
+ datasource = deps.datasource, projectConfig = deps.projectConfig;
90
+ console.log("");
91
+ console.log("Running benchmark for feature \"".concat(options.feature, "\"..."));
92
+ console.log("");
93
+ console.log("Building datafile containing all features for \"".concat(options.environment, "\"..."));
94
+ datafileBuildStart = Date.now();
95
+ return [4 /*yield*/, datasource.readState(options.environment)];
96
+ case 1:
97
+ existingState = _a.sent();
98
+ return [4 /*yield*/, (0, builder_1.buildDatafile)(projectConfig, datasource, {
99
+ schemaVersion: config_1.SCHEMA_VERSION,
100
+ revision: "include-all-features",
101
+ environment: options.environment,
102
+ }, existingState)];
103
+ case 2:
104
+ datafileContent = _a.sent();
105
+ datafileBuildDuration = Date.now() - datafileBuildStart;
106
+ console.log("Datafile build duration: ".concat(datafileBuildDuration, "ms"));
107
+ console.log("");
108
+ f = (0, sdk_1.createInstance)({
109
+ datafile: datafileContent,
110
+ });
111
+ console.log("...SDK initialized");
112
+ console.log("");
113
+ console.log("Against context: ".concat(JSON.stringify(options.context)));
114
+ if (options.variable) {
115
+ // variable
116
+ console.log("Evaluating variable \"".concat(options.variable, "\" ").concat(options.n, " times..."));
117
+ output = benchmarkFeatureVariable(f, options.feature, options.variable, options.context, options.n);
118
+ }
119
+ else if (options.variation) {
120
+ // variation
121
+ console.log("Evaluating variation ".concat(options.n, " times..."));
122
+ output = benchmarkFeatureVariation(f, options.feature, options.context, options.n);
123
+ }
124
+ else {
125
+ // flag
126
+ console.log("Evaluating flag ".concat(options.n, " times..."));
127
+ output = benchmarkFeatureFlag(f, options.feature, options.context, options.n);
128
+ }
129
+ console.log("");
130
+ console.log("Evaluated value : ".concat(JSON.stringify(output.value)));
131
+ console.log("Total duration : ".concat((0, prettyDuration_1.prettyDuration)(output.duration)));
132
+ console.log("Average duration: ".concat((0, prettyDuration_1.prettyDuration)(output.duration / options.n)));
133
+ return [2 /*return*/];
134
+ }
135
+ });
136
+ });
137
+ }
138
+ exports.benchmarkFeature = benchmarkFeature;
139
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot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AAK,CAAC,CAAE,CAAC,CAAC;oBACjE,OAAO,CAAC,GAAG,CAAC,4BAAqB,IAAA,+BAAc,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAE,CAAC,CAAC;oBACpE,OAAO,CAAC,GAAG,CAAC,4BAAqB,IAAA,+BAAc,EAAC,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;;;;;CACjF;AA/DD,4CA+DC"}
@@ -36,3 +36,8 @@ export interface ProjectConfig {
36
36
  adapter: any;
37
37
  }
38
38
  export declare function getProjectConfig(rootDirectoryPath: string): ProjectConfig;
39
+ export interface ShowProjectConfigOptions {
40
+ print?: boolean;
41
+ pretty?: boolean;
42
+ }
43
+ export declare function showProjectConfig(projectConfig: ProjectConfig, options?: ShowProjectConfigOptions): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProjectConfig = exports.SCHEMA_VERSION = exports.DEFAULT_PARSER = exports.DEFAULT_PRETTY_DATAFILE = exports.DEFAULT_PRETTY_STATE = exports.DEFAULT_BUCKET_BY_ATTRIBUTE = exports.DEFAULT_TAGS = exports.DEFAULT_ENVIRONMENTS = exports.ROOT_DIR_PLACEHOLDER = exports.CONFIG_MODULE_NAME = exports.SITE_EXPORT_DIRECTORY_NAME = exports.OUTPUT_DIRECTORY_NAME = exports.STATE_DIRECTORY_NAME = exports.TESTS_DIRECTORY_NAME = exports.GROUPS_DIRECTORY_NAME = exports.ATTRIBUTES_DIRECTORY_NAME = exports.SEGMENTS_DIRECTORY_NAME = exports.FEATURES_DIRECTORY_NAME = void 0;
3
+ exports.showProjectConfig = exports.getProjectConfig = exports.SCHEMA_VERSION = exports.DEFAULT_PARSER = exports.DEFAULT_PRETTY_DATAFILE = exports.DEFAULT_PRETTY_STATE = exports.DEFAULT_BUCKET_BY_ATTRIBUTE = exports.DEFAULT_TAGS = exports.DEFAULT_ENVIRONMENTS = exports.ROOT_DIR_PLACEHOLDER = exports.CONFIG_MODULE_NAME = exports.SITE_EXPORT_DIRECTORY_NAME = exports.OUTPUT_DIRECTORY_NAME = exports.STATE_DIRECTORY_NAME = exports.TESTS_DIRECTORY_NAME = exports.GROUPS_DIRECTORY_NAME = exports.ATTRIBUTES_DIRECTORY_NAME = exports.SEGMENTS_DIRECTORY_NAME = exports.FEATURES_DIRECTORY_NAME = void 0;
4
4
  var path = require("path");
5
5
  var parsers_1 = require("./parsers");
6
6
  var filesystemAdapter_1 = require("../datasource/filesystemAdapter");
@@ -24,13 +24,6 @@ exports.SCHEMA_VERSION = "1";
24
24
  // rootDirectoryPath: path to the root directory of the project (without ending with a slash)
25
25
  function getProjectConfig(rootDirectoryPath) {
26
26
  var baseConfig = {
27
- featuresDirectoryPath: path.join(rootDirectoryPath, exports.FEATURES_DIRECTORY_NAME),
28
- segmentsDirectoryPath: path.join(rootDirectoryPath, exports.SEGMENTS_DIRECTORY_NAME),
29
- attributesDirectoryPath: path.join(rootDirectoryPath, exports.ATTRIBUTES_DIRECTORY_NAME),
30
- groupsDirectoryPath: path.join(rootDirectoryPath, exports.GROUPS_DIRECTORY_NAME),
31
- testsDirectoryPath: path.join(rootDirectoryPath, exports.TESTS_DIRECTORY_NAME),
32
- stateDirectoryPath: path.join(rootDirectoryPath, exports.STATE_DIRECTORY_NAME),
33
- outputDirectoryPath: path.join(rootDirectoryPath, exports.OUTPUT_DIRECTORY_NAME),
34
27
  environments: exports.DEFAULT_ENVIRONMENTS,
35
28
  tags: exports.DEFAULT_TAGS,
36
29
  defaultBucketBy: "userId",
@@ -38,8 +31,15 @@ function getProjectConfig(rootDirectoryPath) {
38
31
  prettyState: exports.DEFAULT_PRETTY_STATE,
39
32
  prettyDatafile: exports.DEFAULT_PRETTY_DATAFILE,
40
33
  stringify: true,
41
- siteExportDirectoryPath: path.join(rootDirectoryPath, exports.SITE_EXPORT_DIRECTORY_NAME),
42
34
  adapter: filesystemAdapter_1.FilesystemAdapter,
35
+ featuresDirectoryPath: path.join(rootDirectoryPath, exports.FEATURES_DIRECTORY_NAME),
36
+ segmentsDirectoryPath: path.join(rootDirectoryPath, exports.SEGMENTS_DIRECTORY_NAME),
37
+ attributesDirectoryPath: path.join(rootDirectoryPath, exports.ATTRIBUTES_DIRECTORY_NAME),
38
+ groupsDirectoryPath: path.join(rootDirectoryPath, exports.GROUPS_DIRECTORY_NAME),
39
+ testsDirectoryPath: path.join(rootDirectoryPath, exports.TESTS_DIRECTORY_NAME),
40
+ stateDirectoryPath: path.join(rootDirectoryPath, exports.STATE_DIRECTORY_NAME),
41
+ outputDirectoryPath: path.join(rootDirectoryPath, exports.OUTPUT_DIRECTORY_NAME),
42
+ siteExportDirectoryPath: path.join(rootDirectoryPath, exports.SITE_EXPORT_DIRECTORY_NAME),
43
43
  };
44
44
  var configModulePath = path.join(rootDirectoryPath, exports.CONFIG_MODULE_NAME);
45
45
  var customConfig = require(configModulePath);
@@ -62,4 +62,23 @@ function getProjectConfig(rootDirectoryPath) {
62
62
  return finalConfig;
63
63
  }
64
64
  exports.getProjectConfig = getProjectConfig;
65
+ function showProjectConfig(projectConfig, options) {
66
+ if (options === void 0) { options = {}; }
67
+ if (options.print) {
68
+ console.log(options.pretty ? JSON.stringify(projectConfig, null, 2) : JSON.stringify(projectConfig));
69
+ return;
70
+ }
71
+ console.log("\nProject configuration:\n");
72
+ var keys = Object.keys(projectConfig);
73
+ var longestKeyLength = keys.reduce(function (acc, key) { return (key.length > acc ? key.length : acc); }, 0);
74
+ var ignoreKeys = ["adapter", "parser"];
75
+ for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
76
+ var key = keys_1[_i];
77
+ if (ignoreKeys.indexOf(key) !== -1) {
78
+ continue;
79
+ }
80
+ console.log(" - ".concat(key.padEnd(longestKeyLength, " "), ": ").concat(projectConfig[key]));
81
+ }
82
+ }
83
+ exports.showProjectConfig = showProjectConfig;
65
84
  //# sourceMappingURL=projectConfig.js.map
@@ -1 +1 @@
1
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AC,aAAa,CAAC,CAAC;IACxC,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,CAAC,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAArC,CAAqC,EAAE,CAAC,CAAC,CAAC;IAC7F,IAAM,UAAU,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEzC,KAAkB,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE;QAAnB,IAAM,GAAG,aAAA;QACZ,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAClC,SAAS;SACV;QAED,OAAO,CAAC,GAAG,CAAC,cAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,GAAG,CAAC,eAAK,aAAa,CAAC,GAAG,CAAC,CAAE,CAAC,CAAC;KAChF;AACH,CAAC;AAzBD,8CAyBC"}
package/lib/index.d.ts CHANGED
@@ -10,3 +10,4 @@ export * from "./find-duplicate-segments";
10
10
  export * from "./find-usage";
11
11
  export * from "./dependencies";
12
12
  export * from "./datasource";
13
+ export * from "./benchmark";
package/lib/index.js CHANGED
@@ -26,4 +26,5 @@ __exportStar(require("./find-duplicate-segments"), exports);
26
26
  __exportStar(require("./find-usage"), exports);
27
27
  __exportStar(require("./dependencies"), exports);
28
28
  __exportStar(require("./datasource"), exports);
29
+ __exportStar(require("./benchmark"), exports);
29
30
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B;AAC1B,4DAA0C;AAC1C,+CAA6B;AAC7B,iDAA+B;AAC/B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B;AAC1B,4DAA0C;AAC1C,+CAA6B;AAC7B,iDAA+B;AAC/B,+CAA6B;AAC7B,8CAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/core",
3
- "version": "1.13.1",
3
+ "version": "1.15.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",
@@ -57,5 +57,5 @@
57
57
  "@types/js-yaml": "^4.0.5",
58
58
  "@types/tar": "^6.1.4"
59
59
  },
60
- "gitHead": "806b52ab8a519b05f31362f48cdb134d5a794976"
60
+ "gitHead": "243244cba5128205779b4b87237e442740d65db6"
61
61
  }
@@ -0,0 +1,150 @@
1
+ import { Context } from "@featurevisor/types";
2
+ import { FeaturevisorInstance, createInstance } from "@featurevisor/sdk";
3
+
4
+ import { SCHEMA_VERSION } from "../config";
5
+ import { buildDatafile } from "../builder";
6
+ import { Dependencies } from "../dependencies";
7
+ import { prettyDuration } from "../tester/prettyDuration";
8
+
9
+ export interface BenchmarkOutput {
10
+ value: any;
11
+ duration: number; // ms
12
+ }
13
+
14
+ export function benchmarkFeatureFlag(
15
+ f: FeaturevisorInstance,
16
+ featureKey: string,
17
+ context: Record<string, unknown>,
18
+ n: number,
19
+ ): BenchmarkOutput {
20
+ const start = Date.now();
21
+ let value: any;
22
+
23
+ for (let i = 0; i < n; i++) {
24
+ value = f.isEnabled(featureKey, context as Context);
25
+ }
26
+
27
+ const duration = Date.now() - start;
28
+
29
+ return {
30
+ value,
31
+ duration,
32
+ };
33
+ }
34
+
35
+ export function benchmarkFeatureVariation(
36
+ f: FeaturevisorInstance,
37
+ featureKey: string,
38
+ context: Record<string, unknown>,
39
+ n: number,
40
+ ): BenchmarkOutput {
41
+ const start = Date.now();
42
+ let value: any;
43
+
44
+ for (let i = 0; i < n; i++) {
45
+ value = f.getVariation(featureKey, context as Context);
46
+ }
47
+
48
+ const duration = Date.now() - start;
49
+
50
+ return {
51
+ value,
52
+ duration,
53
+ };
54
+ }
55
+
56
+ export function benchmarkFeatureVariable(
57
+ f: FeaturevisorInstance,
58
+ featureKey: string,
59
+ variableKey: string,
60
+ context: Record<string, unknown>,
61
+ n: number,
62
+ ): BenchmarkOutput {
63
+ const start = Date.now();
64
+ let value: any;
65
+
66
+ for (let i = 0; i < n; i++) {
67
+ value = f.getVariable(featureKey, variableKey, context as Context);
68
+ }
69
+
70
+ const duration = Date.now() - start;
71
+
72
+ return {
73
+ value,
74
+ duration,
75
+ };
76
+ }
77
+
78
+ export interface BenchmarkOptions {
79
+ environment: string;
80
+ feature: string;
81
+ n: number;
82
+ context: Record<string, unknown>;
83
+ variation?: boolean;
84
+ variable?: string;
85
+ }
86
+
87
+ export async function benchmarkFeature(
88
+ deps: Dependencies,
89
+ options: BenchmarkOptions,
90
+ ): Promise<void> {
91
+ const { datasource, projectConfig } = deps;
92
+
93
+ console.log("");
94
+ console.log(`Running benchmark for feature "${options.feature}"...`);
95
+
96
+ console.log("");
97
+
98
+ console.log(`Building datafile containing all features for "${options.environment}"...`);
99
+ const datafileBuildStart = Date.now();
100
+ const existingState = await datasource.readState(options.environment);
101
+ const datafileContent = await buildDatafile(
102
+ projectConfig,
103
+ datasource,
104
+ {
105
+ schemaVersion: SCHEMA_VERSION,
106
+ revision: "include-all-features",
107
+ environment: options.environment,
108
+ },
109
+ existingState,
110
+ );
111
+ const datafileBuildDuration = Date.now() - datafileBuildStart;
112
+ console.log(`Datafile build duration: ${datafileBuildDuration}ms`);
113
+
114
+ console.log("");
115
+
116
+ const f = createInstance({
117
+ datafile: datafileContent,
118
+ });
119
+ console.log("...SDK initialized");
120
+
121
+ console.log("");
122
+ console.log(`Against context: ${JSON.stringify(options.context)}`);
123
+
124
+ let output: BenchmarkOutput;
125
+ if (options.variable) {
126
+ // variable
127
+ console.log(`Evaluating variable "${options.variable}" ${options.n} times...`);
128
+ output = benchmarkFeatureVariable(
129
+ f,
130
+ options.feature,
131
+ options.variable,
132
+ options.context,
133
+ options.n,
134
+ );
135
+ } else if (options.variation) {
136
+ // variation
137
+ console.log(`Evaluating variation ${options.n} times...`);
138
+ output = benchmarkFeatureVariation(f, options.feature, options.context, options.n);
139
+ } else {
140
+ // flag
141
+ console.log(`Evaluating flag ${options.n} times...`);
142
+ output = benchmarkFeatureFlag(f, options.feature, options.context, options.n);
143
+ }
144
+
145
+ console.log("");
146
+
147
+ console.log(`Evaluated value : ${JSON.stringify(output.value)}`);
148
+ console.log(`Total duration : ${prettyDuration(output.duration)}`);
149
+ console.log(`Average duration: ${prettyDuration(output.duration / options.n)}`);
150
+ }
@@ -50,15 +50,6 @@ export interface ProjectConfig {
50
50
  // rootDirectoryPath: path to the root directory of the project (without ending with a slash)
51
51
  export function getProjectConfig(rootDirectoryPath: string): ProjectConfig {
52
52
  const baseConfig: ProjectConfig = {
53
- featuresDirectoryPath: path.join(rootDirectoryPath, FEATURES_DIRECTORY_NAME),
54
- segmentsDirectoryPath: path.join(rootDirectoryPath, SEGMENTS_DIRECTORY_NAME),
55
- attributesDirectoryPath: path.join(rootDirectoryPath, ATTRIBUTES_DIRECTORY_NAME),
56
- groupsDirectoryPath: path.join(rootDirectoryPath, GROUPS_DIRECTORY_NAME),
57
- testsDirectoryPath: path.join(rootDirectoryPath, TESTS_DIRECTORY_NAME),
58
-
59
- stateDirectoryPath: path.join(rootDirectoryPath, STATE_DIRECTORY_NAME),
60
- outputDirectoryPath: path.join(rootDirectoryPath, OUTPUT_DIRECTORY_NAME),
61
-
62
53
  environments: DEFAULT_ENVIRONMENTS,
63
54
  tags: DEFAULT_TAGS,
64
55
  defaultBucketBy: "userId",
@@ -69,9 +60,16 @@ export function getProjectConfig(rootDirectoryPath: string): ProjectConfig {
69
60
  prettyDatafile: DEFAULT_PRETTY_DATAFILE,
70
61
  stringify: true,
71
62
 
72
- siteExportDirectoryPath: path.join(rootDirectoryPath, SITE_EXPORT_DIRECTORY_NAME),
73
-
74
63
  adapter: FilesystemAdapter,
64
+
65
+ featuresDirectoryPath: path.join(rootDirectoryPath, FEATURES_DIRECTORY_NAME),
66
+ segmentsDirectoryPath: path.join(rootDirectoryPath, SEGMENTS_DIRECTORY_NAME),
67
+ attributesDirectoryPath: path.join(rootDirectoryPath, ATTRIBUTES_DIRECTORY_NAME),
68
+ groupsDirectoryPath: path.join(rootDirectoryPath, GROUPS_DIRECTORY_NAME),
69
+ testsDirectoryPath: path.join(rootDirectoryPath, TESTS_DIRECTORY_NAME),
70
+ stateDirectoryPath: path.join(rootDirectoryPath, STATE_DIRECTORY_NAME),
71
+ outputDirectoryPath: path.join(rootDirectoryPath, OUTPUT_DIRECTORY_NAME),
72
+ siteExportDirectoryPath: path.join(rootDirectoryPath, SITE_EXPORT_DIRECTORY_NAME),
75
73
  };
76
74
 
77
75
  const configModulePath = path.join(rootDirectoryPath, CONFIG_MODULE_NAME);
@@ -101,3 +99,35 @@ export function getProjectConfig(rootDirectoryPath: string): ProjectConfig {
101
99
 
102
100
  return finalConfig as ProjectConfig;
103
101
  }
102
+
103
+ export interface ShowProjectConfigOptions {
104
+ print?: boolean;
105
+ pretty?: boolean;
106
+ }
107
+
108
+ export function showProjectConfig(
109
+ projectConfig: ProjectConfig,
110
+ options: ShowProjectConfigOptions = {},
111
+ ) {
112
+ if (options.print) {
113
+ console.log(
114
+ options.pretty ? JSON.stringify(projectConfig, null, 2) : JSON.stringify(projectConfig),
115
+ );
116
+
117
+ return;
118
+ }
119
+
120
+ console.log("\nProject configuration:\n");
121
+
122
+ const keys = Object.keys(projectConfig);
123
+ const longestKeyLength = keys.reduce((acc, key) => (key.length > acc ? key.length : acc), 0);
124
+ const ignoreKeys = ["adapter", "parser"];
125
+
126
+ for (const key of keys) {
127
+ if (ignoreKeys.indexOf(key) !== -1) {
128
+ continue;
129
+ }
130
+
131
+ console.log(` - ${key.padEnd(longestKeyLength, " ")}: ${projectConfig[key]}`);
132
+ }
133
+ }
package/src/index.ts CHANGED
@@ -10,3 +10,4 @@ export * from "./find-duplicate-segments";
10
10
  export * from "./find-usage";
11
11
  export * from "./dependencies";
12
12
  export * from "./datasource";
13
+ export * from "./benchmark";