@cucumber/react-components 24.2.0 → 24.3.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/LICENSE +1 -1
- package/dist/src/CucumberQueryContext.d.ts +1 -2
- package/dist/src/CucumberQueryContext.d.ts.map +1 -1
- package/dist/src/CucumberQueryContext.js +2 -2
- package/dist/src/CucumberQueryContext.js.map +1 -1
- package/dist/src/GherkinQueryContext.d.ts +1 -2
- package/dist/src/GherkinQueryContext.d.ts.map +1 -1
- package/dist/src/GherkinQueryContext.js +2 -2
- package/dist/src/GherkinQueryContext.js.map +1 -1
- package/dist/src/SearchContext.d.ts +11 -5
- package/dist/src/SearchContext.d.ts.map +1 -1
- package/dist/src/SearchContext.js +4 -2
- package/dist/src/SearchContext.js.map +1 -1
- package/dist/src/ciCommitLink.d.ts +1 -1
- package/dist/src/ciCommitLink.d.ts.map +1 -1
- package/dist/src/ciCommitLink.js +1 -1
- package/dist/src/ciCommitLink.js.map +1 -1
- package/dist/src/components/app/CICommitLink.d.ts +2 -2
- package/dist/src/components/app/CICommitLink.d.ts.map +1 -1
- package/dist/src/components/app/CICommitLink.js +3 -8
- package/dist/src/components/app/CICommitLink.js.map +1 -1
- package/dist/src/components/app/CIJobLink.d.ts +2 -2
- package/dist/src/components/app/CIJobLink.d.ts.map +1 -1
- package/dist/src/components/app/CIJobLink.js +3 -7
- package/dist/src/components/app/CIJobLink.js.map +1 -1
- package/dist/src/components/app/ControlledSearchProvider.d.ts +2 -2
- package/dist/src/components/app/ControlledSearchProvider.d.ts.map +1 -1
- package/dist/src/components/app/ControlledSearchProvider.js +24 -2
- package/dist/src/components/app/ControlledSearchProvider.js.map +1 -1
- package/dist/src/components/app/CopyButton.d.ts +2 -1
- package/dist/src/components/app/CopyButton.d.ts.map +1 -1
- package/dist/src/components/app/CopyButton.js +4 -4
- package/dist/src/components/app/CopyButton.js.map +1 -1
- package/dist/src/components/app/DocumentAccordion.d.ts +3 -3
- package/dist/src/components/app/DocumentAccordion.d.ts.map +1 -1
- package/dist/src/components/app/DocumentAccordion.js +12 -20
- package/dist/src/components/app/DocumentAccordion.js.map +1 -1
- package/dist/src/components/app/DocumentAccordion.module.scss +15 -7
- package/dist/src/components/app/EnvelopesProvider.d.ts +2 -2
- package/dist/src/components/app/EnvelopesProvider.d.ts.map +1 -1
- package/dist/src/components/app/EnvelopesProvider.js +3 -2
- package/dist/src/components/app/EnvelopesProvider.js.map +1 -1
- package/dist/src/components/app/ExecutionSummary.d.ts +1 -1
- package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +3 -49
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/FilteredDocuments.d.ts +1 -1
- package/dist/src/components/app/FilteredDocuments.d.ts.map +1 -1
- package/dist/src/components/app/FilteredDocuments.js +4 -4
- package/dist/src/components/app/FilteredDocuments.js.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.d.ts +3 -3
- package/dist/src/components/app/GherkinDocumentList.d.ts.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.js +8 -9
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
- package/dist/src/components/app/Header.d.ts +1 -1
- package/dist/src/components/app/Header.d.ts.map +1 -1
- package/dist/src/components/app/Header.js +4 -4
- package/dist/src/components/app/Header.js.map +1 -1
- package/dist/src/components/app/HealthChart.d.ts +1 -1
- package/dist/src/components/app/HealthChart.d.ts.map +1 -1
- package/dist/src/components/app/HealthChart.js +6 -7
- package/dist/src/components/app/HealthChart.js.map +1 -1
- package/dist/src/components/app/HighLight.d.ts +2 -2
- package/dist/src/components/app/HighLight.d.ts.map +1 -1
- package/dist/src/components/app/HighLight.js +15 -9
- package/dist/src/components/app/HighLight.js.map +1 -1
- package/dist/src/components/app/ImplementationIcon.d.ts +2 -2
- package/dist/src/components/app/ImplementationIcon.d.ts.map +1 -1
- package/dist/src/components/app/ImplementationIcon.js +2 -2
- package/dist/src/components/app/ImplementationIcon.js.map +1 -1
- package/dist/src/components/app/InMemorySearchProvider.d.ts +2 -2
- package/dist/src/components/app/InMemorySearchProvider.d.ts.map +1 -1
- package/dist/src/components/app/InMemorySearchProvider.js +3 -2
- package/dist/src/components/app/InMemorySearchProvider.js.map +1 -1
- package/dist/src/components/app/NavigationButton.d.ts +1 -1
- package/dist/src/components/app/NavigationButton.d.ts.map +1 -1
- package/dist/src/components/app/NavigationButton.js +2 -2
- package/dist/src/components/app/NavigationButton.js.map +1 -1
- package/dist/src/components/app/OSIcon.d.ts +2 -2
- package/dist/src/components/app/OSIcon.d.ts.map +1 -1
- package/dist/src/components/app/OSIcon.js +4 -4
- package/dist/src/components/app/OSIcon.js.map +1 -1
- package/dist/src/components/app/QueriesProvider.d.ts +3 -3
- package/dist/src/components/app/QueriesProvider.d.ts.map +1 -1
- package/dist/src/components/app/QueriesProvider.js +4 -3
- package/dist/src/components/app/QueriesProvider.js.map +1 -1
- package/dist/src/components/app/Report.d.ts +1 -1
- package/dist/src/components/app/Report.d.ts.map +1 -1
- package/dist/src/components/app/Report.js +2 -11
- package/dist/src/components/app/Report.js.map +1 -1
- package/dist/src/components/app/RuntimeIcon.d.ts +2 -2
- package/dist/src/components/app/RuntimeIcon.d.ts.map +1 -1
- package/dist/src/components/app/RuntimeIcon.js +4 -4
- package/dist/src/components/app/RuntimeIcon.js.map +1 -1
- package/dist/src/components/app/SearchBar.d.ts +1 -1
- package/dist/src/components/app/SearchBar.d.ts.map +1 -1
- package/dist/src/components/app/SearchBar.js +9 -24
- package/dist/src/components/app/SearchBar.js.map +1 -1
- package/dist/src/components/app/StatusesSummary.d.ts +1 -1
- package/dist/src/components/app/StatusesSummary.d.ts.map +1 -1
- package/dist/src/components/app/StatusesSummary.js +8 -11
- package/dist/src/components/app/StatusesSummary.js.map +1 -1
- package/dist/src/components/app/TestRunHooks.d.ts +1 -1
- package/dist/src/components/app/TestRunHooks.d.ts.map +1 -1
- package/dist/src/components/app/TestRunHooks.js +5 -5
- package/dist/src/components/app/TestRunHooks.js.map +1 -1
- package/dist/src/components/app/UrlSearchProvider.d.ts +1 -1
- package/dist/src/components/app/UrlSearchProvider.d.ts.map +1 -1
- package/dist/src/components/app/UrlSearchProvider.js +6 -3
- package/dist/src/components/app/UrlSearchProvider.js.map +1 -1
- package/dist/src/components/app/icons/CucumberLogo.d.ts +1 -1
- package/dist/src/components/app/icons/CucumberLogo.d.ts.map +1 -1
- package/dist/src/components/app/icons/CucumberLogo.js +2 -6
- package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
- package/dist/src/components/app/icons/Jvm.d.ts +1 -1
- package/dist/src/components/app/icons/Jvm.d.ts.map +1 -1
- package/dist/src/components/app/icons/Jvm.js +2 -7
- package/dist/src/components/app/icons/Jvm.js.map +1 -1
- package/dist/src/components/app/icons/Linux.d.ts +1 -1
- package/dist/src/components/app/icons/Linux.d.ts.map +1 -1
- package/dist/src/components/app/icons/Linux.js +2 -17
- package/dist/src/components/app/icons/Linux.js.map +1 -1
- package/dist/src/components/app/icons/MacOS.d.ts +1 -1
- package/dist/src/components/app/icons/MacOS.d.ts.map +1 -1
- package/dist/src/components/app/icons/MacOS.js +2 -3
- package/dist/src/components/app/icons/MacOS.js.map +1 -1
- package/dist/src/components/app/icons/NodeJs.d.ts +1 -1
- package/dist/src/components/app/icons/NodeJs.d.ts.map +1 -1
- package/dist/src/components/app/icons/NodeJs.js +2 -5
- package/dist/src/components/app/icons/NodeJs.js.map +1 -1
- package/dist/src/components/app/icons/Ruby.d.ts +1 -1
- package/dist/src/components/app/icons/Ruby.d.ts.map +1 -1
- package/dist/src/components/app/icons/Ruby.js +2 -3
- package/dist/src/components/app/icons/Ruby.js.map +1 -1
- package/dist/src/components/app/icons/Windows.d.ts +1 -1
- package/dist/src/components/app/icons/Windows.d.ts.map +1 -1
- package/dist/src/components/app/icons/Windows.js +2 -3
- package/dist/src/components/app/icons/Windows.js.map +1 -1
- package/dist/src/components/app/makeSetupString.d.ts +1 -1
- package/dist/src/components/app/makeSetupString.d.ts.map +1 -1
- package/dist/src/components/app/makeSetupString.js.map +1 -1
- package/dist/src/components/app/markdownComponents.d.ts +9 -0
- package/dist/src/components/app/markdownComponents.d.ts.map +1 -0
- package/dist/src/components/app/markdownComponents.js +6 -0
- package/dist/src/components/app/markdownComponents.js.map +1 -0
- package/dist/src/components/app/rehypePlugins.d.ts +2 -2
- package/dist/src/components/app/rehypePlugins.d.ts.map +1 -1
- package/dist/src/components/app/rehypePlugins.js.map +1 -1
- package/dist/src/components/app/remarkPlugins.d.ts +2 -2
- package/dist/src/components/app/remarkPlugins.d.ts.map +1 -1
- package/dist/src/components/app/remarkPlugins.js.map +1 -1
- package/dist/src/components/customise/CustomRendering.d.ts +18 -18
- package/dist/src/components/customise/CustomRendering.d.ts.map +1 -1
- package/dist/src/components/customise/CustomRendering.js +10 -9
- package/dist/src/components/customise/CustomRendering.js.map +1 -1
- package/dist/src/components/customise/CustomRendering.stories.scss +0 -17
- package/dist/src/components/gherkin/Anchor.d.ts +3 -3
- package/dist/src/components/gherkin/Anchor.d.ts.map +1 -1
- package/dist/src/components/gherkin/Anchor.js +3 -6
- package/dist/src/components/gherkin/Anchor.js.map +1 -1
- package/dist/src/components/gherkin/Background.d.ts +3 -3
- package/dist/src/components/gherkin/Background.d.ts.map +1 -1
- package/dist/src/components/gherkin/Background.js +4 -10
- package/dist/src/components/gherkin/Background.js.map +1 -1
- package/dist/src/components/gherkin/Children.d.ts +3 -3
- package/dist/src/components/gherkin/Children.d.ts.map +1 -1
- package/dist/src/components/gherkin/Children.js +3 -3
- package/dist/src/components/gherkin/Children.js.map +1 -1
- package/dist/src/components/gherkin/DataTable.d.ts +3 -3
- package/dist/src/components/gherkin/DataTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/DataTable.js +4 -6
- package/dist/src/components/gherkin/DataTable.js.map +1 -1
- package/dist/src/components/gherkin/Description.d.ts +3 -3
- package/dist/src/components/gherkin/Description.d.ts.map +1 -1
- package/dist/src/components/gherkin/Description.js +3 -4
- package/dist/src/components/gherkin/Description.js.map +1 -1
- package/dist/src/components/gherkin/DocString.d.ts +3 -3
- package/dist/src/components/gherkin/DocString.d.ts.map +1 -1
- package/dist/src/components/gherkin/DocString.js +3 -4
- package/dist/src/components/gherkin/DocString.js.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts +2 -2
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.js +5 -3
- package/dist/src/components/gherkin/ErrorMessage.js.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.module.scss +17 -5
- package/dist/src/components/gherkin/Examples.d.ts +3 -3
- package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
- package/dist/src/components/gherkin/Examples.js +7 -18
- package/dist/src/components/gherkin/Examples.js.map +1 -1
- package/dist/src/components/gherkin/Feature.d.ts +3 -3
- package/dist/src/components/gherkin/Feature.d.ts.map +1 -1
- package/dist/src/components/gherkin/Feature.js +14 -24
- package/dist/src/components/gherkin/Feature.js.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts +3 -3
- package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.js +3 -3
- package/dist/src/components/gherkin/GherkinDocument.js.map +1 -1
- package/dist/src/components/gherkin/Keyword.d.ts +2 -2
- package/dist/src/components/gherkin/Keyword.d.ts.map +1 -1
- package/dist/src/components/gherkin/Keyword.js +3 -3
- package/dist/src/components/gherkin/Keyword.js.map +1 -1
- package/dist/src/components/gherkin/Keyword.module.scss +0 -1
- package/dist/src/components/gherkin/Parameter.d.ts +3 -3
- package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
- package/dist/src/components/gherkin/Parameter.js +4 -4
- package/dist/src/components/gherkin/Parameter.js.map +1 -1
- package/dist/src/components/gherkin/Rule.d.ts +3 -3
- package/dist/src/components/gherkin/Rule.d.ts.map +1 -1
- package/dist/src/components/gherkin/Rule.js +11 -21
- package/dist/src/components/gherkin/Rule.js.map +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts +3 -3
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
- package/dist/src/components/gherkin/Scenario.js +5 -14
- package/dist/src/components/gherkin/Scenario.js.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts +2 -2
- package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.js +10 -10
- package/dist/src/components/gherkin/StatusIcon.js.map +1 -1
- package/dist/src/components/gherkin/StepsList.d.ts +1 -1
- package/dist/src/components/gherkin/StepsList.d.ts.map +1 -1
- package/dist/src/components/gherkin/StepsList.js +2 -2
- package/dist/src/components/gherkin/StepsList.js.map +1 -1
- package/dist/src/components/gherkin/Tags.d.ts +3 -3
- package/dist/src/components/gherkin/Tags.d.ts.map +1 -1
- package/dist/src/components/gherkin/Tags.js +4 -5
- package/dist/src/components/gherkin/Tags.js.map +1 -1
- package/dist/src/components/gherkin/Title.d.ts +3 -3
- package/dist/src/components/gherkin/Title.d.ts.map +1 -1
- package/dist/src/components/gherkin/Title.js +3 -4
- package/dist/src/components/gherkin/Title.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Attachment.d.ts +3 -3
- package/dist/src/components/gherkin/attachment/Attachment.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Attachment.js +14 -17
- package/dist/src/components/gherkin/attachment/Attachment.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Attachment.module.scss +15 -5
- package/dist/src/components/gherkin/attachment/Image.d.ts +4 -4
- package/dist/src/components/gherkin/attachment/Image.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Image.js +6 -8
- package/dist/src/components/gherkin/attachment/Image.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Links.d.ts +3 -3
- package/dist/src/components/gherkin/attachment/Links.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Links.js +7 -10
- package/dist/src/components/gherkin/attachment/Links.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Log.d.ts +3 -3
- package/dist/src/components/gherkin/attachment/Log.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Log.js +3 -3
- package/dist/src/components/gherkin/attachment/Log.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Text.d.ts +3 -3
- package/dist/src/components/gherkin/attachment/Text.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Text.js +4 -6
- package/dist/src/components/gherkin/attachment/Text.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Unknown.d.ts +2 -2
- package/dist/src/components/gherkin/attachment/Unknown.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Unknown.js +9 -17
- package/dist/src/components/gherkin/attachment/Unknown.js.map +1 -1
- package/dist/src/components/gherkin/attachment/Video.d.ts +3 -3
- package/dist/src/components/gherkin/attachment/Video.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/Video.js +6 -10
- package/dist/src/components/gherkin/attachment/Video.js.map +1 -1
- package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts +1 -1
- package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/attachmentFilename.js.map +1 -1
- package/dist/src/components/gherkin/attachment/base64Decode.d.ts +9 -1
- package/dist/src/components/gherkin/attachment/base64Decode.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/base64Decode.js +17 -3
- package/dist/src/components/gherkin/attachment/base64Decode.js.map +1 -1
- package/dist/src/components/gherkin/attachment/useText.d.ts +1 -1
- package/dist/src/components/gherkin/attachment/useText.d.ts.map +1 -1
- package/dist/src/components/gherkin/attachment/useText.js +3 -3
- package/dist/src/components/gherkin/attachment/useText.js.map +1 -1
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts +1 -1
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts.map +1 -1
- package/dist/src/components/gherkin/composeHookStepTitle.js +1 -1
- package/dist/src/components/gherkin/composeHookStepTitle.js.map +1 -1
- package/dist/src/components/gherkin/composePickleStepTitle.d.ts +1 -1
- package/dist/src/components/gherkin/composePickleStepTitle.d.ts.map +1 -1
- package/dist/src/components/gherkin/composePickleStepTitle.js +2 -2
- package/dist/src/components/gherkin/composePickleStepTitle.js.map +1 -1
- package/dist/src/components/gherkin/statusName.d.ts +2 -2
- package/dist/src/components/gherkin/statusName.d.ts.map +1 -1
- package/dist/src/components/gherkin/statusName.js.map +1 -1
- package/dist/src/components/results/AmbiguousResult.d.ts +8 -0
- package/dist/src/components/results/AmbiguousResult.d.ts.map +1 -0
- package/dist/src/components/results/AmbiguousResult.js +11 -0
- package/dist/src/components/results/AmbiguousResult.js.map +1 -0
- package/dist/src/components/results/AmbiguousResult.module.scss +22 -0
- package/dist/src/components/results/FailedResult.d.ts +8 -0
- package/dist/src/components/results/FailedResult.d.ts.map +1 -0
- package/dist/src/components/results/FailedResult.js +15 -0
- package/dist/src/components/results/FailedResult.js.map +1 -0
- package/dist/src/components/results/PendingResult.d.ts +8 -0
- package/dist/src/components/results/PendingResult.d.ts.map +1 -0
- package/dist/src/components/results/PendingResult.js +12 -0
- package/dist/src/components/results/PendingResult.js.map +1 -0
- package/dist/src/components/results/ResultNote.d.ts +3 -0
- package/dist/src/components/results/ResultNote.d.ts.map +1 -0
- package/dist/src/components/results/ResultNote.js +6 -0
- package/dist/src/components/results/ResultNote.js.map +1 -0
- package/dist/src/components/results/ResultNote.module.scss +6 -0
- package/dist/src/components/results/SkippedResult.d.ts +8 -0
- package/dist/src/components/results/SkippedResult.d.ts.map +1 -0
- package/dist/src/components/results/SkippedResult.js +12 -0
- package/dist/src/components/results/SkippedResult.js.map +1 -0
- package/dist/src/components/results/SourceReference.d.ts +8 -0
- package/dist/src/components/results/SourceReference.d.ts.map +1 -0
- package/dist/src/components/results/SourceReference.js +13 -0
- package/dist/src/components/results/SourceReference.js.map +1 -0
- package/dist/src/components/results/SourceReference.module.scss +10 -0
- package/dist/src/components/results/TestCaseOutcome.d.ts +2 -2
- package/dist/src/components/results/TestCaseOutcome.d.ts.map +1 -1
- package/dist/src/components/results/TestCaseOutcome.js +5 -9
- package/dist/src/components/results/TestCaseOutcome.js.map +1 -1
- package/dist/src/components/results/TestRunHookOutcome.d.ts +2 -2
- package/dist/src/components/results/TestRunHookOutcome.d.ts.map +1 -1
- package/dist/src/components/results/TestRunHookOutcome.js +4 -13
- package/dist/src/components/results/TestRunHookOutcome.js.map +1 -1
- package/dist/src/components/results/TestStepAttachments.d.ts +2 -2
- package/dist/src/components/results/TestStepAttachments.d.ts.map +1 -1
- package/dist/src/components/results/TestStepAttachments.js +4 -5
- package/dist/src/components/results/TestStepAttachments.js.map +1 -1
- package/dist/src/components/results/TestStepDuration.d.ts +2 -2
- package/dist/src/components/results/TestStepDuration.d.ts.map +1 -1
- package/dist/src/components/results/TestStepDuration.js +4 -2
- package/dist/src/components/results/TestStepDuration.js.map +1 -1
- package/dist/src/components/results/TestStepOutcome.d.ts +2 -2
- package/dist/src/components/results/TestStepOutcome.d.ts.map +1 -1
- package/dist/src/components/results/TestStepOutcome.js +18 -27
- package/dist/src/components/results/TestStepOutcome.js.map +1 -1
- package/dist/src/components/results/TestStepOutcome.module.scss +1 -1
- package/dist/src/components/results/UndefinedResult.d.ts +8 -0
- package/dist/src/components/results/UndefinedResult.d.ts.map +1 -0
- package/dist/src/components/results/UndefinedResult.js +18 -0
- package/dist/src/components/results/UndefinedResult.js.map +1 -0
- package/dist/src/components/results/UndefinedResult.module.scss +14 -0
- package/dist/src/components/results/index.d.ts +1 -1
- package/dist/src/components/results/index.d.ts.map +1 -1
- package/dist/src/components/results/index.js +1 -1
- package/dist/src/components/results/index.js.map +1 -1
- package/dist/src/formatExecutionDuration.js.map +1 -1
- package/dist/src/hooks/helpers.js.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.d.ts +2 -2
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.js +70 -34
- package/dist/src/hooks/useFilteredDocuments.js.map +1 -1
- package/dist/src/hooks/useMostSevereStatusByUri.js.map +1 -1
- package/dist/src/hooks/useQueries.d.ts +2 -2
- package/dist/src/hooks/useQueries.d.ts.map +1 -1
- package/dist/src/hooks/useQueries.js.map +1 -1
- package/dist/src/hooks/useResultStatistics.d.ts +1 -1
- package/dist/src/hooks/useResultStatistics.d.ts.map +1 -1
- package/dist/src/hooks/useResultStatistics.js.map +1 -1
- package/dist/src/hooks/useSearch.d.ts +1 -1
- package/dist/src/hooks/useSearch.d.ts.map +1 -1
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/hooks/useTestCaseStarted.d.ts +6 -1
- package/dist/src/hooks/useTestCaseStarted.d.ts.map +1 -1
- package/dist/src/hooks/useTestCaseStarted.js +13 -10
- package/dist/src/hooks/useTestCaseStarted.js.map +1 -1
- package/dist/src/hooks/useTestRunHooks.d.ts +1 -1
- package/dist/src/hooks/useTestRunHooks.d.ts.map +1 -1
- package/dist/src/hooks/useTestRunHooks.js.map +1 -1
- package/dist/src/search/FeatureSearch.d.ts +12 -3
- package/dist/src/search/FeatureSearch.d.ts.map +1 -1
- package/dist/src/search/FeatureSearch.js +9 -17
- package/dist/src/search/FeatureSearch.js.map +1 -1
- package/dist/src/search/ScenarioLikeSearch.d.ts +8 -13
- package/dist/src/search/ScenarioLikeSearch.d.ts.map +1 -1
- package/dist/src/search/ScenarioLikeSearch.js +13 -17
- package/dist/src/search/ScenarioLikeSearch.js.map +1 -1
- package/dist/src/search/StepSearch.d.ts +9 -16
- package/dist/src/search/StepSearch.d.ts.map +1 -1
- package/dist/src/search/StepSearch.js +13 -17
- package/dist/src/search/StepSearch.js.map +1 -1
- package/dist/src/search/TextSearch.d.ts +11 -2
- package/dist/src/search/TextSearch.d.ts.map +1 -1
- package/dist/src/search/TextSearch.js +59 -52
- package/dist/src/search/TextSearch.js.map +1 -1
- package/dist/src/search/createSearchIndex.d.ts +7 -0
- package/dist/src/search/createSearchIndex.d.ts.map +1 -0
- package/dist/src/search/createSearchIndex.js +10 -0
- package/dist/src/search/createSearchIndex.js.map +1 -0
- package/dist/src/search/deriveLineageConstraints.d.ts +8 -0
- package/dist/src/search/deriveLineageConstraints.d.ts.map +1 -0
- package/dist/src/search/deriveLineageConstraints.js +38 -0
- package/dist/src/search/deriveLineageConstraints.js.map +1 -0
- package/dist/src/search/index.d.ts +3 -1
- package/dist/src/search/index.d.ts.map +1 -1
- package/dist/src/search/index.js +3 -1
- package/dist/src/search/index.js.map +1 -1
- package/dist/src/search/pruneGherkinDocuments.d.ts +24 -0
- package/dist/src/search/pruneGherkinDocuments.d.ts.map +1 -0
- package/dist/src/search/pruneGherkinDocuments.js +180 -0
- package/dist/src/search/pruneGherkinDocuments.js.map +1 -0
- package/dist/src/search/types.d.ts +39 -8
- package/dist/src/search/types.d.ts.map +1 -1
- package/dist/src/search/types.js +1 -1
- package/dist/src/search/types.js.map +1 -1
- package/dist/src/toRepositoryId.d.ts +1 -1
- package/dist/src/toRepositoryId.d.ts.map +1 -1
- package/dist/src/toRepositoryId.js +7 -6
- package/dist/src/toRepositoryId.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +56 -69
- package/dist/src/components/results/TestStepResultDetails.d.ts +0 -4
- package/dist/src/components/results/TestStepResultDetails.d.ts.map +0 -1
- package/dist/src/components/results/TestStepResultDetails.js +0 -16
- package/dist/src/components/results/TestStepResultDetails.js.map +0 -1
- package/dist/src/search/Search.d.ts +0 -11
- package/dist/src/search/Search.d.ts.map +0 -1
- package/dist/src/search/Search.js +0 -51
- package/dist/src/search/Search.js.map +0 -1
- package/dist/src/search/TagSearch.d.ts +0 -4
- package/dist/src/search/TagSearch.d.ts.map +0 -1
- package/dist/src/search/TagSearch.js +0 -57
- package/dist/src/search/TagSearch.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA","sourcesContent":["export * from './createSearchIndex.js'\nexport * from './deriveLineageConstraints.js'\nexport * from './pruneGherkinDocuments.js'\nexport * from './types.js'\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GherkinDocument } from '@cucumber/messages';
|
|
2
|
+
import type { LineageConstraints, SearchHits } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns abridged copies of the given documents, with lineage constraints and search hits used
|
|
5
|
+
* to filter out nodes that shouldn't be shown
|
|
6
|
+
*
|
|
7
|
+
* @param gherkinDocuments - the original documents to prune
|
|
8
|
+
* @param constraints - the set of AST node IDs to retain, derived from pickle lineage
|
|
9
|
+
* @param searchHits - if provided, further narrows results to nodes matching a search query
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* The two filtering mechanisms behave a little differently.
|
|
13
|
+
*
|
|
14
|
+
* `lineageConstraints` are strictly enforced at every level - any node of the covered types must
|
|
15
|
+
* have its id included otherwise it will be filtered off. This check is performed eagerly at every
|
|
16
|
+
* level so for e.g. a Rule that isn't matched, we won't even look at its child Scenarios.
|
|
17
|
+
*
|
|
18
|
+
* `searchHits` has cascading behaviour - a match at a higher level (Feature, Rule, or Background)
|
|
19
|
+
* ensures all of its descendants will be retained, and a match at a lower level (Scenario, Step)
|
|
20
|
+
* ensures all of its ascendants (but not siblings) will be retained. A `false` value means there
|
|
21
|
+
* were no hits at all, so no documents will be returned.
|
|
22
|
+
*/
|
|
23
|
+
export declare function pruneGherkinDocuments(gherkinDocuments: ReadonlyArray<GherkinDocument>, constraints: LineageConstraints, searchHits?: SearchHits | false): ReadonlyArray<GherkinDocument>;
|
|
24
|
+
//# sourceMappingURL=pruneGherkinDocuments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pruneGherkinDocuments.d.ts","sourceRoot":"","sources":["../../../src/search/pruneGherkinDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,eAAe,EAMhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAsB,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEpF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,aAAa,CAAC,eAAe,CAAC,EAChD,WAAW,EAAE,kBAAkB,EAC/B,UAAU,CAAC,EAAE,UAAU,GAAG,KAAK,GAC9B,aAAa,CAAC,eAAe,CAAC,CAsBhC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns abridged copies of the given documents, with lineage constraints and search hits used
|
|
3
|
+
* to filter out nodes that shouldn't be shown
|
|
4
|
+
*
|
|
5
|
+
* @param gherkinDocuments - the original documents to prune
|
|
6
|
+
* @param constraints - the set of AST node IDs to retain, derived from pickle lineage
|
|
7
|
+
* @param searchHits - if provided, further narrows results to nodes matching a search query
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The two filtering mechanisms behave a little differently.
|
|
11
|
+
*
|
|
12
|
+
* `lineageConstraints` are strictly enforced at every level - any node of the covered types must
|
|
13
|
+
* have its id included otherwise it will be filtered off. This check is performed eagerly at every
|
|
14
|
+
* level so for e.g. a Rule that isn't matched, we won't even look at its child Scenarios.
|
|
15
|
+
*
|
|
16
|
+
* `searchHits` has cascading behaviour - a match at a higher level (Feature, Rule, or Background)
|
|
17
|
+
* ensures all of its descendants will be retained, and a match at a lower level (Scenario, Step)
|
|
18
|
+
* ensures all of its ascendants (but not siblings) will be retained. A `false` value means there
|
|
19
|
+
* were no hits at all, so no documents will be returned.
|
|
20
|
+
*/
|
|
21
|
+
export function pruneGherkinDocuments(gherkinDocuments, constraints, searchHits) {
|
|
22
|
+
if (searchHits === false) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
const results = [];
|
|
26
|
+
for (const gherkinDocument of gherkinDocuments) {
|
|
27
|
+
if (!gherkinDocument.uri) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (!constraints.gherkinDocument.has(gherkinDocument.uri)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const documentHits = searchHits?.get(gherkinDocument.uri);
|
|
34
|
+
if (searchHits && !documentHits) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const pruned = pruneGherkinDocument(gherkinDocument, constraints, documentHits);
|
|
38
|
+
if (pruned) {
|
|
39
|
+
results.push(pruned);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return results;
|
|
43
|
+
}
|
|
44
|
+
function pruneGherkinDocument(gherkinDocument, constraints, searchHits) {
|
|
45
|
+
if (searchHits?.feature) {
|
|
46
|
+
searchHits = undefined;
|
|
47
|
+
}
|
|
48
|
+
const feature = filterFeature(gherkinDocument.feature, constraints, searchHits);
|
|
49
|
+
if (feature) {
|
|
50
|
+
return {
|
|
51
|
+
...gherkinDocument,
|
|
52
|
+
feature,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function filterFeature(feature, constraints, searchHits) {
|
|
57
|
+
if (!feature) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
if (searchHits && matchesOnBackground(feature.children, searchHits)) {
|
|
61
|
+
searchHits = undefined;
|
|
62
|
+
}
|
|
63
|
+
const children = feature.children
|
|
64
|
+
.map((child) => filterFeatureChild(child, constraints, searchHits))
|
|
65
|
+
.filter((child) => !!child);
|
|
66
|
+
if (children.some((child) => !child.background)) {
|
|
67
|
+
return {
|
|
68
|
+
...feature,
|
|
69
|
+
children,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function filterFeatureChild(child, constraints, searchHits) {
|
|
74
|
+
if (child.background) {
|
|
75
|
+
const background = filterBackground(child.background, constraints);
|
|
76
|
+
if (background) {
|
|
77
|
+
return {
|
|
78
|
+
background,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (child.scenario) {
|
|
83
|
+
const scenario = filterScenario(child.scenario, constraints, searchHits);
|
|
84
|
+
if (scenario) {
|
|
85
|
+
return {
|
|
86
|
+
scenario,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (child.rule) {
|
|
91
|
+
const rule = filterRule(child.rule, constraints, searchHits);
|
|
92
|
+
if (rule) {
|
|
93
|
+
return {
|
|
94
|
+
rule,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
function filterBackground(background, constraints) {
|
|
101
|
+
return constraints.background.has(background.id) ? background : undefined;
|
|
102
|
+
}
|
|
103
|
+
function filterRule(rule, constraints, searchHits) {
|
|
104
|
+
if (!constraints.rule.has(rule.id)) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
if (searchHits &&
|
|
108
|
+
(searchHits.rule.includes(rule.id) || matchesOnBackground(rule.children, searchHits))) {
|
|
109
|
+
searchHits = undefined;
|
|
110
|
+
}
|
|
111
|
+
const children = rule.children
|
|
112
|
+
.map((child) => filterRuleChild(child, constraints, searchHits))
|
|
113
|
+
.filter((child) => !!child);
|
|
114
|
+
if (children.some((child) => !child.background)) {
|
|
115
|
+
return {
|
|
116
|
+
...rule,
|
|
117
|
+
children,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function filterRuleChild(child, constraints, searchHits) {
|
|
122
|
+
if (child.background) {
|
|
123
|
+
const background = filterBackground(child.background, constraints);
|
|
124
|
+
if (background) {
|
|
125
|
+
return {
|
|
126
|
+
background,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (child.scenario) {
|
|
131
|
+
const scenario = filterScenario(child.scenario, constraints, searchHits);
|
|
132
|
+
if (scenario) {
|
|
133
|
+
return {
|
|
134
|
+
scenario,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
function filterScenario(scenario, constraints, searchHits) {
|
|
141
|
+
if (!constraints.scenario.has(scenario.id)) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
if (searchHits &&
|
|
145
|
+
!searchHits.scenario.includes(scenario.id) &&
|
|
146
|
+
!matchesOnSteps(scenario.steps, searchHits)) {
|
|
147
|
+
return undefined;
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
...scenario,
|
|
151
|
+
examples: scenario.examples
|
|
152
|
+
.map((examples) => filterExamplesTable(examples, constraints))
|
|
153
|
+
.filter((examples) => !!examples),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function filterExamplesTable(examples, constraints) {
|
|
157
|
+
if (!constraints.examples.has(examples.id)) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
...examples,
|
|
162
|
+
tableBody: examples.tableBody
|
|
163
|
+
.map((row) => filterExampleRow(row, constraints))
|
|
164
|
+
.filter((row) => !!row),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function filterExampleRow(row, constraints) {
|
|
168
|
+
return constraints.example.has(row.id) ? row : undefined;
|
|
169
|
+
}
|
|
170
|
+
function matchesOnBackground(children, searchHits) {
|
|
171
|
+
return children
|
|
172
|
+
.map((child) => child.background)
|
|
173
|
+
.filter((background) => !!background)
|
|
174
|
+
.some((background) => searchHits.background.includes(background.id) ||
|
|
175
|
+
matchesOnSteps(background.steps, searchHits));
|
|
176
|
+
}
|
|
177
|
+
function matchesOnSteps(steps, searchHits) {
|
|
178
|
+
return steps.some((step) => searchHits.step.includes(step.id));
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=pruneGherkinDocuments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pruneGherkinDocuments.js","sourceRoot":"","sources":["../../../src/search/pruneGherkinDocuments.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,qBAAqB,CACnC,gBAAgD,EAChD,WAA+B,EAC/B,UAA+B;IAE/B,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QACzB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,MAAM,OAAO,GAAsB,EAAE,CAAA;IACrC,KAAK,MAAM,eAAe,IAAI,gBAAgB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;YACzB,SAAQ;QACV,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1D,SAAQ;QACV,CAAC;QACD,MAAM,YAAY,GAAG,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;QACzD,IAAI,UAAU,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,SAAQ;QACV,CAAC;QACD,MAAM,MAAM,GAAG,oBAAoB,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;QAC/E,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,SAAS,oBAAoB,CAC3B,eAAgC,EAChC,WAA+B,EAC/B,UAA+B;IAE/B,IAAI,UAAU,EAAE,OAAO,EAAE,CAAC;QACxB,UAAU,GAAG,SAAS,CAAA;IACxB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,EAA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,\n Examples,\n Feature,\n FeatureChild,\n GherkinDocument,\n Rule,\n RuleChild,\n Scenario,\n Step,\n TableRow,\n} from '@cucumber/messages'\nimport type { DocumentSearchHits, LineageConstraints, SearchHits } from './types.js'\n\n/**\n * Returns abridged copies of the given documents, with lineage constraints and search hits used\n * to filter out nodes that shouldn't be shown\n *\n * @param gherkinDocuments - the original documents to prune\n * @param constraints - the set of AST node IDs to retain, derived from pickle lineage\n * @param searchHits - if provided, further narrows results to nodes matching a search query\n *\n * @remarks\n * The two filtering mechanisms behave a little differently.\n *\n * `lineageConstraints` are strictly enforced at every level - any node of the covered types must\n * have its id included otherwise it will be filtered off. This check is performed eagerly at every\n * level so for e.g. a Rule that isn't matched, we won't even look at its child Scenarios.\n *\n * `searchHits` has cascading behaviour - a match at a higher level (Feature, Rule, or Background)\n * ensures all of its descendants will be retained, and a match at a lower level (Scenario, Step)\n * ensures all of its ascendants (but not siblings) will be retained. A `false` value means there\n * were no hits at all, so no documents will be returned.\n */\nexport function pruneGherkinDocuments(\n gherkinDocuments: ReadonlyArray<GherkinDocument>,\n constraints: LineageConstraints,\n searchHits?: SearchHits | false\n): ReadonlyArray<GherkinDocument> {\n if (searchHits === false) {\n return []\n }\n const results: GherkinDocument[] = []\n for (const gherkinDocument of gherkinDocuments) {\n if (!gherkinDocument.uri) {\n continue\n }\n if (!constraints.gherkinDocument.has(gherkinDocument.uri)) {\n continue\n }\n const documentHits = searchHits?.get(gherkinDocument.uri)\n if (searchHits && !documentHits) {\n continue\n }\n const pruned = pruneGherkinDocument(gherkinDocument, constraints, documentHits)\n if (pruned) {\n results.push(pruned)\n }\n }\n return results\n}\n\nfunction pruneGherkinDocument(\n gherkinDocument: GherkinDocument,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): GherkinDocument | undefined {\n if (searchHits?.feature) {\n searchHits = undefined\n }\n\n const feature = filterFeature(gherkinDocument.feature, constraints, searchHits)\n if (feature) {\n return {\n ...gherkinDocument,\n feature,\n }\n }\n}\n\nfunction filterFeature(\n feature: Feature | undefined,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): Feature | undefined {\n if (!feature) {\n return undefined\n }\n\n if (searchHits && matchesOnBackground(feature.children, searchHits)) {\n searchHits = undefined\n }\n\n const children = feature.children\n .map((child) => filterFeatureChild(child, constraints, searchHits))\n .filter((child) => !!child)\n\n if (children.some((child) => !child.background)) {\n return {\n ...feature,\n children,\n }\n }\n}\n\nfunction filterFeatureChild(\n child: FeatureChild,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): FeatureChild | undefined {\n if (child.background) {\n const background = filterBackground(child.background, constraints)\n if (background) {\n return {\n background,\n }\n }\n }\n if (child.scenario) {\n const scenario = filterScenario(child.scenario, constraints, searchHits)\n if (scenario) {\n return {\n scenario,\n }\n }\n }\n if (child.rule) {\n const rule = filterRule(child.rule, constraints, searchHits)\n if (rule) {\n return {\n rule,\n }\n }\n }\n return undefined\n}\n\nfunction filterBackground(background: Background, constraints: LineageConstraints) {\n return constraints.background.has(background.id) ? background : undefined\n}\n\nfunction filterRule(\n rule: Rule,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): Rule | undefined {\n if (!constraints.rule.has(rule.id)) {\n return undefined\n }\n\n if (\n searchHits &&\n (searchHits.rule.includes(rule.id) || matchesOnBackground(rule.children, searchHits))\n ) {\n searchHits = undefined\n }\n\n const children = rule.children\n .map((child) => filterRuleChild(child, constraints, searchHits))\n .filter((child) => !!child)\n\n if (children.some((child) => !child.background)) {\n return {\n ...rule,\n children,\n }\n }\n}\n\nfunction filterRuleChild(\n child: RuleChild,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): RuleChild | undefined {\n if (child.background) {\n const background = filterBackground(child.background, constraints)\n if (background) {\n return {\n background,\n }\n }\n }\n if (child.scenario) {\n const scenario = filterScenario(child.scenario, constraints, searchHits)\n if (scenario) {\n return {\n scenario,\n }\n }\n }\n return undefined\n}\n\nfunction filterScenario(\n scenario: Scenario,\n constraints: LineageConstraints,\n searchHits?: DocumentSearchHits\n): Scenario | undefined {\n if (!constraints.scenario.has(scenario.id)) {\n return undefined\n }\n if (\n searchHits &&\n !searchHits.scenario.includes(scenario.id) &&\n !matchesOnSteps(scenario.steps, searchHits)\n ) {\n return undefined\n }\n return {\n ...scenario,\n examples: scenario.examples\n .map((examples) => filterExamplesTable(examples, constraints))\n .filter((examples) => !!examples),\n }\n}\n\nfunction filterExamplesTable(\n examples: Examples,\n constraints: LineageConstraints\n): Examples | undefined {\n if (!constraints.examples.has(examples.id)) {\n return undefined\n }\n return {\n ...examples,\n tableBody: examples.tableBody\n .map((row) => filterExampleRow(row, constraints))\n .filter((row) => !!row),\n }\n}\n\nfunction filterExampleRow(row: TableRow, constraints: LineageConstraints): TableRow | undefined {\n return constraints.example.has(row.id) ? row : undefined\n}\n\nfunction matchesOnBackground(\n children: ReadonlyArray<RuleChild>,\n searchHits: DocumentSearchHits\n): boolean {\n return children\n .map((child) => child.background)\n .filter((background) => !!background)\n .some(\n (background) =>\n searchHits.background.includes(background.id) ||\n matchesOnSteps(background.steps, searchHits)\n )\n}\n\nfunction matchesOnSteps(steps: ReadonlyArray<Step>, searchHits: DocumentSearchHits): boolean {\n return steps.some((step) => searchHits.step.includes(step.id))\n}\n"]}
|
|
@@ -1,14 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const ID_SEPARATOR = "\0";
|
|
2
|
+
export interface IndexHit {
|
|
3
|
+
uri: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Facade for an index that supports adding items of a given type and returning hits as an array
|
|
8
|
+
* of uri/id pairs
|
|
9
|
+
*/
|
|
10
|
+
export interface TypedIndex<SourceType = unknown> {
|
|
11
|
+
search: (query: string) => Promise<ReadonlyArray<IndexHit>>;
|
|
12
|
+
add: (item: SourceType, uri: string) => Promise<this>;
|
|
13
|
+
}
|
|
2
14
|
/**
|
|
3
|
-
*
|
|
4
|
-
* type. Also supports a different type being added if needed.
|
|
15
|
+
* Interface for the top-level document search index
|
|
5
16
|
*/
|
|
6
|
-
export interface
|
|
7
|
-
search: (query: string) => Promise<
|
|
8
|
-
add: (item: SourceType) => Promise<this>;
|
|
17
|
+
export interface SearchIndex {
|
|
18
|
+
search: (query: string) => Promise<SearchHits | false>;
|
|
9
19
|
}
|
|
10
20
|
/**
|
|
11
|
-
*
|
|
21
|
+
* Collection of Gherkin node ids that matched a search term for a single document, grouped by
|
|
22
|
+
* node type
|
|
12
23
|
*/
|
|
13
|
-
export
|
|
24
|
+
export interface DocumentSearchHits {
|
|
25
|
+
feature: boolean;
|
|
26
|
+
background: Array<string>;
|
|
27
|
+
rule: Array<string>;
|
|
28
|
+
scenario: Array<string>;
|
|
29
|
+
step: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export type SearchHits = ReadonlyMap<string, DocumentSearchHits>;
|
|
32
|
+
/**
|
|
33
|
+
* Collection of Gherkin node ids harvested from executed test cases, grouped by node type
|
|
34
|
+
* @remarks
|
|
35
|
+
* In the case of `gherkinDocument`, the values are URIs
|
|
36
|
+
*/
|
|
37
|
+
export interface LineageConstraints {
|
|
38
|
+
gherkinDocument: ReadonlySet<string>;
|
|
39
|
+
background: ReadonlySet<string>;
|
|
40
|
+
rule: ReadonlySet<string>;
|
|
41
|
+
scenario: ReadonlySet<string>;
|
|
42
|
+
examples: ReadonlySet<string>;
|
|
43
|
+
example: ReadonlySet<string>;
|
|
44
|
+
}
|
|
14
45
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,C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2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA","sourcesContent":["export const ID_SEPARATOR = '\\0'\n\nexport interface IndexHit {\n uri: string\n id: string\n}\n\n/**\n * Facade for an index that supports adding items of a given type and returning hits as an array\n * of uri/id pairs\n */\nexport interface TypedIndex<SourceType = unknown> {\n search: (query: string) => Promise<ReadonlyArray<IndexHit>>\n add: (item: SourceType, uri: string) => Promise<this>\n}\n\n/**\n * Interface for the top-level document search index\n */\nexport interface SearchIndex {\n search: (query: string) => Promise<SearchHits | false>\n}\n\n/**\n * Collection of Gherkin node ids that matched a search term for a single document, grouped by\n * node type\n */\nexport interface DocumentSearchHits {\n feature: boolean\n background: Array<string>\n rule: Array<string>\n scenario: Array<string>\n step: Array<string>\n}\n\nexport type SearchHits = ReadonlyMap<string, DocumentSearchHits>\n\n/**\n * Collection of Gherkin node ids harvested from executed test cases, grouped by node type\n * @remarks\n * In the case of `gherkinDocument`, the values are URIs\n */\nexport interface LineageConstraints {\n gherkinDocument: ReadonlySet<string>\n background: ReadonlySet<string>\n rule: ReadonlySet<string>\n scenario: ReadonlySet<string>\n examples: ReadonlySet<string>\n example: ReadonlySet<string>\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function toRepositoryId(
|
|
1
|
+
export default function toRepositoryId(remote: string): string;
|
|
2
2
|
//# sourceMappingURL=toRepositoryId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRepositoryId.d.ts","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"toRepositoryId.d.ts","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAU7D"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export default function toRepositoryId(
|
|
2
|
-
|
|
1
|
+
export default function toRepositoryId(remote) {
|
|
2
|
+
let result = remote;
|
|
3
|
+
if (!remote.includes('://') && remote.includes(':')) {
|
|
3
4
|
// scp style URL (not really a URL)
|
|
4
|
-
const [host, path] =
|
|
5
|
-
|
|
5
|
+
const [host, path] = remote.split(':', 2);
|
|
6
|
+
result = `ssh://${host}/${path}`;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
const url = new URL(
|
|
8
|
+
result = result.replace(/\.git$/, '');
|
|
9
|
+
const url = new URL(result);
|
|
9
10
|
return `${url.hostname}${url.pathname}`;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=toRepositoryId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRepositoryId.js","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"toRepositoryId.js","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAc;IACnD,IAAI,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACpD,mCAAmC;QACnC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACzC,MAAM,GAAG,SAAS,IAAI,IAAI,IAAI,EAAE,CAAA;IAClC,CAAC;IACD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACrC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAA;AACzC,CAAC","sourcesContent":["export default function toRepositoryId(remote: string): string {\n let result = remote\n if (!remote.includes('://') && remote.includes(':')) {\n // scp style URL (not really a URL)\n const [host, path] = remote.split(':', 2)\n result = `ssh://${host}/${path}`\n }\n result = result.replace(/\\.git$/, '')\n const url = new URL(result)\n return `${url.hostname}${url.pathname}`\n}\n"]}
|