@featurevisor/core 0.53.4 → 0.53.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -1
- package/CHANGELOG.md +8 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
- package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
- package/coverage/lcov-report/src/builder/index.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
- package/lib/builder/buildProject.d.ts +2 -1
- package/lib/builder/buildProject.js +3 -4
- package/lib/builder/buildProject.js.map +1 -1
- package/lib/dependencies.d.ts +11 -0
- package/lib/dependencies.js +3 -0
- package/lib/dependencies.js.map +1 -0
- package/lib/find-duplicate-segments/index.d.ts +2 -2
- package/lib/find-duplicate-segments/index.js +2 -3
- package/lib/find-duplicate-segments/index.js.map +1 -1
- package/lib/generate-code/index.d.ts +2 -2
- package/lib/generate-code/index.js +4 -5
- package/lib/generate-code/index.js.map +1 -1
- package/lib/generate-code/typescript.d.ts +2 -3
- package/lib/generate-code/typescript.js +3 -2
- package/lib/generate-code/typescript.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/linter/lintProject.d.ts +2 -2
- package/lib/linter/lintProject.js +3 -4
- package/lib/linter/lintProject.js.map +1 -1
- package/lib/restore.d.ts +2 -2
- package/lib/restore.js +3 -2
- package/lib/restore.js.map +1 -1
- package/lib/site/exportSite.d.ts +2 -2
- package/lib/site/exportSite.js +4 -3
- package/lib/site/exportSite.js.map +1 -1
- package/lib/site/generateSiteSearchIndex.d.ts +2 -2
- package/lib/site/generateSiteSearchIndex.js +3 -4
- package/lib/site/generateSiteSearchIndex.js.map +1 -1
- package/lib/site/serveSite.d.ts +2 -2
- package/lib/site/serveSite.js +2 -2
- package/lib/site/serveSite.js.map +1 -1
- package/lib/tester/testProject.d.ts +2 -2
- package/lib/tester/testProject.js +3 -4
- package/lib/tester/testProject.js.map +1 -1
- package/package.json +2 -2
- package/src/builder/buildProject.ts +4 -7
- package/src/dependencies.ts +13 -0
- package/src/find-duplicate-segments/index.ts +3 -8
- package/src/generate-code/index.ts +5 -12
- package/src/generate-code/typescript.ts +4 -8
- package/src/index.ts +2 -0
- package/src/linter/lintProject.ts +4 -5
- package/src/restore.ts +4 -2
- package/src/site/exportSite.ts +5 -9
- package/src/site/generateSiteSearchIndex.ts +4 -5
- package/src/site/serveSite.ts +4 -6
- package/src/tester/testProject.ts +4 -8
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.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/parsers.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/init.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printJoiError.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils.ts":"46"},{"size":3214,"mtime":1697562075731,"results":"47","hashOfConfig":"48"},{"size":1014,"mtime":1697562075731,"results":"49","hashOfConfig":"48"},{"size":8280,"mtime":1697562075731,"results":"50","hashOfConfig":"48"},{"size":2248,"mtime":1697562075731,"results":"51","hashOfConfig":"48"},{"size":1755,"mtime":1697562075731,"results":"52","hashOfConfig":"48"},{"size":65,"mtime":1697562075731,"results":"53","hashOfConfig":"48"},{"size":12889,"mtime":1697562075731,"results":"54","hashOfConfig":"48"},{"size":4799,"mtime":1697562075731,"results":"55","hashOfConfig":"48"},{"size":2966,"mtime":1697562075731,"results":"56","hashOfConfig":"48"},{"size":5754,"mtime":1697562075731,"results":"57","hashOfConfig":"48"},{"size":57,"mtime":1697562075731,"results":"58","hashOfConfig":"48"},{"size":641,"mtime":1697562075731,"results":"59","hashOfConfig":"48"},{"size":1033,"mtime":1697562075731,"results":"60","hashOfConfig":"48"},{"size":637,"mtime":1697562075731,"results":"61","hashOfConfig":"48"},{"size":1631,"mtime":1697562075731,"results":"62","hashOfConfig":"48"},{"size":6310,"mtime":1697562075731,"results":"63","hashOfConfig":"48"},{"size":256,"mtime":1697562075731,"results":"64","hashOfConfig":"48"},{"size":1308,"mtime":1697562075731,"results":"65","hashOfConfig":"48"},{"size":341,"mtime":1697562075731,"results":"66","hashOfConfig":"48"},{"size":1130,"mtime":1697562075731,"results":"67","hashOfConfig":"48"},{"size":3003,"mtime":1697562075731,"results":"68","hashOfConfig":"48"},{"size":5782,"mtime":1697562075731,"results":"69","hashOfConfig":"48"},{"size":2103,"mtime":1697562075731,"results":"70","hashOfConfig":"48"},{"size":31,"mtime":1697562075731,"results":"71","hashOfConfig":"48"},{"size":4431,"mtime":1697562075731,"results":"72","hashOfConfig":"48"},{"size":323,"mtime":1697562075731,"results":"73","hashOfConfig":"48"},{"size":368,"mtime":1697562075731,"results":"74","hashOfConfig":"48"},{"size":1248,"mtime":1697562075731,"results":"75","hashOfConfig":"48"},{"size":610,"mtime":1697562075731,"results":"76","hashOfConfig":"48"},{"size":1752,"mtime":1697562075731,"results":"77","hashOfConfig":"48"},{"size":2808,"mtime":1697562075731,"results":"78","hashOfConfig":"48"},{"size":6250,"mtime":1697562075731,"results":"79","hashOfConfig":"48"},{"size":516,"mtime":1697562075731,"results":"80","hashOfConfig":"48"},{"size":496,"mtime":1697562075731,"results":"81","hashOfConfig":"48"},{"size":607,"mtime":1697562075731,"results":"82","hashOfConfig":"48"},{"size":1560,"mtime":1697562075731,"results":"83","hashOfConfig":"48"},{"size":59,"mtime":1697562075731,"results":"84","hashOfConfig":"48"},{"size":1697,"mtime":1697562075731,"results":"85","hashOfConfig":"48"},{"size":298,"mtime":1697562075731,"results":"86","hashOfConfig":"48"},{"size":365,"mtime":1697562075731,"results":"87","hashOfConfig":"48"},{"size":156,"mtime":1697562075731,"results":"88","hashOfConfig":"48"},{"size":31,"mtime":1697562075731,"results":"89","hashOfConfig":"48"},{"size":3624,"mtime":1697562075731,"results":"90","hashOfConfig":"48"},{"size":2026,"mtime":1697562075731,"results":"91","hashOfConfig":"48"},{"size":1326,"mtime":1697562075731,"results":"92","hashOfConfig":"48"},{"size":1676,"mtime":1697562075731,"results":"93","hashOfConfig":"48"},{"filePath":"94","messages":"95","suppressedMessages":"96","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"u5hm5o",{"filePath":"97","messages":"98","suppressedMessages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"100","messages":"101","suppressedMessages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","suppressedMessages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","suppressedMessages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","suppressedMessages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","suppressedMessages":"114","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","suppressedMessages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/parsers.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",[],["232"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init.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/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/printJoiError.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.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.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/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.ts",[],[],{"ruleId":"233","severity":2,"message":"234","line":52,"column":10,"nodeType":"235","messageId":"236","endLine":52,"endColumn":38,"suppressions":"237"},"@typescript-eslint/no-unused-vars","'getFeaturevisorTypeFromValue' is defined but never used.","Identifier","unusedVar",["238"],{"kind":"239","justification":"240"},"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.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/parsers.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/init.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printJoiError.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils.ts":"47"},{"size":3214,"mtime":1697565139743,"results":"48","hashOfConfig":"49"},{"size":1014,"mtime":1697565139743,"results":"50","hashOfConfig":"49"},{"size":8280,"mtime":1697565139743,"results":"51","hashOfConfig":"49"},{"size":2228,"mtime":1697565139743,"results":"52","hashOfConfig":"49"},{"size":1755,"mtime":1697565139743,"results":"53","hashOfConfig":"49"},{"size":65,"mtime":1697565139743,"results":"54","hashOfConfig":"49"},{"size":12889,"mtime":1697565139743,"results":"55","hashOfConfig":"49"},{"size":4799,"mtime":1697565139743,"results":"56","hashOfConfig":"49"},{"size":2966,"mtime":1697565139743,"results":"57","hashOfConfig":"49"},{"size":5754,"mtime":1697565139743,"results":"58","hashOfConfig":"49"},{"size":57,"mtime":1697565139743,"results":"59","hashOfConfig":"49"},{"size":641,"mtime":1697565139743,"results":"60","hashOfConfig":"49"},{"size":279,"mtime":1697565139743,"results":"61","hashOfConfig":"49"},{"size":1033,"mtime":1697565139743,"results":"62","hashOfConfig":"49"},{"size":540,"mtime":1697565139743,"results":"63","hashOfConfig":"49"},{"size":1476,"mtime":1697565139743,"results":"64","hashOfConfig":"49"},{"size":6250,"mtime":1697565139743,"results":"65","hashOfConfig":"49"},{"size":318,"mtime":1697565139743,"results":"66","hashOfConfig":"49"},{"size":1308,"mtime":1697565139743,"results":"67","hashOfConfig":"49"},{"size":341,"mtime":1697565139743,"results":"68","hashOfConfig":"49"},{"size":1130,"mtime":1697565139743,"results":"69","hashOfConfig":"49"},{"size":3003,"mtime":1697565139743,"results":"70","hashOfConfig":"49"},{"size":5782,"mtime":1697565139743,"results":"71","hashOfConfig":"49"},{"size":2103,"mtime":1697565139743,"results":"72","hashOfConfig":"49"},{"size":31,"mtime":1697565139743,"results":"73","hashOfConfig":"49"},{"size":4376,"mtime":1697565139743,"results":"74","hashOfConfig":"49"},{"size":323,"mtime":1697565139743,"results":"75","hashOfConfig":"49"},{"size":368,"mtime":1697565139743,"results":"76","hashOfConfig":"49"},{"size":1248,"mtime":1697565139743,"results":"77","hashOfConfig":"49"},{"size":640,"mtime":1697565139743,"results":"78","hashOfConfig":"49"},{"size":1724,"mtime":1697565139743,"results":"79","hashOfConfig":"49"},{"size":2808,"mtime":1697565139743,"results":"80","hashOfConfig":"49"},{"size":6186,"mtime":1697565139743,"results":"81","hashOfConfig":"49"},{"size":516,"mtime":1697565139743,"results":"82","hashOfConfig":"49"},{"size":496,"mtime":1697565139743,"results":"83","hashOfConfig":"49"},{"size":607,"mtime":1697565139743,"results":"84","hashOfConfig":"49"},{"size":1560,"mtime":1697565139743,"results":"85","hashOfConfig":"49"},{"size":59,"mtime":1697565139743,"results":"86","hashOfConfig":"49"},{"size":1681,"mtime":1697565139743,"results":"87","hashOfConfig":"49"},{"size":298,"mtime":1697565139743,"results":"88","hashOfConfig":"49"},{"size":365,"mtime":1697565139743,"results":"89","hashOfConfig":"49"},{"size":156,"mtime":1697565139743,"results":"90","hashOfConfig":"49"},{"size":31,"mtime":1697565139743,"results":"91","hashOfConfig":"49"},{"size":3624,"mtime":1697565139743,"results":"92","hashOfConfig":"49"},{"size":1956,"mtime":1697565139743,"results":"93","hashOfConfig":"49"},{"size":1326,"mtime":1697565139743,"results":"94","hashOfConfig":"49"},{"size":1676,"mtime":1697565139743,"results":"95","hashOfConfig":"49"},{"filePath":"96","messages":"97","suppressedMessages":"98","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"u5hm5o",{"filePath":"99","messages":"100","suppressedMessages":"101","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"102","messages":"103","suppressedMessages":"104","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"105","messages":"106","suppressedMessages":"107","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"108","messages":"109","suppressedMessages":"110","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"111","messages":"112","suppressedMessages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","suppressedMessages":"116","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","suppressedMessages":"119","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","suppressedMessages":"122","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"123","messages":"124","suppressedMessages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","suppressedMessages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/parsers.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",[],["237"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init.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/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/printJoiError.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.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.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/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.ts",[],[],{"ruleId":"238","severity":2,"message":"239","line":51,"column":10,"nodeType":"240","messageId":"241","endLine":51,"endColumn":38,"suppressions":"242"},"@typescript-eslint/no-unused-vars","'getFeaturevisorTypeFromValue' is defined but never used.","Identifier","unusedVar",["243"],{"kind":"244","justification":"245"},"directive",""]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [0.53.5](https://github.com/featurevisor/featurevisor/compare/v0.53.4...v0.53.5) (2023-10-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @featurevisor/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.53.4](https://github.com/featurevisor/featurevisor/compare/v0.53.3...v0.53.4) (2023-10-17)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @featurevisor/core
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1697565318506" clover="3.2.0">
|
|
3
|
+
<project timestamp="1697565318506" name="All files">
|
|
4
4
|
<metrics statements="173" coveredstatements="165" conditionals="86" coveredconditionals="70" methods="28" coveredmethods="28" elements="287" coveredelements="263" complexity="0" loc="173" ncloc="173" packages="2" files="4" classes="4"/>
|
|
5
5
|
<package name="lib.builder">
|
|
6
6
|
<metrics statements="90" coveredstatements="86" conditionals="48" coveredconditionals="39" methods="14" coveredmethods="14"/>
|
|
@@ -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 2023-10-17T17:
|
|
119
|
+
at 2023-10-17T17:55:18.486Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="prettify.js"></script>
|
|
122
122
|
<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 2023-10-17T17:
|
|
178
|
+
at 2023-10-17T17:55:18.486Z
|
|
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 2023-10-17T17:
|
|
119
|
+
at 2023-10-17T17:55:18.486Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -442,7 +442,7 @@ exports.getTraffic = getTraffic;
|
|
|
442
442
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
443
443
|
Code coverage generated by
|
|
444
444
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
445
|
-
at 2023-10-17T17:
|
|
445
|
+
at 2023-10-17T17:55:18.486Z
|
|
446
446
|
</div>
|
|
447
447
|
<script src="../../prettify.js"></script>
|
|
448
448
|
<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 2023-10-17T17:
|
|
196
|
+
at 2023-10-17T17:55:18.486Z
|
|
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 2023-10-17T17:
|
|
119
|
+
at 2023-10-17T17:55:18.486Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -553,7 +553,7 @@ export function getTraffic(
|
|
|
553
553
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
554
554
|
Code coverage generated by
|
|
555
555
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
556
|
-
at 2023-10-17T17:
|
|
556
|
+
at 2023-10-17T17:55:18.486Z
|
|
557
557
|
</div>
|
|
558
558
|
<script src="../../prettify.js"></script>
|
|
559
559
|
<script>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnvironmentKey } from "@featurevisor/types";
|
|
2
2
|
import { ProjectConfig } from "../config";
|
|
3
|
+
import { Dependencies } from "../dependencies";
|
|
3
4
|
export declare function getDatafilePath(projectConfig: ProjectConfig, environment: EnvironmentKey, tag: string): string;
|
|
4
5
|
export interface BuildCLIOptions {
|
|
5
6
|
revision?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function buildProject(
|
|
8
|
+
export declare function buildProject(deps: Dependencies, cliOptions?: BuildCLIOptions): Promise<void>;
|
|
@@ -41,24 +41,23 @@ var fs = require("fs");
|
|
|
41
41
|
var path = require("path");
|
|
42
42
|
var mkdirp = require("mkdirp");
|
|
43
43
|
var config_1 = require("../config");
|
|
44
|
-
var datasource_1 = require("../datasource");
|
|
45
44
|
var buildDatafile_1 = require("./buildDatafile");
|
|
46
45
|
function getDatafilePath(projectConfig, environment, tag) {
|
|
47
46
|
var fileName = "datafile-tag-".concat(tag, ".json");
|
|
48
47
|
return path.join(projectConfig.outputDirectoryPath, environment, fileName);
|
|
49
48
|
}
|
|
50
49
|
exports.getDatafilePath = getDatafilePath;
|
|
51
|
-
function buildProject(
|
|
50
|
+
function buildProject(deps, cliOptions) {
|
|
52
51
|
if (cliOptions === void 0) { cliOptions = {}; }
|
|
53
52
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
var tags, environments, pkg,
|
|
53
|
+
var rootDirectoryPath, projectConfig, datasource, tags, environments, pkg, _i, environments_1, environment, existingState, _a, tags_1, tag, datafileContent, outputEnvironmentDirPath, outputFilePath, shortPath;
|
|
55
54
|
return __generator(this, function (_b) {
|
|
56
55
|
switch (_b.label) {
|
|
57
56
|
case 0:
|
|
57
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig, datasource = deps.datasource;
|
|
58
58
|
tags = projectConfig.tags;
|
|
59
59
|
environments = projectConfig.environments;
|
|
60
60
|
pkg = require(path.join(rootDirectoryPath, "package.json"));
|
|
61
|
-
datasource = new datasource_1.Datasource(projectConfig);
|
|
62
61
|
_i = 0, environments_1 = environments;
|
|
63
62
|
_b.label = 1;
|
|
64
63
|
case 1:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildProject.js","sourceRoot":"","sources":["../../src/builder/buildProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;AAIjC,oCAA0D;
|
|
1
|
+
{"version":3,"file":"buildProject.js","sourceRoot":"","sources":["../../src/builder/buildProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;AAIjC,oCAA0D;AAE1D,iDAAgD;AAGhD,SAAgB,eAAe,CAC7B,aAA4B,EAC5B,WAA2B,EAC3B,GAAW;IAEX,IAAM,QAAQ,GAAG,uBAAgB,GAAG,UAAO,CAAC;IAE5C,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,mBAAmB,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC7E,CAAC;AARD,0CAQC;AAMD,SAAsB,YAAY,CAAC,IAAkB,EAAE,UAAgC;IAAhC,2BAAA,EAAA,eAAgC;;;;;;oBAC7E,iBAAiB,GAAgC,IAAI,kBAApC,EAAE,aAAa,GAAiB,IAAI,cAArB,EAAE,UAAU,GAAK,IAAI,WAAT,CAAU;oBAExD,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;oBAC1B,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC;oBAE1C,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAi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IAAI,CAAA;;;gBA6BtB,8BAA8B;gBAC9B,qBAAM,UAAU,CAAC,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC,EAAA;;oBADvD,8BAA8B;oBAC9B,SAAuD,CAAC;;;oBAnChC,IAAY,CAAA;;;;;;CAqCvC;AA7CD,oCA6CC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProjectConfig } from "./config";
|
|
2
|
+
import { Datasource } from "./datasource";
|
|
3
|
+
export interface Options {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface Dependencies {
|
|
7
|
+
rootDirectoryPath: string;
|
|
8
|
+
projectConfig: ProjectConfig;
|
|
9
|
+
datasource: Datasource;
|
|
10
|
+
options: Options;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function findDuplicateSegmentsInProject(
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function findDuplicateSegmentsInProject(deps: Dependencies): Promise<void>;
|
|
@@ -37,15 +37,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.findDuplicateSegmentsInProject = void 0;
|
|
40
|
-
var datasource_1 = require("../datasource");
|
|
41
40
|
var findDuplicateSegments_1 = require("./findDuplicateSegments");
|
|
42
|
-
function findDuplicateSegmentsInProject(
|
|
41
|
+
function findDuplicateSegmentsInProject(deps) {
|
|
43
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
43
|
var datasource, duplicates;
|
|
45
44
|
return __generator(this, function (_a) {
|
|
46
45
|
switch (_a.label) {
|
|
47
46
|
case 0:
|
|
48
|
-
datasource =
|
|
47
|
+
datasource = deps.datasource;
|
|
49
48
|
return [4 /*yield*/, (0, findDuplicateSegments_1.findDuplicateSegments)(datasource)];
|
|
50
49
|
case 1:
|
|
51
50
|
duplicates = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/find-duplicate-segments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAgE;AAGhE,SAAsB,8BAA8B,CAAC,IAAkB;;;;;;oBAC7D,UAAU,GAAK,IAAI,WAAT,CAAU;oBAET,qBAAM,IAAA,6CAAqB,EAAC,UAAU,CAAC,EAAA;;oBAApD,UAAU,GAAG,SAAuC;oBAE1D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC3B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;wBAC3C,sBAAO;qBACR;oBAED,OAAO,CAAC,GAAG,CAAC,gBAAS,UAAU,CAAC,MAAM,mBAAgB,CAAC,CAAC;oBAExD,UAAU,CAAC,OAAO,CAAC,UAAC,WAAW;wBAC7B,OAAO,CAAC,GAAG,CAAC,cAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC;oBAC/C,CAAC,CAAC,CAAC;;;;;CACJ;AAfD,wEAeC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
2
|
export declare const ALLOWED_LANGUAGES_FOR_CODE_GENERATION: string[];
|
|
3
3
|
export interface GenerateCodeCLIOptions {
|
|
4
4
|
language: string;
|
|
5
5
|
outDir: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function generateCodeForProject(
|
|
7
|
+
export declare function generateCodeForProject(deps: Dependencies, cliOptions: GenerateCodeCLIOptions): Promise<void>;
|
|
@@ -40,22 +40,21 @@ exports.generateCodeForProject = exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION =
|
|
|
40
40
|
var fs = require("fs");
|
|
41
41
|
var path = require("path");
|
|
42
42
|
var mkdirp = require("mkdirp");
|
|
43
|
-
var datasource_1 = require("../datasource");
|
|
44
43
|
var typescript_1 = require("./typescript");
|
|
45
44
|
exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION = ["typescript"];
|
|
46
|
-
function generateCodeForProject(
|
|
45
|
+
function generateCodeForProject(deps, cliOptions) {
|
|
47
46
|
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var
|
|
47
|
+
var rootDirectoryPath, absolutePath;
|
|
49
48
|
return __generator(this, function (_a) {
|
|
50
49
|
switch (_a.label) {
|
|
51
50
|
case 0:
|
|
51
|
+
rootDirectoryPath = deps.rootDirectoryPath;
|
|
52
52
|
if (!cliOptions.language) {
|
|
53
53
|
throw new Error("Option `--language` is required");
|
|
54
54
|
}
|
|
55
55
|
if (!cliOptions.outDir) {
|
|
56
56
|
throw new Error("Option `--out-dir` is required");
|
|
57
57
|
}
|
|
58
|
-
datasource = new datasource_1.Datasource(projectConfig);
|
|
59
58
|
absolutePath = path.resolve(rootDirectoryPath, cliOptions.outDir);
|
|
60
59
|
if (!fs.existsSync(absolutePath)) {
|
|
61
60
|
console.log("Creating output directory: ".concat(absolutePath));
|
|
@@ -69,7 +68,7 @@ function generateCodeForProject(rootDirectoryPath, projectConfig, cliOptions) {
|
|
|
69
68
|
throw new Error("Language ".concat(cliOptions.language, " is not supported for code generation"));
|
|
70
69
|
}
|
|
71
70
|
if (!(cliOptions.language === "typescript")) return [3 /*break*/, 2];
|
|
72
|
-
return [4 /*yield*/, (0, typescript_1.generateTypeScriptCodeForProject)(
|
|
71
|
+
return [4 /*yield*/, (0, typescript_1.generateTypeScriptCodeForProject)(deps, absolutePath)];
|
|
73
72
|
case 1: return [2 /*return*/, _a.sent()];
|
|
74
73
|
case 2: throw new Error("Language ".concat(cliOptions.language, " is not supported"));
|
|
75
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate-code/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate-code/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;AAEjC,2CAAgE;AAGnD,QAAA,qCAAqC,GAAG,CAAC,YAAY,CAAC,CAAC;AAOpE,SAAsB,sBAAsB,CAC1C,IAAkB,EAClB,UAAkC;;;;;;oBAE1B,iBAAiB,GAAK,IAAI,kBAAT,CAAU;oBAEnC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;wBACxB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;qBACpD;oBAED,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;wBACtB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;qBACnD;oBAEK,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;oBAExE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;wBAChC,OAAO,CAAC,GAAG,CAAC,qCAA8B,YAAY,CAAE,CAAC,CAAC;wBAC1D,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;qBAC3B;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,8CAAuC,YAAY,CAAE,CAAC,CAAC;qBACpE;oBAED,IAAI,CAAC,6CAAqC,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;wBACxE,OAAO,CAAC,GAAG,CACT,8CAAuC,6CAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAC1F,CAAC;wBAEF,MAAM,IAAI,KAAK,CAAC,mBAAY,UAAU,CAAC,QAAQ,0CAAuC,CAAC,CAAC;qBACzF;yBAEG,CAAA,UAAU,CAAC,QAAQ,KAAK,YAAY,CAAA,EAApC,wBAAoC;oBAC/B,qBAAM,IAAA,6CAAgC,EAAC,IAAI,EAAE,YAAY,CAAC,EAAA;wBAAjE,sBAAO,SAA0D,EAAC;wBAGpE,MAAM,IAAI,KAAK,CAAC,mBAAY,UAAU,CAAC,QAAQ,sBAAmB,CAAC,CAAC;;;;CACrE;AApCD,wDAoCC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function generateTypeScriptCodeForProject(rootDirectoryPath: string, projectConfig: ProjectConfig, datasource: Datasource, outputPath: string): Promise<void>;
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function generateTypeScriptCodeForProject(deps: Dependencies, outputPath: string): Promise<void>;
|
|
@@ -95,12 +95,13 @@ function getFeaturevisorTypeFromValue(value) {
|
|
|
95
95
|
throw new Error("Could not detect Featurevisor type from value");
|
|
96
96
|
}
|
|
97
97
|
var instanceSnippet = "\nimport { FeaturevisorInstance } from \"@featurevisor/sdk\";\n\nlet _instance: FeaturevisorInstance;\n\nexport function setInstance(instance: FeaturevisorInstance) {\n _instance = instance;\n}\n\nexport function getInstance(): FeaturevisorInstance {\n return _instance as FeaturevisorInstance;\n}\n".trimStart();
|
|
98
|
-
function generateTypeScriptCodeForProject(
|
|
98
|
+
function generateTypeScriptCodeForProject(deps, outputPath) {
|
|
99
99
|
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var instanceFilePath, attributeFiles, attributes, _i, attributeFiles_1, attributeKey, parsedAttribute, attributeProperties, contextContent, contextTypeFilePath, featureNamespaces, featureFiles, _a, featureFiles_1, featureKey, parsedFeature, namespaceValue, variableMethods, _b, _c, variableSchema, variableKey, variableType, internalMethodName, featureContent, featureNamespaceFilePath, indexContent, indexFilePath;
|
|
100
|
+
var rootDirectoryPath, datasource, instanceFilePath, attributeFiles, attributes, _i, attributeFiles_1, attributeKey, parsedAttribute, attributeProperties, contextContent, contextTypeFilePath, featureNamespaces, featureFiles, _a, featureFiles_1, featureKey, parsedFeature, namespaceValue, variableMethods, _b, _c, variableSchema, variableKey, variableType, internalMethodName, featureContent, featureNamespaceFilePath, indexContent, indexFilePath;
|
|
101
101
|
return __generator(this, function (_d) {
|
|
102
102
|
switch (_d.label) {
|
|
103
103
|
case 0:
|
|
104
|
+
rootDirectoryPath = deps.rootDirectoryPath, datasource = deps.datasource;
|
|
104
105
|
console.log("\nGenerating TypeScript code...\n");
|
|
105
106
|
instanceFilePath = path.join(outputPath, "instance.ts");
|
|
106
107
|
fs.writeFileSync(instanceFilePath, instanceSnippet);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/generate-code/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/generate-code/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAK7B,SAAS,uCAAuC,CAAC,gBAAwB;IACvE,QAAQ,gBAAgB,EAAE;QACxB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,MAAM;YACT,OAAO,eAAe,CAAC;QACzB,KAAK,OAAO;YACV,OAAO,U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ID,4EAkIC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -23,4 +23,6 @@ __exportStar(require("./site"), exports);
|
|
|
23
23
|
__exportStar(require("./generate-code"), exports);
|
|
24
24
|
__exportStar(require("./restore"), exports);
|
|
25
25
|
__exportStar(require("./find-duplicate-segments"), exports);
|
|
26
|
+
__exportStar(require("./dependencies"), exports);
|
|
27
|
+
__exportStar(require("./datasource"), exports);
|
|
26
28
|
//# 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"}
|
|
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,iDAA+B;AAC/B,+CAA6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function lintProject(
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function lintProject(deps: Dependencies): Promise<boolean>;
|
|
@@ -39,7 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.lintProject = void 0;
|
|
40
40
|
// for use in node only
|
|
41
41
|
var Joi = require("joi");
|
|
42
|
-
var datasource_1 = require("../datasource");
|
|
43
42
|
var attributeSchema_1 = require("./attributeSchema");
|
|
44
43
|
var conditionSchema_1 = require("./conditionSchema");
|
|
45
44
|
var segmentSchema_1 = require("./segmentSchema");
|
|
@@ -48,14 +47,14 @@ var featureSchema_1 = require("./featureSchema");
|
|
|
48
47
|
var testSchema_1 = require("./testSchema");
|
|
49
48
|
var checkCircularDependency_1 = require("./checkCircularDependency");
|
|
50
49
|
var printJoiError_1 = require("./printJoiError");
|
|
51
|
-
function lintProject(
|
|
50
|
+
function lintProject(deps) {
|
|
52
51
|
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
var
|
|
52
|
+
var projectConfig, datasource, hasError, availableAttributeKeys, availableSegmentKeys, availableFeatureKeys, attributes, attributeJoiSchema, _i, attributes_1, key, parsed, e_1, segments, conditionsJoiSchema, segmentJoiSchema, _a, segments_1, key, parsed, e_2, features, featureJoiSchema, _b, features_1, key, parsed, e_3, e_4, groups, groupJoiSchema, _c, groups_1, key, parsed, e_5, tests, testsJoiSchema, _d, tests_1, key, parsed, e_6;
|
|
54
53
|
return __generator(this, function (_e) {
|
|
55
54
|
switch (_e.label) {
|
|
56
55
|
case 0:
|
|
56
|
+
projectConfig = deps.projectConfig, datasource = deps.datasource;
|
|
57
57
|
hasError = false;
|
|
58
|
-
datasource = new datasource_1.Datasource(projectConfig);
|
|
59
58
|
availableAttributeKeys = [];
|
|
60
59
|
availableSegmentKeys = [];
|
|
61
60
|
availableFeatureKeys = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lintProject.js","sourceRoot":"","sources":["../../src/linter/lintProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,yBAA2B;AAE3B,
|
|
1
|
+
{"version":3,"file":"lintProject.js","sourceRoot":"","sources":["../../src/linter/lintProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,yBAA2B;AAE3B,qDAA0D;AAC1D,qDAA2D;AAC3D,iDAAsD;AACtD,6CAAkD;AAClD,iDAAsD;AACtD,2CAAiD;A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AAa,EAAC,GAAC,CAAC,CAAC;qBAClB;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;qBAChB;oBAED,QAAQ,GAAG,IAAI,CAAC;;;oBAdF,IAAM,CAAA;;yBAqBV,qBAAM,UAAU,CAAC,SAAS,EAAE,EAAA;;oBAApC,KAAK,GAAG,SAA4B;oBAC1C,OAAO,CAAC,GAAG,CAAC,oBAAa,KAAK,CAAC,MAAM,gBAAa,CAAC,CAAC;oBAE9C,cAAc,GAAG,IAAA,8BAAiB,EACtC,aAAa,EACb,oBAAoB,EACpB,oBAAoB,CACrB,CAAC;0BAEqB,EAAL,eAAK;;;yBAAL,CAAA,mBAAK,CAAA;oBAAZ,GAAG;oBACG,qBAAM,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAA;;oBAAvC,MAAM,GAAG,SAA8B;;;;oBAG3C,qBAAM,cAAc,CAAC,aAAa,CAAC,MAAM,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;;;;oBAE3C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;oBAEzB,IAAI,GAAC,YAAY,GAAG,CAAC,eAAe,EAAE;wBACpC,IAAA,6BAAa,EAAC,GAAC,CAAC,CAAC;qBAClB;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;qBAChB;oBAED,QAAQ,GAAG,IAAI,CAAC;;;oBAdF,IAAK,CAAA;;yBAkBvB,sBAAO,QAAQ,EAAC;;;;CACjB;AA5JD,kCA4JC"}
|
package/lib/restore.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function restoreProject(
|
|
1
|
+
import { Dependencies } from "./dependencies";
|
|
2
|
+
export declare function restoreProject(deps: Dependencies): Promise<void>;
|
package/lib/restore.js
CHANGED
|
@@ -39,10 +39,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.restoreProject = void 0;
|
|
40
40
|
var path = require("path");
|
|
41
41
|
var child_process_1 = require("child_process");
|
|
42
|
-
function restoreProject(
|
|
42
|
+
function restoreProject(deps) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
-
var relativeStateDirPath, cmd;
|
|
44
|
+
var rootDirectoryPath, projectConfig, relativeStateDirPath, cmd;
|
|
45
45
|
return __generator(this, function (_a) {
|
|
46
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig;
|
|
46
47
|
relativeStateDirPath = path.relative(rootDirectoryPath, projectConfig.stateDirectoryPath);
|
|
47
48
|
cmd = "git checkout -- ".concat(relativeStateDirPath).concat(path.sep);
|
|
48
49
|
try {
|
package/lib/restore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,+CAAyC;AAIzC,SAAsB,cAAc,CAAC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,+CAAyC;AAIzC,SAAsB,cAAc,CAAC,IAAkB;;;;YAC7C,iBAAiB,GAAoB,IAAI,kBAAxB,EAAE,aAAa,GAAK,IAAI,cAAT,CAAU;YAE5C,oBAAoB,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;YAC1F,GAAG,GAAG,0BAAmB,oBAAoB,SAAG,IAAI,CAAC,GAAG,CAAE,CAAC;YAEjE,IAAI;gBACF,IAAA,wBAAQ,EAAC,GAAG,EAAE;oBACZ,GAAG,EAAE,iBAAiB;iBACvB,CAAC,CAAC;gBAEH,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;gBAEjC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;aACnD;;;;CACF;AAjBD,wCAiBC"}
|
package/lib/site/exportSite.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function exportSite(
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function exportSite(deps: Dependencies): Promise<boolean>;
|
package/lib/site/exportSite.js
CHANGED
|
@@ -43,12 +43,13 @@ var mkdirp = require("mkdirp");
|
|
|
43
43
|
var generateHistory_1 = require("./generateHistory");
|
|
44
44
|
var getRepoDetails_1 = require("./getRepoDetails");
|
|
45
45
|
var generateSiteSearchIndex_1 = require("./generateSiteSearchIndex");
|
|
46
|
-
function exportSite(
|
|
46
|
+
function exportSite(deps) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var hasError, sitePackagePath, siteDistPath, sitePublicPath, fullHistory, repoDetails, searchIndex, searchIndexFilePath;
|
|
48
|
+
var rootDirectoryPath, projectConfig, hasError, sitePackagePath, siteDistPath, sitePublicPath, fullHistory, repoDetails, searchIndex, searchIndexFilePath;
|
|
49
49
|
return __generator(this, function (_a) {
|
|
50
50
|
switch (_a.label) {
|
|
51
51
|
case 0:
|
|
52
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig;
|
|
52
53
|
hasError = false;
|
|
53
54
|
mkdirp.sync(projectConfig.siteExportDirectoryPath);
|
|
54
55
|
sitePackagePath = path.dirname(require.resolve("@featurevisor/site/package.json"));
|
|
@@ -59,7 +60,7 @@ function exportSite(rootDirectoryPath, projectConfig) {
|
|
|
59
60
|
console.log("Site dist copied to:", projectConfig.siteExportDirectoryPath);
|
|
60
61
|
fullHistory = (0, generateHistory_1.generateHistory)(rootDirectoryPath, projectConfig);
|
|
61
62
|
repoDetails = (0, getRepoDetails_1.getRepoDetails)();
|
|
62
|
-
return [4 /*yield*/, (0, generateSiteSearchIndex_1.generateSiteSearchIndex)(
|
|
63
|
+
return [4 /*yield*/, (0, generateSiteSearchIndex_1.generateSiteSearchIndex)(deps, fullHistory, repoDetails)];
|
|
63
64
|
case 1:
|
|
64
65
|
searchIndex = _a.sent();
|
|
65
66
|
searchIndexFilePath = path.join(projectConfig.siteExportDirectoryPath, "search-index.json");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportSite.js","sourceRoot":"","sources":["../../src/site/exportSite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;
|
|
1
|
+
{"version":3,"file":"exportSite.js","sourceRoot":"","sources":["../../src/site/exportSite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+BAAiC;AAEjC,qDAAoD;AACpD,mDAAkD;AAClD,qEAAoE;AAGpE,SAAsB,UAAU,CAAC,IAAkB;;;;;;oBACzC,iBAAiB,GAAoB,IAAI,kBAAxB,EAAE,aAAa,GAAK,IAAI,cAAT,CAAU;oBAE5C,QAAQ,GAAG,KAAK,CAAC;oBAEvB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;oBAE7C,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC,CAAC;oBAGnF,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;oBACxD,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBAE9E,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;oBAC5D,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBAEtF,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;oBAGrE,WAAW,GAAG,IAAA,iCAAe,EAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;oBAGhE,WAAW,GAAG,IAAA,+BAAc,GAAE,CAAC;oBACjB,qBAAM,IAAA,iDAAuB,EAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,EAAA;;oBAA3E,WAAW,GAAG,SAA6D;oBAC3E,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC;oBAClG,EAAE,CAAC,aAAa,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;oBACnE,OAAO,CAAC,GAAG,CAAC,wCAAiC,mBAAmB,CAAE,CAAC,CAAC;oBAEpE,iBAAiB;oBACjB,EAAE,CAAC,MAAM,CACP,aAAa,CAAC,mBAAmB,EACjC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,EAAE,WAAW,CAAC,EAC7D,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;oBAEF,6CAA6C;oBAE7C,sBAAO,QAAQ,EAAC;;;;CACjB;AAtCD,gCAsCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HistoryEntry, SearchIndex } from "@featurevisor/types";
|
|
2
|
-
import { ProjectConfig } from "../config";
|
|
3
2
|
import { RepoDetails } from "./getRepoDetails";
|
|
4
|
-
|
|
3
|
+
import { Dependencies } from "../dependencies";
|
|
4
|
+
export declare function generateSiteSearchIndex(deps: Dependencies, fullHistory: HistoryEntry[], repoDetails: RepoDetails | undefined): Promise<SearchIndex>;
|
|
@@ -48,16 +48,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.generateSiteSearchIndex = void 0;
|
|
51
|
-
var datasource_1 = require("../datasource");
|
|
52
51
|
var utils_1 = require("../utils");
|
|
53
52
|
var getRelativePaths_1 = require("./getRelativePaths");
|
|
54
53
|
var getLastModifiedFromHistory_1 = require("./getLastModifiedFromHistory");
|
|
55
|
-
function generateSiteSearchIndex(
|
|
54
|
+
function generateSiteSearchIndex(deps, fullHistory, repoDetails) {
|
|
56
55
|
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
var
|
|
56
|
+
var rootDirectoryPath, projectConfig, datasource, result, _a, relativeAttributesPath, relativeSegmentsPath, relativeFeaturesPath, prefix, attributesUsedInFeatures, attributesUsedInSegments, segmentsUsedInFeatures, featureFiles, _loop_1, _i, featureFiles_1, entityName, segmentFiles, _loop_2, _b, segmentFiles_1, entityName, attributeFiles, _c, attributeFiles_1, entityName, parsed;
|
|
58
57
|
return __generator(this, function (_d) {
|
|
59
58
|
switch (_d.label) {
|
|
60
59
|
case 0:
|
|
60
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig, datasource = deps.datasource;
|
|
61
61
|
result = {
|
|
62
62
|
links: undefined,
|
|
63
63
|
entities: {
|
|
@@ -66,7 +66,6 @@ function generateSiteSearchIndex(rootDirectoryPath, projectConfig, fullHistory,
|
|
|
66
66
|
features: [],
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
|
-
datasource = new datasource_1.Datasource(projectConfig);
|
|
70
69
|
/**
|
|
71
70
|
* Links
|
|
72
71
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSiteSearchIndex.js","sourceRoot":"","sources":["../../src/site/generateSiteSearchIndex.ts"],"names":[],"mappings":";;;;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
package/lib/site/serveSite.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function serveSite(
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function serveSite(deps: Dependencies): void;
|
package/lib/site/serveSite.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.serveSite = void 0;
|
|
|
4
4
|
var fs = require("fs");
|
|
5
5
|
var path = require("path");
|
|
6
6
|
var http = require("http");
|
|
7
|
-
function serveSite(
|
|
8
|
-
|
|
7
|
+
function serveSite(deps) {
|
|
8
|
+
var projectConfig = deps.projectConfig, options = deps.options;
|
|
9
9
|
var port = options.p || 3000;
|
|
10
10
|
http
|
|
11
11
|
.createServer(function (request, response) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serveSite.js","sourceRoot":"","sources":["../../src/site/serveSite.ts"],"names":[],"mappings":";;;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAI7B,SAAgB,SAAS,
|
|
1
|
+
{"version":3,"file":"serveSite.js","sourceRoot":"","sources":["../../src/site/serveSite.ts"],"names":[],"mappings":";;;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAI7B,SAAgB,SAAS,CAAC,IAAkB;IAClC,IAAA,aAAa,GAAc,IAAI,cAAlB,EAAE,OAAO,GAAK,IAAI,QAAT,CAAU;IAExC,IAAM,IAAI,GAAG,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC;IAE/B,IAAI;SACD,YAAY,CAAC,UAAU,OAAO,EAAE,QAAQ;QACvC,IAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC;QACjC,IAAM,QAAQ,GACZ,YAAY,KAAK,GAAG;YAClB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,EAAE,YAAY,CAAC;YAChE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,EAAE,YAAsB,CA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AG,CAAC,CAAC;AAC7D,CAAC;AAnDD,8BAmDC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function testProject(
|
|
1
|
+
import { Dependencies } from "../dependencies";
|
|
2
|
+
export declare function testProject(deps: Dependencies): Promise<boolean>;
|
|
@@ -38,18 +38,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.testProject = void 0;
|
|
40
40
|
var fs = require("fs");
|
|
41
|
-
var datasource_1 = require("../datasource");
|
|
42
41
|
var testSegment_1 = require("./testSegment");
|
|
43
42
|
var testFeature_1 = require("./testFeature");
|
|
44
43
|
var cliFormat_1 = require("./cliFormat");
|
|
45
|
-
function testProject(
|
|
44
|
+
function testProject(deps) {
|
|
46
45
|
return __awaiter(this, void 0, void 0, function () {
|
|
47
|
-
var
|
|
46
|
+
var rootDirectoryPath, projectConfig, datasource, hasError, testFiles, _i, testFiles_1, testFile, testFilePath, t, test_1, segmentHasError, test_2, featureHasError;
|
|
48
47
|
return __generator(this, function (_a) {
|
|
49
48
|
switch (_a.label) {
|
|
50
49
|
case 0:
|
|
50
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig, datasource = deps.datasource;
|
|
51
51
|
hasError = false;
|
|
52
|
-
datasource = new datasource_1.Datasource(projectConfig);
|
|
53
52
|
if (!fs.existsSync(projectConfig.testsDirectoryPath)) {
|
|
54
53
|
console.error("Tests directory does not exist: ".concat(projectConfig.testsDirectoryPath));
|
|
55
54
|
hasError = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testProject.js","sourceRoot":"","sources":["../../src/tester/testProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;
|
|
1
|
+
{"version":3,"file":"testProject.js","sourceRoot":"","sources":["../../src/tester/testProject.ts"],"names":[],"mapp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,SAAO,CAAgB,CAAC;oBAEN,qBAAM,IAAA,yBAAW,EAAC,UAAU,EAAE,MAAI,CAAC,EAAA;;oBAArD,eAAe,GAAG,SAAmC;oBAE3D,IAAI,eAAe,EAAE;wBACnB,QAAQ,GAAG,IAAI,CAAC;qBACjB;;;yBACS,CAAiB,CAAC,OAAO,EAA1B,wBAA0B;oBAE7B,SAAO,CAAgB,CAAC;oBAEN,qBAAM,IAAA,yBAAW,EAAC,UAAU,EAAE,aAAa,EAAE,MAAI,CAAC,EAAA;;oBAApE,eAAe,GAAG,SAAkD;oBAE1E,IAAI,eAAe,EAAE;wBACnB,QAAQ,GAAG,IAAI,CAAC;qBACjB;;;oBAED,OAAO,CAAC,KAAK,CAAC,6BAAsB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC;oBAC5D,QAAQ,GAAG,IAAI,CAAC;;;oBA5BG,IAAS,CAAA;;;oBAgChC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,IAAI,QAAQ,EAAE;wBACZ,OAAO,CAAC,GAAG,CAAC,0BAAc,EAAE,mBAAmB,CAAC,CAAC;qBAClD;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,4BAAgB,EAAE,kBAAkB,CAAC,CAAC;qBACnD;oBACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAEhB,sBAAO,QAAQ,EAAC;;;;CACjB;AA9DD,kCA8DC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/core",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.5",
|
|
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": "
|
|
60
|
+
"gitHead": "9f345e94bb7a49b8aa4e5085b7317e0c83b0b47a"
|
|
61
61
|
}
|
|
@@ -6,9 +6,9 @@ import * as mkdirp from "mkdirp";
|
|
|
6
6
|
import { ExistingState, EnvironmentKey } from "@featurevisor/types";
|
|
7
7
|
|
|
8
8
|
import { SCHEMA_VERSION, ProjectConfig } from "../config";
|
|
9
|
-
import { Datasource } from "../datasource";
|
|
10
9
|
|
|
11
10
|
import { buildDatafile } from "./buildDatafile";
|
|
11
|
+
import { Dependencies } from "../dependencies";
|
|
12
12
|
|
|
13
13
|
export function getDatafilePath(
|
|
14
14
|
projectConfig: ProjectConfig,
|
|
@@ -24,16 +24,13 @@ export interface BuildCLIOptions {
|
|
|
24
24
|
revision?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export async function buildProject(
|
|
28
|
-
rootDirectoryPath,
|
|
29
|
-
|
|
30
|
-
cliOptions: BuildCLIOptions = {},
|
|
31
|
-
) {
|
|
27
|
+
export async function buildProject(deps: Dependencies, cliOptions: BuildCLIOptions = {}) {
|
|
28
|
+
const { rootDirectoryPath, projectConfig, datasource } = deps;
|
|
29
|
+
|
|
32
30
|
const tags = projectConfig.tags;
|
|
33
31
|
const environments = projectConfig.environments;
|
|
34
32
|
|
|
35
33
|
const pkg = require(path.join(rootDirectoryPath, "package.json"));
|
|
36
|
-
const datasource = new Datasource(projectConfig);
|
|
37
34
|
|
|
38
35
|
for (const environment of environments) {
|
|
39
36
|
console.log(`\nBuilding datafiles for environment: ${environment}`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProjectConfig } from "./config";
|
|
2
|
+
import { Datasource } from "./datasource";
|
|
3
|
+
|
|
4
|
+
export interface Options {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Dependencies {
|
|
9
|
+
rootDirectoryPath: string;
|
|
10
|
+
projectConfig: ProjectConfig;
|
|
11
|
+
datasource: Datasource;
|
|
12
|
+
options: Options;
|
|
13
|
+
}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { Datasource } from "../datasource";
|
|
2
|
-
import { ProjectConfig } from "../config";
|
|
3
|
-
|
|
4
1
|
import { findDuplicateSegments } from "./findDuplicateSegments";
|
|
2
|
+
import { Dependencies } from "../dependencies";
|
|
5
3
|
|
|
6
|
-
export async function findDuplicateSegmentsInProject(
|
|
7
|
-
|
|
8
|
-
projectConfig: ProjectConfig,
|
|
9
|
-
) {
|
|
10
|
-
const datasource = new Datasource(projectConfig);
|
|
4
|
+
export async function findDuplicateSegmentsInProject(deps: Dependencies) {
|
|
5
|
+
const { datasource } = deps;
|
|
11
6
|
|
|
12
7
|
const duplicates = await findDuplicateSegments(datasource);
|
|
13
8
|
|
|
@@ -3,9 +3,8 @@ import * as path from "path";
|
|
|
3
3
|
|
|
4
4
|
import * as mkdirp from "mkdirp";
|
|
5
5
|
|
|
6
|
-
import { ProjectConfig } from "../config";
|
|
7
|
-
import { Datasource } from "../datasource";
|
|
8
6
|
import { generateTypeScriptCodeForProject } from "./typescript";
|
|
7
|
+
import { Dependencies } from "../dependencies";
|
|
9
8
|
|
|
10
9
|
export const ALLOWED_LANGUAGES_FOR_CODE_GENERATION = ["typescript"];
|
|
11
10
|
|
|
@@ -15,10 +14,11 @@ export interface GenerateCodeCLIOptions {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export async function generateCodeForProject(
|
|
18
|
-
|
|
19
|
-
projectConfig: ProjectConfig,
|
|
17
|
+
deps: Dependencies,
|
|
20
18
|
cliOptions: GenerateCodeCLIOptions,
|
|
21
19
|
) {
|
|
20
|
+
const { rootDirectoryPath } = deps;
|
|
21
|
+
|
|
22
22
|
if (!cliOptions.language) {
|
|
23
23
|
throw new Error("Option `--language` is required");
|
|
24
24
|
}
|
|
@@ -27,8 +27,6 @@ export async function generateCodeForProject(
|
|
|
27
27
|
throw new Error("Option `--out-dir` is required");
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const datasource = new Datasource(projectConfig);
|
|
31
|
-
|
|
32
30
|
const absolutePath = path.resolve(rootDirectoryPath, cliOptions.outDir);
|
|
33
31
|
|
|
34
32
|
if (!fs.existsSync(absolutePath)) {
|
|
@@ -47,12 +45,7 @@ export async function generateCodeForProject(
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
if (cliOptions.language === "typescript") {
|
|
50
|
-
return await generateTypeScriptCodeForProject(
|
|
51
|
-
rootDirectoryPath,
|
|
52
|
-
projectConfig,
|
|
53
|
-
datasource,
|
|
54
|
-
absolutePath,
|
|
55
|
-
);
|
|
48
|
+
return await generateTypeScriptCodeForProject(deps, absolutePath);
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
throw new Error(`Language ${cliOptions.language} is not supported`);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
|
|
4
|
-
import { ProjectConfig } from "../config";
|
|
5
|
-
import { Datasource } from "../datasource";
|
|
6
4
|
import { Attribute } from "@featurevisor/types";
|
|
5
|
+
import { Dependencies } from "../dependencies";
|
|
7
6
|
|
|
8
7
|
function convertFeaturevisorTypeToTypeScriptType(featurevisorType: string) {
|
|
9
8
|
switch (featurevisorType) {
|
|
@@ -87,12 +86,9 @@ export function getInstance(): FeaturevisorInstance {
|
|
|
87
86
|
}
|
|
88
87
|
`.trimStart();
|
|
89
88
|
|
|
90
|
-
export async function generateTypeScriptCodeForProject(
|
|
91
|
-
rootDirectoryPath
|
|
92
|
-
|
|
93
|
-
datasource: Datasource,
|
|
94
|
-
outputPath: string,
|
|
95
|
-
) {
|
|
89
|
+
export async function generateTypeScriptCodeForProject(deps: Dependencies, outputPath: string) {
|
|
90
|
+
const { rootDirectoryPath, datasource } = deps;
|
|
91
|
+
|
|
96
92
|
console.log("\nGenerating TypeScript code...\n");
|
|
97
93
|
|
|
98
94
|
// instance
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// for use in node only
|
|
2
2
|
import * as Joi from "joi";
|
|
3
3
|
|
|
4
|
-
import { Datasource } from "../datasource";
|
|
5
|
-
import { ProjectConfig } from "../config";
|
|
6
|
-
|
|
7
4
|
import { getAttributeJoiSchema } from "./attributeSchema";
|
|
8
5
|
import { getConditionsJoiSchema } from "./conditionSchema";
|
|
9
6
|
import { getSegmentJoiSchema } from "./segmentSchema";
|
|
@@ -13,10 +10,12 @@ import { getTestsJoiSchema } from "./testSchema";
|
|
|
13
10
|
|
|
14
11
|
import { checkForCircularDependencyInRequired } from "./checkCircularDependency";
|
|
15
12
|
import { printJoiError } from "./printJoiError";
|
|
13
|
+
import { Dependencies } from "../dependencies";
|
|
14
|
+
|
|
15
|
+
export async function lintProject(deps: Dependencies): Promise<boolean> {
|
|
16
|
+
const { projectConfig, datasource } = deps;
|
|
16
17
|
|
|
17
|
-
export async function lintProject(projectConfig: ProjectConfig): Promise<boolean> {
|
|
18
18
|
let hasError = false;
|
|
19
|
-
const datasource = new Datasource(projectConfig);
|
|
20
19
|
|
|
21
20
|
const availableAttributeKeys: string[] = [];
|
|
22
21
|
const availableSegmentKeys: string[] = [];
|
package/src/restore.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
2
|
import { execSync } from "child_process";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Dependencies } from "./dependencies";
|
|
5
|
+
|
|
6
|
+
export async function restoreProject(deps: Dependencies) {
|
|
7
|
+
const { rootDirectoryPath, projectConfig } = deps;
|
|
5
8
|
|
|
6
|
-
export async function restoreProject(rootDirectoryPath, projectConfig: ProjectConfig) {
|
|
7
9
|
const relativeStateDirPath = path.relative(rootDirectoryPath, projectConfig.stateDirectoryPath);
|
|
8
10
|
const cmd = `git checkout -- ${relativeStateDirPath}${path.sep}`;
|
|
9
11
|
|
package/src/site/exportSite.ts
CHANGED
|
@@ -3,13 +3,14 @@ import * as path from "path";
|
|
|
3
3
|
|
|
4
4
|
import * as mkdirp from "mkdirp";
|
|
5
5
|
|
|
6
|
-
import { ProjectConfig } from "../config";
|
|
7
|
-
|
|
8
6
|
import { generateHistory } from "./generateHistory";
|
|
9
7
|
import { getRepoDetails } from "./getRepoDetails";
|
|
10
8
|
import { generateSiteSearchIndex } from "./generateSiteSearchIndex";
|
|
9
|
+
import { Dependencies } from "../dependencies";
|
|
10
|
+
|
|
11
|
+
export async function exportSite(deps: Dependencies) {
|
|
12
|
+
const { rootDirectoryPath, projectConfig } = deps;
|
|
11
13
|
|
|
12
|
-
export async function exportSite(rootDirectoryPath: string, projectConfig: ProjectConfig) {
|
|
13
14
|
const hasError = false;
|
|
14
15
|
|
|
15
16
|
mkdirp.sync(projectConfig.siteExportDirectoryPath);
|
|
@@ -30,12 +31,7 @@ export async function exportSite(rootDirectoryPath: string, projectConfig: Proje
|
|
|
30
31
|
|
|
31
32
|
// site search index
|
|
32
33
|
const repoDetails = getRepoDetails();
|
|
33
|
-
const searchIndex = await generateSiteSearchIndex(
|
|
34
|
-
rootDirectoryPath,
|
|
35
|
-
projectConfig,
|
|
36
|
-
fullHistory,
|
|
37
|
-
repoDetails,
|
|
38
|
-
);
|
|
34
|
+
const searchIndex = await generateSiteSearchIndex(deps, fullHistory, repoDetails);
|
|
39
35
|
const searchIndexFilePath = path.join(projectConfig.siteExportDirectoryPath, "search-index.json");
|
|
40
36
|
fs.writeFileSync(searchIndexFilePath, JSON.stringify(searchIndex));
|
|
41
37
|
console.log(`Site search index written at: ${searchIndexFilePath}`);
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
Condition,
|
|
8
8
|
} from "@featurevisor/types";
|
|
9
9
|
|
|
10
|
-
import { Datasource } from "../datasource";
|
|
11
|
-
import { ProjectConfig } from "../config";
|
|
12
10
|
import { extractAttributeKeysFromConditions, extractSegmentKeysFromGroupSegments } from "../utils";
|
|
13
11
|
|
|
14
12
|
import { getRelativePaths } from "./getRelativePaths";
|
|
15
13
|
import { getLastModifiedFromHistory } from "./getLastModifiedFromHistory";
|
|
16
14
|
import { RepoDetails } from "./getRepoDetails";
|
|
15
|
+
import { Dependencies } from "../dependencies";
|
|
17
16
|
|
|
18
17
|
export async function generateSiteSearchIndex(
|
|
19
|
-
|
|
20
|
-
projectConfig: ProjectConfig,
|
|
18
|
+
deps: Dependencies,
|
|
21
19
|
fullHistory: HistoryEntry[],
|
|
22
20
|
repoDetails: RepoDetails | undefined,
|
|
23
21
|
): Promise<SearchIndex> {
|
|
22
|
+
const { rootDirectoryPath, projectConfig, datasource } = deps;
|
|
23
|
+
|
|
24
24
|
const result: SearchIndex = {
|
|
25
25
|
links: undefined,
|
|
26
26
|
entities: {
|
|
@@ -29,7 +29,6 @@ export async function generateSiteSearchIndex(
|
|
|
29
29
|
features: [],
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
|
-
const datasource = new Datasource(projectConfig);
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Links
|
package/src/site/serveSite.ts
CHANGED
|
@@ -2,13 +2,11 @@ import * as fs from "fs";
|
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import * as http from "http";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Dependencies } from "../dependencies";
|
|
6
|
+
|
|
7
|
+
export function serveSite(deps: Dependencies) {
|
|
8
|
+
const { projectConfig, options } = deps;
|
|
6
9
|
|
|
7
|
-
export function serveSite(
|
|
8
|
-
rootDirectoryPath: string,
|
|
9
|
-
projectConfig: ProjectConfig,
|
|
10
|
-
options: any = {},
|
|
11
|
-
) {
|
|
12
10
|
const port = options.p || 3000;
|
|
13
11
|
|
|
14
12
|
http
|
|
@@ -2,19 +2,15 @@ import * as fs from "fs";
|
|
|
2
2
|
|
|
3
3
|
import { TestSegment, TestFeature } from "@featurevisor/types";
|
|
4
4
|
|
|
5
|
-
import { ProjectConfig } from "../config";
|
|
6
|
-
import { Datasource } from "../datasource";
|
|
7
|
-
|
|
8
5
|
import { testSegment } from "./testSegment";
|
|
9
6
|
import { testFeature } from "./testFeature";
|
|
10
7
|
import { CLI_FORMAT_BOLD, CLI_FORMAT_GREEN, CLI_FORMAT_RED } from "./cliFormat";
|
|
8
|
+
import { Dependencies } from "../dependencies";
|
|
9
|
+
|
|
10
|
+
export async function testProject(deps: Dependencies): Promise<boolean> {
|
|
11
|
+
const { rootDirectoryPath, projectConfig, datasource } = deps;
|
|
11
12
|
|
|
12
|
-
export async function testProject(
|
|
13
|
-
rootDirectoryPath: string,
|
|
14
|
-
projectConfig: ProjectConfig,
|
|
15
|
-
): Promise<boolean> {
|
|
16
13
|
let hasError = false;
|
|
17
|
-
const datasource = new Datasource(projectConfig);
|
|
18
14
|
|
|
19
15
|
if (!fs.existsSync(projectConfig.testsDirectoryPath)) {
|
|
20
16
|
console.error(`Tests directory does not exist: ${projectConfig.testsDirectoryPath}`);
|