@featurevisor/core 1.6.0 → 1.7.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 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/traffic.spec.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"58"},{"size":3214,"mtime":1707683631804,"results":"59","hashOfConfig":"60"},{"size":1014,"mtime":1707683631804,"results":"61","hashOfConfig":"60"},{"size":9170,"mtime":1707683631804,"results":"62","hashOfConfig":"60"},{"size":2410,"mtime":1707683631804,"results":"63","hashOfConfig":"60"},{"size":1755,"mtime":1707683631804,"results":"64","hashOfConfig":"60"},{"size":65,"mtime":1707683631804,"results":"65","hashOfConfig":"60"},{"size":12889,"mtime":1707683631804,"results":"66","hashOfConfig":"60"},{"size":5052,"mtime":1707683631804,"results":"67","hashOfConfig":"60"},{"size":60,"mtime":1707683631804,"results":"68","hashOfConfig":"60"},{"size":1035,"mtime":1707683631804,"results":"69","hashOfConfig":"60"},{"size":3464,"mtime":1707683631804,"results":"70","hashOfConfig":"60"},{"size":1305,"mtime":1707683631804,"results":"71","hashOfConfig":"60"},{"size":5028,"mtime":1707683631808,"results":"72","hashOfConfig":"60"},{"size":9261,"mtime":1707683631808,"results":"73","hashOfConfig":"60"},{"size":94,"mtime":1707683631808,"results":"74","hashOfConfig":"60"},{"size":279,"mtime":1707683631808,"results":"75","hashOfConfig":"60"},{"size":1033,"mtime":1707683631808,"results":"76","hashOfConfig":"60"},{"size":540,"mtime":1707683631808,"results":"77","hashOfConfig":"60"},{"size":1476,"mtime":1707683631808,"results":"78","hashOfConfig":"60"},{"size":6250,"mtime":1707683631808,"results":"79","hashOfConfig":"60"},{"size":318,"mtime":1707683631808,"results":"80","hashOfConfig":"60"},{"size":1308,"mtime":1707683631808,"results":"81","hashOfConfig":"60"},{"size":359,"mtime":1707683631808,"results":"82","hashOfConfig":"60"},{"size":1119,"mtime":1707683631808,"results":"83","hashOfConfig":"60"},{"size":1464,"mtime":1707683631808,"results":"84","hashOfConfig":"60"},{"size":4007,"mtime":1707683631808,"results":"85","hashOfConfig":"60"},{"size":7758,"mtime":1707683631808,"results":"86","hashOfConfig":"60"},{"size":1221,"mtime":1707683631808,"results":"87","hashOfConfig":"60"},{"size":31,"mtime":1707683631808,"results":"88","hashOfConfig":"60"},{"size":7059,"mtime":1707683631808,"results":"89","hashOfConfig":"60"},{"size":569,"mtime":1707683631808,"results":"90","hashOfConfig":"60"},{"size":364,"mtime":1707683631808,"results":"91","hashOfConfig":"60"},{"size":2295,"mtime":1707683631808,"results":"92","hashOfConfig":"60"},{"size":641,"mtime":1707683631808,"results":"93","hashOfConfig":"60"},{"size":1481,"mtime":1707683631808,"results":"94","hashOfConfig":"60"},{"size":1178,"mtime":1707683631808,"results":"95","hashOfConfig":"60"},{"size":6187,"mtime":1707683631808,"results":"96","hashOfConfig":"60"},{"size":516,"mtime":1707683631808,"results":"97","hashOfConfig":"60"},{"size":496,"mtime":1707683631808,"results":"98","hashOfConfig":"60"},{"size":607,"mtime":1707683631808,"results":"99","hashOfConfig":"60"},{"size":1560,"mtime":1707683631808,"results":"100","hashOfConfig":"60"},{"size":59,"mtime":1707683631808,"results":"101","hashOfConfig":"60"},{"size":1681,"mtime":1707683631808,"results":"102","hashOfConfig":"60"},{"size":298,"mtime":1707683631808,"results":"103","hashOfConfig":"60"},{"size":932,"mtime":1707683631808,"results":"104","hashOfConfig":"60"},{"size":468,"mtime":1707683631808,"results":"105","hashOfConfig":"60"},{"size":212,"mtime":1707683631808,"results":"106","hashOfConfig":"60"},{"size":62,"mtime":1707683631808,"results":"107","hashOfConfig":"60"},{"size":1188,"mtime":1707683631808,"results":"108","hashOfConfig":"60"},{"size":5021,"mtime":1707683631808,"results":"109","hashOfConfig":"60"},{"size":516,"mtime":1707683631808,"results":"110","hashOfConfig":"60"},{"size":1691,"mtime":1707683631808,"results":"111","hashOfConfig":"60"},{"size":7394,"mtime":1707683631808,"results":"112","hashOfConfig":"60"},{"size":4420,"mtime":1707683631808,"results":"113","hashOfConfig":"60"},{"size":2273,"mtime":1707683631808,"results":"114","hashOfConfig":"60"},{"size":1993,"mtime":1707683631808,"results":"115","hashOfConfig":"60"},{"size":3641,"mtime":1707683631808,"results":"116","hashOfConfig":"60"},{"size":54,"mtime":1707683631808,"results":"117","hashOfConfig":"60"},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"o8ti19",{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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/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",[],["292","293"],"/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/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["294"],"/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":"295","severity":2,"message":"296","line":22,"column":7,"nodeType":"297","messageId":"298","endLine":22,"endColumn":18,"suppressions":"299"},{"ruleId":"300","severity":2,"message":"301","line":22,"column":21,"nodeType":"302","messageId":"303","endLine":22,"endColumn":81,"fix":"304","suppressions":"305"},{"ruleId":"295","severity":2,"message":"306","line":51,"column":10,"nodeType":"297","messageId":"298","endLine":51,"endColumn":38,"suppressions":"307"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["308"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"309","text":"310"},["311"],"'getFeaturevisorTypeFromValue' is defined but never used.",["312"],{"kind":"313","justification":"314"},[515,518]," {3}",{"kind":"313","justification":"314"},{"kind":"313","justification":"314"},"directive",""]
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/traffic.spec.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"58"},{"size":3214,"mtime":1707950576945,"results":"59","hashOfConfig":"60"},{"size":1014,"mtime":1707950576945,"results":"61","hashOfConfig":"60"},{"size":9170,"mtime":1707950576945,"results":"62","hashOfConfig":"60"},{"size":2410,"mtime":1707950576945,"results":"63","hashOfConfig":"60"},{"size":1755,"mtime":1707950576945,"results":"64","hashOfConfig":"60"},{"size":65,"mtime":1707950576945,"results":"65","hashOfConfig":"60"},{"size":12889,"mtime":1707950576945,"results":"66","hashOfConfig":"60"},{"size":5052,"mtime":1707950576945,"results":"67","hashOfConfig":"60"},{"size":60,"mtime":1707950576945,"results":"68","hashOfConfig":"60"},{"size":1035,"mtime":1707950576945,"results":"69","hashOfConfig":"60"},{"size":3464,"mtime":1707950576945,"results":"70","hashOfConfig":"60"},{"size":1305,"mtime":1707950576945,"results":"71","hashOfConfig":"60"},{"size":5028,"mtime":1707950576945,"results":"72","hashOfConfig":"60"},{"size":9261,"mtime":1707950576945,"results":"73","hashOfConfig":"60"},{"size":94,"mtime":1707950576945,"results":"74","hashOfConfig":"60"},{"size":279,"mtime":1707950576945,"results":"75","hashOfConfig":"60"},{"size":1033,"mtime":1707950576945,"results":"76","hashOfConfig":"60"},{"size":540,"mtime":1707950576945,"results":"77","hashOfConfig":"60"},{"size":1476,"mtime":1707950576945,"results":"78","hashOfConfig":"60"},{"size":6250,"mtime":1707950576945,"results":"79","hashOfConfig":"60"},{"size":318,"mtime":1707950576945,"results":"80","hashOfConfig":"60"},{"size":1308,"mtime":1707950576945,"results":"81","hashOfConfig":"60"},{"size":359,"mtime":1707950576945,"results":"82","hashOfConfig":"60"},{"size":1119,"mtime":1707950576945,"results":"83","hashOfConfig":"60"},{"size":1464,"mtime":1707950576945,"results":"84","hashOfConfig":"60"},{"size":4007,"mtime":1707950576945,"results":"85","hashOfConfig":"60"},{"size":7758,"mtime":1707950576945,"results":"86","hashOfConfig":"60"},{"size":1221,"mtime":1707950576945,"results":"87","hashOfConfig":"60"},{"size":31,"mtime":1707950576945,"results":"88","hashOfConfig":"60"},{"size":8340,"mtime":1707950576945,"results":"89","hashOfConfig":"60"},{"size":569,"mtime":1707950576945,"results":"90","hashOfConfig":"60"},{"size":364,"mtime":1707950576945,"results":"91","hashOfConfig":"60"},{"size":2295,"mtime":1707950576945,"results":"92","hashOfConfig":"60"},{"size":641,"mtime":1707950576945,"results":"93","hashOfConfig":"60"},{"size":1481,"mtime":1707950576945,"results":"94","hashOfConfig":"60"},{"size":1178,"mtime":1707950576945,"results":"95","hashOfConfig":"60"},{"size":6187,"mtime":1707950576945,"results":"96","hashOfConfig":"60"},{"size":516,"mtime":1707950576945,"results":"97","hashOfConfig":"60"},{"size":496,"mtime":1707950576945,"results":"98","hashOfConfig":"60"},{"size":607,"mtime":1707950576945,"results":"99","hashOfConfig":"60"},{"size":1560,"mtime":1707950576945,"results":"100","hashOfConfig":"60"},{"size":59,"mtime":1707950576945,"results":"101","hashOfConfig":"60"},{"size":1681,"mtime":1707950576945,"results":"102","hashOfConfig":"60"},{"size":298,"mtime":1707950576945,"results":"103","hashOfConfig":"60"},{"size":932,"mtime":1707950576945,"results":"104","hashOfConfig":"60"},{"size":468,"mtime":1707950576945,"results":"105","hashOfConfig":"60"},{"size":212,"mtime":1707950576945,"results":"106","hashOfConfig":"60"},{"size":62,"mtime":1707950576945,"results":"107","hashOfConfig":"60"},{"size":1188,"mtime":1707950576945,"results":"108","hashOfConfig":"60"},{"size":5021,"mtime":1707950576945,"results":"109","hashOfConfig":"60"},{"size":516,"mtime":1707950576945,"results":"110","hashOfConfig":"60"},{"size":1691,"mtime":1707950576945,"results":"111","hashOfConfig":"60"},{"size":7394,"mtime":1707950576945,"results":"112","hashOfConfig":"60"},{"size":4420,"mtime":1707950576945,"results":"113","hashOfConfig":"60"},{"size":2273,"mtime":1707950576945,"results":"114","hashOfConfig":"60"},{"size":1993,"mtime":1707950576945,"results":"115","hashOfConfig":"60"},{"size":3641,"mtime":1707950576945,"results":"116","hashOfConfig":"60"},{"size":54,"mtime":1707950576949,"results":"117","hashOfConfig":"60"},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"o8ti19",{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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/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",[],["292","293"],"/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/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["294"],"/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":"295","severity":2,"message":"296","line":22,"column":7,"nodeType":"297","messageId":"298","endLine":22,"endColumn":18,"suppressions":"299"},{"ruleId":"300","severity":2,"message":"301","line":22,"column":21,"nodeType":"302","messageId":"303","endLine":22,"endColumn":81,"fix":"304","suppressions":"305"},{"ruleId":"295","severity":2,"message":"306","line":51,"column":10,"nodeType":"297","messageId":"298","endLine":51,"endColumn":38,"suppressions":"307"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["308"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"309","text":"310"},["311"],"'getFeaturevisorTypeFromValue' is defined but never used.",["312"],{"kind":"313","justification":"314"},[515,518]," {3}",{"kind":"313","justification":"314"},{"kind":"313","justification":"314"},"directive",""]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.7.0](https://github.com/featurevisor/featurevisor/compare/v1.6.0...v1.7.0) (2024-02-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * lint by key pattern and entity type ([#261](https://github.com/featurevisor/featurevisor/issues/261)) ([f4ab707](https://github.com/featurevisor/featurevisor/commit/f4ab707abc32660765d72be64bec7bedf83fa94e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [1.6.0](https://github.com/featurevisor/featurevisor/compare/v1.5.1...v1.6.0) (2024-02-11)
7
18
 
8
19
 
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1707683773927" clover="3.2.0">
3
- <project timestamp="1707683773927" name="All files">
2
+ <coverage generated="1707950714968" clover="3.2.0">
3
+ <project timestamp="1707950714968" name="All files">
4
4
  <metrics statements="355" coveredstatements="236" conditionals="181" coveredconditionals="109" methods="52" coveredmethods="35" elements="588" coveredelements="380" complexity="0" loc="355" ncloc="355" packages="4" files="8" classes="8"/>
5
5
  <package name="lib.builder">
6
6
  <metrics statements="92" coveredstatements="87" conditionals="52" coveredconditionals="42" methods="14" coveredmethods="14"/>
@@ -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-02-11T20:36:13.888Z
149
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
178
+ at 2024-02-14T22:45:14.934Z
179
179
  </div>
180
180
  <script src="../../prettify.js"></script>
181
181
  <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-02-11T20:36:13.888Z
119
+ at 2024-02-14T22:45:14.934Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -460,7 +460,7 @@ exports.getTraffic = getTraffic;
460
460
  <div class='footer quiet pad2 space-top1 center small'>
461
461
  Code coverage generated by
462
462
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
463
- at 2024-02-11T20:36:13.888Z
463
+ at 2024-02-14T22:45:14.934Z
464
464
  </div>
465
465
  <script src="../../prettify.js"></script>
466
466
  <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-02-11T20:36:13.888Z
142
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
119
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
475
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
196
+ at 2024-02-14T22:45:14.934Z
197
197
  </div>
198
198
  <script src="../../prettify.js"></script>
199
199
  <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-02-11T20:36:13.888Z
119
+ at 2024-02-14T22:45:14.934Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -574,7 +574,7 @@ export function getTraffic(
574
574
  <div class='footer quiet pad2 space-top1 center small'>
575
575
  Code coverage generated by
576
576
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
577
- at 2024-02-11T20:36:13.888Z
577
+ at 2024-02-14T22:45:14.934Z
578
578
  </div>
579
579
  <script src="../../prettify.js"></script>
580
580
  <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-02-11T20:36:13.888Z
145
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
119
+ at 2024-02-14T22:45:14.934Z
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-02-11T20:36:13.888Z
628
+ at 2024-02-14T22:45:14.934Z
629
629
  </div>
630
630
  <script src="../../prettify.js"></script>
631
631
  <script>
@@ -1,2 +1,6 @@
1
1
  import { Dependencies } from "../dependencies";
2
- export declare function lintProject(deps: Dependencies): Promise<boolean>;
2
+ export interface LintProjectOptions {
3
+ keyPattern?: string;
4
+ entityType?: string;
5
+ }
6
+ export declare function lintProject(deps: Dependencies, options?: LintProjectOptions): Promise<boolean>;
@@ -49,7 +49,8 @@ var checkCircularDependency_1 = require("./checkCircularDependency");
49
49
  var checkPercentageExceedingSlot_1 = require("./checkPercentageExceedingSlot");
50
50
  var printError_1 = require("./printError");
51
51
  var cliFormat_1 = require("../tester/cliFormat");
52
- function lintProject(deps) {
52
+ function lintProject(deps, options) {
53
+ if (options === void 0) { options = {}; }
53
54
  return __awaiter(this, void 0, void 0, function () {
54
55
  function getFullPathFromKey(type, key, relative) {
55
56
  if (relative === void 0) { relative = false; }
@@ -78,25 +79,34 @@ function lintProject(deps) {
78
79
  }
79
80
  return fullPath;
80
81
  }
81
- var projectConfig, datasource, hasError, availableAttributeKeys, availableSegmentKeys, availableFeatureKeys, attributes, attributeZodSchema, _i, attributes_1, key, fullPath, parsed, result, e_1, segments, conditionsZodSchema, segmentZodSchema, _a, segments_1, key, fullPath, parsed, result, e_2, features, featureZodSchema, _b, features_1, key, fullPath, parsed, result, e_3, e_4, groups, groupZodSchema, _c, groups_1, key, fullPath, parsed, result, e_5, e_6, tests, testsZodSchema, _d, tests_1, key, fullPath, parsed, result, e_7;
82
+ var projectConfig, datasource, hasError, keyPattern, attributes, attributeZodSchema, filteredKeys, _i, filteredKeys_1, key, fullPath, parsed, result, e_1, segments, conditionsZodSchema, segmentZodSchema, filteredKeys, _a, filteredKeys_2, key, fullPath, parsed, result, e_2, features, featureZodSchema, filteredKeys, _b, filteredKeys_3, key, fullPath, parsed, result, e_3, e_4, groups, groupZodSchema, filteredKeys, _c, filteredKeys_4, key, fullPath, parsed, result, e_5, e_6, tests, testsZodSchema, filteredKeys, _d, filteredKeys_5, key, fullPath, parsed, result, e_7;
82
83
  return __generator(this, function (_e) {
83
84
  switch (_e.label) {
84
85
  case 0:
85
86
  projectConfig = deps.projectConfig, datasource = deps.datasource;
86
87
  hasError = false;
87
- availableAttributeKeys = [];
88
- availableSegmentKeys = [];
89
- availableFeatureKeys = [];
88
+ keyPattern = options.keyPattern ? new RegExp(options.keyPattern) : null;
89
+ if (keyPattern) {
90
+ console.log("");
91
+ console.log("Linting only keys matching pattern: ".concat(keyPattern));
92
+ console.log("");
93
+ }
90
94
  return [4 /*yield*/, datasource.listAttributes()];
91
95
  case 1:
92
96
  attributes = _e.sent();
93
- console.log("Linting ".concat(attributes.length, " attributes...\n"));
94
97
  attributeZodSchema = (0, attributeSchema_1.getAttributeZodSchema)();
95
- _i = 0, attributes_1 = attributes;
98
+ if (!(!options.entityType || options.entityType === "attribute")) return [3 /*break*/, 7];
99
+ filteredKeys = !keyPattern
100
+ ? attributes
101
+ : attributes.filter(function (key) { return keyPattern.test(key); });
102
+ if (filteredKeys.length > 0) {
103
+ console.log("Linting ".concat(filteredKeys.length, " attributes...\n"));
104
+ }
105
+ _i = 0, filteredKeys_1 = filteredKeys;
96
106
  _e.label = 2;
97
107
  case 2:
98
- if (!(_i < attributes_1.length)) return [3 /*break*/, 7];
99
- key = attributes_1[_i];
108
+ if (!(_i < filteredKeys_1.length)) return [3 /*break*/, 7];
109
+ key = filteredKeys_1[_i];
100
110
  fullPath = getFullPathFromKey("attribute", key);
101
111
  _e.label = 3;
102
112
  case 3:
@@ -104,7 +114,6 @@ function lintProject(deps) {
104
114
  return [4 /*yield*/, datasource.readAttribute(key)];
105
115
  case 4:
106
116
  parsed = _e.sent();
107
- availableAttributeKeys.push(key);
108
117
  result = attributeZodSchema.safeParse(parsed);
109
118
  if (!result.success) {
110
119
  console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
@@ -127,14 +136,18 @@ function lintProject(deps) {
127
136
  case 7: return [4 /*yield*/, datasource.listSegments()];
128
137
  case 8:
129
138
  segments = _e.sent();
130
- console.log("\nLinting ".concat(segments.length, " segments...\n"));
131
- conditionsZodSchema = (0, conditionSchema_1.getConditionsZodSchema)(projectConfig, availableAttributeKeys);
139
+ conditionsZodSchema = (0, conditionSchema_1.getConditionsZodSchema)(projectConfig, attributes);
132
140
  segmentZodSchema = (0, segmentSchema_1.getSegmentZodSchema)(projectConfig, conditionsZodSchema);
133
- _a = 0, segments_1 = segments;
141
+ if (!(!options.entityType || options.entityType === "segment")) return [3 /*break*/, 14];
142
+ filteredKeys = !keyPattern ? segments : segments.filter(function (key) { return keyPattern.test(key); });
143
+ if (filteredKeys.length > 0) {
144
+ console.log("Linting ".concat(filteredKeys.length, " segments...\n"));
145
+ }
146
+ _a = 0, filteredKeys_2 = filteredKeys;
134
147
  _e.label = 9;
135
148
  case 9:
136
- if (!(_a < segments_1.length)) return [3 /*break*/, 14];
137
- key = segments_1[_a];
149
+ if (!(_a < filteredKeys_2.length)) return [3 /*break*/, 14];
150
+ key = filteredKeys_2[_a];
138
151
  fullPath = getFullPathFromKey("segment", key);
139
152
  _e.label = 10;
140
153
  case 10:
@@ -142,7 +155,6 @@ function lintProject(deps) {
142
155
  return [4 /*yield*/, datasource.readSegment(key)];
143
156
  case 11:
144
157
  parsed = _e.sent();
145
- availableSegmentKeys.push(key);
146
158
  result = segmentZodSchema.safeParse(parsed);
147
159
  if (!result.success) {
148
160
  console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
@@ -165,13 +177,17 @@ function lintProject(deps) {
165
177
  case 14: return [4 /*yield*/, datasource.listFeatures()];
166
178
  case 15:
167
179
  features = _e.sent();
168
- console.log("\nLinting ".concat(features.length, " features...\n"));
169
- featureZodSchema = (0, featureSchema_1.getFeatureZodSchema)(projectConfig, conditionsZodSchema, availableAttributeKeys, availableSegmentKeys, features);
170
- _b = 0, features_1 = features;
180
+ featureZodSchema = (0, featureSchema_1.getFeatureZodSchema)(projectConfig, conditionsZodSchema, attributes, segments, features);
181
+ if (!(!options.entityType || options.entityType === "feature")) return [3 /*break*/, 25];
182
+ filteredKeys = !keyPattern ? features : features.filter(function (key) { return keyPattern.test(key); });
183
+ if (filteredKeys.length > 0) {
184
+ console.log("Linting ".concat(filteredKeys.length, " features...\n"));
185
+ }
186
+ _b = 0, filteredKeys_3 = filteredKeys;
171
187
  _e.label = 16;
172
188
  case 16:
173
- if (!(_b < features_1.length)) return [3 /*break*/, 25];
174
- key = features_1[_b];
189
+ if (!(_b < filteredKeys_3.length)) return [3 /*break*/, 25];
190
+ key = filteredKeys_3[_b];
175
191
  fullPath = getFullPathFromKey("feature", key);
176
192
  parsed = void 0;
177
193
  _e.label = 17;
@@ -180,7 +196,6 @@ function lintProject(deps) {
180
196
  return [4 /*yield*/, datasource.readFeature(key)];
181
197
  case 18:
182
198
  parsed = _e.sent();
183
- availableFeatureKeys.push(key);
184
199
  result = featureZodSchema.safeParse(parsed);
185
200
  if (!result.success) {
186
201
  console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
@@ -218,13 +233,17 @@ function lintProject(deps) {
218
233
  case 25: return [4 /*yield*/, datasource.listGroups()];
219
234
  case 26:
220
235
  groups = _e.sent();
221
- console.log("\nLinting ".concat(groups.length, " groups...\n"));
222
- groupZodSchema = (0, groupSchema_1.getGroupZodSchema)(projectConfig, datasource, availableFeatureKeys);
223
- _c = 0, groups_1 = groups;
236
+ groupZodSchema = (0, groupSchema_1.getGroupZodSchema)(projectConfig, datasource, features);
237
+ if (!(!options.entityType || options.entityType === "group")) return [3 /*break*/, 36];
238
+ filteredKeys = !keyPattern ? groups : groups.filter(function (key) { return keyPattern.test(key); });
239
+ if (filteredKeys.length > 0) {
240
+ console.log("Linting ".concat(filteredKeys.length, " groups...\n"));
241
+ }
242
+ _c = 0, filteredKeys_4 = filteredKeys;
224
243
  _e.label = 27;
225
244
  case 27:
226
- if (!(_c < groups_1.length)) return [3 /*break*/, 36];
227
- key = groups_1[_c];
245
+ if (!(_c < filteredKeys_4.length)) return [3 /*break*/, 36];
246
+ key = filteredKeys_4[_c];
228
247
  fullPath = getFullPathFromKey("group", key);
229
248
  parsed = void 0;
230
249
  _e.label = 28;
@@ -254,7 +273,7 @@ function lintProject(deps) {
254
273
  _e.label = 32;
255
274
  case 32:
256
275
  _e.trys.push([32, 34, , 35]);
257
- return [4 /*yield*/, (0, checkPercentageExceedingSlot_1.checkForFeatureExceedingGroupSlotPercentage)(datasource, parsed, availableFeatureKeys)];
276
+ return [4 /*yield*/, (0, checkPercentageExceedingSlot_1.checkForFeatureExceedingGroupSlotPercentage)(datasource, parsed, features)];
258
277
  case 33:
259
278
  _e.sent();
260
279
  return [3 /*break*/, 35];
@@ -270,13 +289,17 @@ function lintProject(deps) {
270
289
  case 36: return [4 /*yield*/, datasource.listTests()];
271
290
  case 37:
272
291
  tests = _e.sent();
273
- console.log("\nLinting ".concat(tests.length, " tests...\n"));
274
- testsZodSchema = (0, testSchema_1.getTestsZodSchema)(projectConfig, availableFeatureKeys, availableSegmentKeys);
275
- _d = 0, tests_1 = tests;
292
+ testsZodSchema = (0, testSchema_1.getTestsZodSchema)(projectConfig, features, segments);
293
+ if (!(!options.entityType || options.entityType === "test")) return [3 /*break*/, 43];
294
+ filteredKeys = !keyPattern ? tests : tests.filter(function (key) { return keyPattern.test(key); });
295
+ if (filteredKeys.length > 0) {
296
+ console.log("Linting ".concat(filteredKeys.length, " tests...\n"));
297
+ }
298
+ _d = 0, filteredKeys_5 = filteredKeys;
276
299
  _e.label = 38;
277
300
  case 38:
278
- if (!(_d < tests_1.length)) return [3 /*break*/, 43];
279
- key = tests_1[_d];
301
+ if (!(_d < filteredKeys_5.length)) return [3 /*break*/, 43];
302
+ key = filteredKeys_5[_d];
280
303
  fullPath = getFullPathFromKey("test", key);
281
304
  _e.label = 39;
282
305
  case 39:
@@ -1 +1 @@
1
- {"version":3,"file":"lintProject.js","sourceRoot":"","sources":["../../src/linter/lintProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,2BAA6B;AAE7B,qDAA0D;AAC1D,qDAA2D;AAC3D,iDAAsD;AACtD,6CAAkD;AAClD,iDAAsD;AACtD,2CAAiD;AAEjD,qEAAiF;AACjF,+EAA6F;AAC7F,2CAA6C;AAE7C,iDAA2E;AAE3E,SAAsB,WAAW,CAAC,IAAkB;;QASlD,SAAS,kBAAkB,CAAC,IAAY,EAAE,GAAW,EAAE,QAAgB;YAAhB,yBAAA,EAAA,gBAAgB;YACrE,IAAM,QAAQ,GAAG,UAAG,GAAG,cAAI,UAAU,CAAC,YA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B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;oBAGhC,qBAAM,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAA;;oBAAvC,MAAM,GAAG,SAA8B;oBAEvC,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;oBAEhD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;wBACnB,OAAO,CAAC,GAAG,CAAC,gCAAoB,EAAE,QAAQ,CAAC,CAAC;wBAE5C,IAAI,OAAO,IAAI,MAAM,EAAE;4BACrB,IAAA,0BAAa,EAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4BAE5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBACjB;wBAED,QAAQ,GAAG,IAAI,CAAC;qBACjB;;;;oBAED,OAAO,CAAC,GAAG,CAAC,gCAAoB,EAAE,QAAQ,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;oBAEf,QAAQ,GAAG,IAAI,CAAC;;;oBAxBF,IAAY,CAAA;;yBA6BhC,sBAAO,QAAQ,EAAC;;;;CACjB;AAnRD,kCAmRC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/core",
3
- "version": "1.6.0",
3
+ "version": "1.7.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": "9d9a317843b028cc68ec0ff4ce060fe1404368d8"
60
+ "gitHead": "c258fe5fd1c1ea78798a37a0866e574f5a29afdc"
61
61
  }
@@ -14,15 +14,19 @@ import { printZodError } from "./printError";
14
14
  import { Dependencies } from "../dependencies";
15
15
  import { CLI_FORMAT_RED, CLI_FORMAT_UNDERLINE } from "../tester/cliFormat";
16
16
 
17
- export async function lintProject(deps: Dependencies): Promise<boolean> {
17
+ export interface LintProjectOptions {
18
+ keyPattern?: string;
19
+ entityType?: string;
20
+ }
21
+
22
+ export async function lintProject(
23
+ deps: Dependencies,
24
+ options: LintProjectOptions = {},
25
+ ): Promise<boolean> {
18
26
  const { projectConfig, datasource } = deps;
19
27
 
20
28
  let hasError = false;
21
29
 
22
- const availableAttributeKeys: string[] = [];
23
- const availableSegmentKeys: string[] = [];
24
- const availableFeatureKeys: string[] = [];
25
-
26
30
  function getFullPathFromKey(type: string, key: string, relative = false) {
27
31
  const fileName = `${key}.${datasource.getExtension()}`;
28
32
  let fullPath = "";
@@ -48,167 +52,197 @@ export async function lintProject(deps: Dependencies): Promise<boolean> {
48
52
  return fullPath;
49
53
  }
50
54
 
55
+ const keyPattern = options.keyPattern ? new RegExp(options.keyPattern) : null;
56
+
57
+ if (keyPattern) {
58
+ console.log("");
59
+ console.log(`Linting only keys matching pattern: ${keyPattern}`);
60
+ console.log("");
61
+ }
62
+
51
63
  // lint attributes
52
64
  const attributes = await datasource.listAttributes();
53
- console.log(`Linting ${attributes.length} attributes...\n`);
54
-
55
65
  const attributeZodSchema = getAttributeZodSchema();
56
66
 
57
- for (const key of attributes) {
58
- const fullPath = getFullPathFromKey("attribute", key);
67
+ if (!options.entityType || options.entityType === "attribute") {
68
+ const filteredKeys = !keyPattern
69
+ ? attributes
70
+ : attributes.filter((key) => keyPattern.test(key));
71
+
72
+ if (filteredKeys.length > 0) {
73
+ console.log(`Linting ${filteredKeys.length} attributes...\n`);
74
+ }
75
+
76
+ for (const key of filteredKeys) {
77
+ const fullPath = getFullPathFromKey("attribute", key);
59
78
 
60
- try {
61
- const parsed = await datasource.readAttribute(key);
62
- availableAttributeKeys.push(key);
79
+ try {
80
+ const parsed = await datasource.readAttribute(key);
63
81
 
64
- const result = attributeZodSchema.safeParse(parsed);
82
+ const result = attributeZodSchema.safeParse(parsed);
65
83
 
66
- if (!result.success) {
67
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
84
+ if (!result.success) {
85
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
68
86
 
69
- if ("error" in result) {
70
- printZodError(result.error);
87
+ if ("error" in result) {
88
+ printZodError(result.error);
89
+ }
90
+
91
+ hasError = true;
71
92
  }
93
+ } catch (e) {
94
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
95
+ console.log("");
96
+ console.log(e);
72
97
 
73
98
  hasError = true;
74
99
  }
75
- } catch (e) {
76
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
77
- console.log("");
78
- console.log(e);
79
-
80
- hasError = true;
81
100
  }
82
101
  }
83
102
 
84
103
  // lint segments
85
104
  const segments = await datasource.listSegments();
86
- console.log(`\nLinting ${segments.length} segments...\n`);
87
-
88
105
  const conditionsZodSchema = getConditionsZodSchema(
89
106
  projectConfig,
90
- availableAttributeKeys as [string, ...string[]],
107
+ attributes as [string, ...string[]],
91
108
  );
92
109
  const segmentZodSchema = getSegmentZodSchema(projectConfig, conditionsZodSchema);
93
110
 
94
- for (const key of segments) {
95
- const fullPath = getFullPathFromKey("segment", key);
111
+ if (!options.entityType || options.entityType === "segment") {
112
+ const filteredKeys = !keyPattern ? segments : segments.filter((key) => keyPattern.test(key));
96
113
 
97
- try {
98
- const parsed = await datasource.readSegment(key);
99
- availableSegmentKeys.push(key);
114
+ if (filteredKeys.length > 0) {
115
+ console.log(`Linting ${filteredKeys.length} segments...\n`);
116
+ }
100
117
 
101
- const result = segmentZodSchema.safeParse(parsed);
118
+ for (const key of filteredKeys) {
119
+ const fullPath = getFullPathFromKey("segment", key);
102
120
 
103
- if (!result.success) {
104
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
121
+ try {
122
+ const parsed = await datasource.readSegment(key);
105
123
 
106
- if ("error" in result) {
107
- printZodError(result.error);
124
+ const result = segmentZodSchema.safeParse(parsed);
125
+
126
+ if (!result.success) {
127
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
128
+
129
+ if ("error" in result) {
130
+ printZodError(result.error);
131
+ }
132
+
133
+ hasError = true;
108
134
  }
135
+ } catch (e) {
136
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
137
+ console.log("");
138
+ console.log(e);
109
139
 
110
140
  hasError = true;
111
141
  }
112
- } catch (e) {
113
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
114
- console.log("");
115
- console.log(e);
116
-
117
- hasError = true;
118
142
  }
119
143
  }
120
144
 
121
145
  // lint features
122
146
  const features = await datasource.listFeatures();
123
- console.log(`\nLinting ${features.length} features...\n`);
124
-
125
147
  const featureZodSchema = getFeatureZodSchema(
126
148
  projectConfig,
127
149
  conditionsZodSchema,
128
- availableAttributeKeys as [string, ...string[]],
129
- availableSegmentKeys as [string, ...string[]],
150
+ attributes as [string, ...string[]],
151
+ segments as [string, ...string[]],
130
152
  features as [string, ...string[]],
131
153
  );
132
154
 
133
- for (const key of features) {
134
- const fullPath = getFullPathFromKey("feature", key);
135
- let parsed;
155
+ if (!options.entityType || options.entityType === "feature") {
156
+ const filteredKeys = !keyPattern ? features : features.filter((key) => keyPattern.test(key));
136
157
 
137
- try {
138
- parsed = await datasource.readFeature(key);
139
- availableFeatureKeys.push(key);
158
+ if (filteredKeys.length > 0) {
159
+ console.log(`Linting ${filteredKeys.length} features...\n`);
160
+ }
140
161
 
141
- const result = featureZodSchema.safeParse(parsed);
162
+ for (const key of filteredKeys) {
163
+ const fullPath = getFullPathFromKey("feature", key);
164
+ let parsed;
142
165
 
143
- if (!result.success) {
144
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
166
+ try {
167
+ parsed = await datasource.readFeature(key);
145
168
 
146
- if ("error" in result) {
147
- printZodError(result.error);
148
- }
169
+ const result = featureZodSchema.safeParse(parsed);
149
170
 
150
- hasError = true;
151
- }
152
- } catch (e) {
153
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
154
- console.log("");
155
- console.log(e);
171
+ if (!result.success) {
172
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
156
173
 
157
- hasError = true;
158
- }
174
+ if ("error" in result) {
175
+ printZodError(result.error);
176
+ }
159
177
 
160
- if (parsed && parsed.required) {
161
- try {
162
- await checkForCircularDependencyInRequired(datasource, key, parsed.required);
178
+ hasError = true;
179
+ }
163
180
  } catch (e) {
164
181
  console.log(CLI_FORMAT_UNDERLINE, fullPath);
165
- console.log(CLI_FORMAT_RED, ` => Error: ${e.message}`);
182
+ console.log("");
183
+ console.log(e);
184
+
166
185
  hasError = true;
167
186
  }
187
+
188
+ if (parsed && parsed.required) {
189
+ try {
190
+ await checkForCircularDependencyInRequired(datasource, key, parsed.required);
191
+ } catch (e) {
192
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
193
+ console.log(CLI_FORMAT_RED, ` => Error: ${e.message}`);
194
+ hasError = true;
195
+ }
196
+ }
168
197
  }
169
198
  }
170
199
 
171
200
  // lint groups
172
201
  const groups = await datasource.listGroups();
173
- console.log(`\nLinting ${groups.length} groups...\n`);
202
+ const groupZodSchema = getGroupZodSchema(projectConfig, datasource, features);
174
203
 
175
- // @TODO: feature it slots can be from availableFeatureKeys only
176
- const groupZodSchema = getGroupZodSchema(projectConfig, datasource, availableFeatureKeys);
204
+ if (!options.entityType || options.entityType === "group") {
205
+ const filteredKeys = !keyPattern ? groups : groups.filter((key) => keyPattern.test(key));
177
206
 
178
- for (const key of groups) {
179
- const fullPath = getFullPathFromKey("group", key);
180
- let parsed;
181
-
182
- try {
183
- parsed = await datasource.readGroup(key);
207
+ if (filteredKeys.length > 0) {
208
+ console.log(`Linting ${filteredKeys.length} groups...\n`);
209
+ }
184
210
 
185
- const result = groupZodSchema.safeParse(parsed);
211
+ for (const key of filteredKeys) {
212
+ const fullPath = getFullPathFromKey("group", key);
213
+ let parsed;
186
214
 
187
- if (!result.success) {
188
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
215
+ try {
216
+ parsed = await datasource.readGroup(key);
189
217
 
190
- if ("error" in result) {
191
- printZodError(result.error);
192
- }
218
+ const result = groupZodSchema.safeParse(parsed);
193
219
 
194
- hasError = true;
195
- }
196
- } catch (e) {
197
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
198
- console.log("");
199
- console.log(e);
220
+ if (!result.success) {
221
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
200
222
 
201
- hasError = true;
202
- }
223
+ if ("error" in result) {
224
+ printZodError(result.error);
225
+ }
203
226
 
204
- if (parsed) {
205
- try {
206
- await checkForFeatureExceedingGroupSlotPercentage(datasource, parsed, availableFeatureKeys);
227
+ hasError = true;
228
+ }
207
229
  } catch (e) {
208
230
  console.log(CLI_FORMAT_UNDERLINE, fullPath);
209
- console.log(CLI_FORMAT_RED, ` => Error: ${e.message}`);
231
+ console.log("");
232
+ console.log(e);
233
+
210
234
  hasError = true;
211
235
  }
236
+
237
+ if (parsed) {
238
+ try {
239
+ await checkForFeatureExceedingGroupSlotPercentage(datasource, parsed, features);
240
+ } catch (e) {
241
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
242
+ console.log(CLI_FORMAT_RED, ` => Error: ${e.message}`);
243
+ hasError = true;
244
+ }
245
+ }
212
246
  }
213
247
  }
214
248
 
@@ -216,39 +250,46 @@ export async function lintProject(deps: Dependencies): Promise<boolean> {
216
250
 
217
251
  // lint tests
218
252
  const tests = await datasource.listTests();
219
- console.log(`\nLinting ${tests.length} tests...\n`);
220
253
 
221
254
  const testsZodSchema = getTestsZodSchema(
222
255
  projectConfig,
223
- availableFeatureKeys as [string, ...string[]],
224
- availableSegmentKeys as [string, ...string[]],
256
+ features as [string, ...string[]],
257
+ segments as [string, ...string[]],
225
258
  );
226
259
 
227
- for (const key of tests) {
228
- const fullPath = getFullPathFromKey("test", key);
260
+ if (!options.entityType || options.entityType === "test") {
261
+ const filteredKeys = !keyPattern ? tests : tests.filter((key) => keyPattern.test(key));
262
+
263
+ if (filteredKeys.length > 0) {
264
+ console.log(`Linting ${filteredKeys.length} tests...\n`);
265
+ }
266
+
267
+ for (const key of filteredKeys) {
268
+ const fullPath = getFullPathFromKey("test", key);
229
269
 
230
- try {
231
- const parsed = await datasource.readTest(key);
270
+ try {
271
+ const parsed = await datasource.readTest(key);
232
272
 
233
- const result = testsZodSchema.safeParse(parsed);
273
+ const result = testsZodSchema.safeParse(parsed);
234
274
 
235
- if (!result.success) {
236
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
275
+ if (!result.success) {
276
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
237
277
 
238
- if ("error" in result) {
239
- printZodError(result.error);
278
+ if ("error" in result) {
279
+ printZodError(result.error);
240
280
 
241
- process.exit(1);
281
+ process.exit(1);
282
+ }
283
+
284
+ hasError = true;
242
285
  }
286
+ } catch (e) {
287
+ console.log(CLI_FORMAT_UNDERLINE, fullPath);
288
+ console.log("");
289
+ console.log(e);
243
290
 
244
291
  hasError = true;
245
292
  }
246
- } catch (e) {
247
- console.log(CLI_FORMAT_UNDERLINE, fullPath);
248
- console.log("");
249
- console.log(e);
250
-
251
- hasError = true;
252
293
  }
253
294
  }
254
295