@cucumber/react-components 24.2.0 → 24.4.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/README.md +2 -2
- package/dist/CucumberQueryContext.d.ts +3 -0
- package/dist/CucumberQueryContext.js +4 -0
- package/dist/GherkinQueryContext.d.ts +3 -0
- package/dist/GherkinQueryContext.js +4 -0
- package/dist/SearchContext.d.ts +18 -0
- package/dist/SearchContext.js +10 -0
- package/dist/ciCommitLink.d.ts +2 -0
- package/dist/ciCommitLink.js +12 -0
- package/dist/components/app/CICommitLink.d.ts +5 -0
- package/dist/components/app/CICommitLink.js +16 -0
- package/dist/components/app/CIJobLink.d.ts +5 -0
- package/dist/components/app/CIJobLink.js +10 -0
- package/dist/{src/components → components}/app/ControlledSearchProvider.d.ts +2 -3
- package/dist/components/app/ControlledSearchProvider.js +39 -0
- package/dist/components/app/CopyButton.d.ts +5 -0
- package/dist/components/app/CopyButton.js +23 -0
- package/dist/{src/components → components}/app/DocumentAccordion.d.ts +3 -4
- package/dist/components/app/DocumentAccordion.js +22 -0
- package/dist/{src/components → components}/app/DocumentAccordion.module.scss +15 -7
- package/dist/components/app/EnvelopesProvider.d.ts +7 -0
- package/dist/components/app/EnvelopesProvider.js +18 -0
- package/dist/components/app/ExecutionSummary.d.ts +2 -0
- package/dist/components/app/ExecutionSummary.js +38 -0
- package/dist/components/app/FilteredDocuments.d.ts +2 -0
- package/dist/components/app/FilteredDocuments.js +15 -0
- package/dist/components/app/GherkinDocumentList.d.ts +8 -0
- package/dist/components/app/GherkinDocumentList.js +23 -0
- package/dist/{src/components → components}/app/Header.d.ts +1 -2
- package/dist/components/app/Header.js +12 -0
- package/dist/components/app/HealthChart.d.ts +2 -0
- package/dist/components/app/HealthChart.js +14 -0
- package/dist/components/app/HighLight.d.ts +8 -0
- package/dist/components/app/HighLight.js +38 -0
- package/dist/components/app/ImplementationIcon.d.ts +5 -0
- package/dist/components/app/ImplementationIcon.js +10 -0
- package/dist/{src/components → components}/app/InMemorySearchProvider.d.ts +2 -3
- package/dist/components/app/InMemorySearchProvider.js +11 -0
- package/dist/components/app/NavigationButton.d.ts +2 -0
- package/dist/components/app/NavigationButton.js +6 -0
- package/dist/components/app/OSIcon.d.ts +5 -0
- package/dist/components/app/OSIcon.js +18 -0
- package/dist/components/app/QueriesProvider.d.ts +9 -0
- package/dist/components/app/QueriesProvider.js +7 -0
- package/dist/components/app/Report.d.ts +2 -0
- package/dist/components/app/Report.js +10 -0
- package/dist/components/app/RuntimeIcon.d.ts +5 -0
- package/dist/components/app/RuntimeIcon.js +18 -0
- package/dist/components/app/SearchBar.d.ts +2 -0
- package/dist/components/app/SearchBar.js +33 -0
- package/dist/components/app/StatusesSummary.d.ts +2 -0
- package/dist/components/app/StatusesSummary.js +16 -0
- package/dist/components/app/TestRunHooks.d.ts +2 -0
- package/dist/components/app/TestRunHooks.js +14 -0
- package/dist/{src/components → components}/app/UrlSearchProvider.d.ts +1 -2
- package/dist/components/app/UrlSearchProvider.js +29 -0
- package/dist/{src/components → components}/app/findMostSevereTestStepResultStatus.d.ts +0 -1
- package/dist/components/app/findMostSevereTestStepResultStatus.js +17 -0
- package/dist/components/app/icons/CucumberLogo.d.ts +2 -0
- package/dist/components/app/icons/CucumberLogo.js +5 -0
- package/dist/components/app/icons/Jvm.d.ts +2 -0
- package/dist/components/app/icons/Jvm.js +5 -0
- package/dist/components/app/icons/Linux.d.ts +2 -0
- package/dist/components/app/icons/Linux.js +5 -0
- package/dist/components/app/icons/MacOS.d.ts +2 -0
- package/dist/components/app/icons/MacOS.js +5 -0
- package/dist/components/app/icons/NodeJs.d.ts +2 -0
- package/dist/components/app/icons/NodeJs.js +5 -0
- package/dist/components/app/icons/Ruby.d.ts +2 -0
- package/dist/components/app/icons/Ruby.js +5 -0
- package/dist/components/app/icons/Windows.d.ts +2 -0
- package/dist/components/app/icons/Windows.js +5 -0
- package/dist/{src/components/app/index.js → components/app/index.d.ts} +0 -1
- package/dist/components/app/index.js +15 -0
- package/dist/components/app/makeSetupString.d.ts +2 -0
- package/dist/components/app/makeSetupString.js +21 -0
- package/dist/components/app/markdownComponents.d.ts +8 -0
- package/dist/components/app/markdownComponents.js +6 -0
- package/dist/components/app/rehypePlugins.d.ts +3 -0
- package/dist/components/app/rehypePlugins.js +9 -0
- package/dist/components/app/remarkPlugins.d.ts +3 -0
- package/dist/components/app/remarkPlugins.js +4 -0
- package/dist/{src/components → components}/customise/CustomRendering.d.ts +18 -19
- package/dist/components/customise/CustomRendering.js +35 -0
- package/dist/components/customise/CustomRendering.stories.scss +8 -0
- package/dist/{src/components/customise/index.js → components/customise/index.d.ts} +0 -1
- package/dist/components/customise/index.js +3 -0
- package/dist/{src/components → components}/customise/theming.d.ts +0 -1
- package/dist/components/customise/theming.js +2 -0
- package/dist/components/gherkin/Anchor.d.ts +3 -0
- package/dist/components/gherkin/Anchor.js +13 -0
- package/dist/components/gherkin/Background.d.ts +3 -0
- package/dist/components/gherkin/Background.js +18 -0
- package/dist/components/gherkin/Children.d.ts +3 -0
- package/dist/components/gherkin/Children.js +11 -0
- package/dist/components/gherkin/DataTable.d.ts +3 -0
- package/dist/components/gherkin/DataTable.js +16 -0
- package/dist/components/gherkin/Description.d.ts +3 -0
- package/dist/components/gherkin/Description.js +15 -0
- package/dist/components/gherkin/DocString.d.ts +3 -0
- package/dist/components/gherkin/DocString.js +12 -0
- package/dist/components/gherkin/ErrorMessage.d.ts +3 -0
- package/dist/components/gherkin/ErrorMessage.js +13 -0
- package/dist/components/gherkin/ErrorMessage.module.scss +24 -0
- package/dist/components/gherkin/Examples.d.ts +3 -0
- package/dist/components/gherkin/Examples.js +31 -0
- package/dist/components/gherkin/Feature.d.ts +3 -0
- package/dist/components/gherkin/Feature.js +30 -0
- package/dist/components/gherkin/GherkinDocument.d.ts +3 -0
- package/dist/components/gherkin/GherkinDocument.js +11 -0
- package/dist/components/gherkin/Keyword.d.ts +3 -0
- package/dist/components/gherkin/Keyword.js +11 -0
- package/dist/{src/components → components}/gherkin/Keyword.module.scss +0 -1
- package/dist/components/gherkin/Parameter.d.ts +3 -0
- package/dist/components/gherkin/Parameter.js +11 -0
- package/dist/components/gherkin/Rule.d.ts +3 -0
- package/dist/components/gherkin/Rule.js +26 -0
- package/dist/components/gherkin/Scenario.d.ts +3 -0
- package/dist/components/gherkin/Scenario.js +22 -0
- package/dist/components/gherkin/StatusIcon.d.ts +3 -0
- package/dist/components/gherkin/StatusIcon.js +24 -0
- package/dist/components/gherkin/StepsList.d.ts +4 -0
- package/dist/components/gherkin/StepsList.js +6 -0
- package/dist/components/gherkin/Tags.d.ts +3 -0
- package/dist/components/gherkin/Tags.js +15 -0
- package/dist/components/gherkin/Title.d.ts +3 -0
- package/dist/components/gherkin/Title.js +12 -0
- package/dist/components/gherkin/attachment/Attachment.d.ts +3 -0
- package/dist/components/gherkin/attachment/Attachment.js +45 -0
- package/dist/{src/components → components}/gherkin/attachment/Attachment.module.scss +15 -5
- package/dist/components/gherkin/attachment/Image.d.ts +7 -0
- package/dist/components/gherkin/attachment/Image.js +16 -0
- package/dist/components/gherkin/attachment/Links.d.ts +7 -0
- package/dist/components/gherkin/attachment/Links.js +14 -0
- package/dist/components/gherkin/attachment/Log.d.ts +7 -0
- package/dist/components/gherkin/attachment/Log.js +12 -0
- package/dist/components/gherkin/attachment/Text.d.ts +8 -0
- package/dist/components/gherkin/attachment/Text.js +16 -0
- package/dist/components/gherkin/attachment/Unknown.d.ts +3 -0
- package/dist/components/gherkin/attachment/Unknown.js +61 -0
- package/dist/components/gherkin/attachment/Video.d.ts +5 -0
- package/dist/components/gherkin/attachment/Video.js +16 -0
- package/dist/components/gherkin/attachment/attachmentFilename.d.ts +2 -0
- package/dist/components/gherkin/attachment/attachmentFilename.js +12 -0
- package/dist/components/gherkin/attachment/base64Decode.d.ts +9 -0
- package/dist/components/gherkin/attachment/base64Decode.js +19 -0
- package/dist/{src/components/gherkin/attachment/index.js → components/gherkin/attachment/index.d.ts} +0 -1
- package/dist/components/gherkin/attachment/index.js +2 -0
- package/dist/{src/components → components}/gherkin/attachment/useText.d.ts +1 -2
- package/dist/components/gherkin/attachment/useText.js +28 -0
- package/dist/components/gherkin/composeHookStepTitle.d.ts +2 -0
- package/dist/components/gherkin/composeHookStepTitle.js +23 -0
- package/dist/{src/components → components}/gherkin/composePickleStepTitle.d.ts +1 -2
- package/dist/components/gherkin/composePickleStepTitle.js +36 -0
- package/dist/{src/components/gherkin/index.js → components/gherkin/index.d.ts} +0 -1
- package/dist/components/gherkin/index.js +19 -0
- package/dist/{src/components → components}/gherkin/isNumber.d.ts +0 -1
- package/dist/components/gherkin/isNumber.js +7 -0
- package/dist/components/gherkin/statusName.d.ts +3 -0
- package/dist/components/gherkin/statusName.js +4 -0
- package/dist/{src/components/index.js → components/index.d.ts} +0 -1
- package/dist/components/index.js +4 -0
- package/dist/components/results/AmbiguousResult.d.ts +7 -0
- package/dist/components/results/AmbiguousResult.js +11 -0
- package/dist/components/results/AmbiguousResult.module.scss +22 -0
- package/dist/components/results/FailedResult.d.ts +7 -0
- package/dist/components/results/FailedResult.js +15 -0
- package/dist/components/results/PendingResult.d.ts +7 -0
- package/dist/components/results/PendingResult.js +12 -0
- package/dist/components/results/ResultNote.d.ts +2 -0
- package/dist/components/results/ResultNote.js +6 -0
- package/dist/components/results/ResultNote.module.scss +6 -0
- package/dist/components/results/SkippedResult.d.ts +7 -0
- package/dist/components/results/SkippedResult.js +12 -0
- package/dist/components/results/SourceReference.d.ts +7 -0
- package/dist/components/results/SourceReference.js +13 -0
- package/dist/components/results/SourceReference.module.scss +10 -0
- package/dist/components/results/TestCaseOutcome.d.ts +7 -0
- package/dist/components/results/TestCaseOutcome.js +32 -0
- package/dist/{src/components → components}/results/TestRunHookOutcome.d.ts +2 -3
- package/dist/components/results/TestRunHookOutcome.js +11 -0
- package/dist/components/results/TestStepAttachments.d.ts +7 -0
- package/dist/components/results/TestStepAttachments.js +12 -0
- package/dist/components/results/TestStepDuration.d.ts +5 -0
- package/dist/components/results/TestStepDuration.js +19 -0
- package/dist/{src/components → components}/results/TestStepOutcome.d.ts +2 -3
- package/dist/components/results/TestStepOutcome.js +45 -0
- package/dist/{src/components → components}/results/TestStepOutcome.module.scss +1 -1
- package/dist/components/results/UndefinedResult.d.ts +7 -0
- package/dist/components/results/UndefinedResult.js +18 -0
- package/dist/{src/components/gherkin/ErrorMessage.module.scss → components/results/UndefinedResult.module.scss} +5 -3
- package/dist/components/results/index.d.ts +2 -0
- package/dist/components/results/index.js +3 -0
- package/dist/{src/hooks/helpers.d.ts → ensure.d.ts} +0 -1
- package/dist/ensure.js +7 -0
- package/dist/{src/formatExecutionDistance.d.ts → formatExecutionDistance.d.ts} +0 -1
- package/dist/formatExecutionDistance.js +7 -0
- package/dist/{src/formatExecutionDuration.d.ts → formatExecutionDuration.d.ts} +0 -1
- package/dist/formatExecutionDuration.js +12 -0
- package/dist/{src/formatPassedQuantity.d.ts → formatPassedQuantity.d.ts} +0 -1
- package/dist/formatPassedQuantity.js +4 -0
- package/dist/{src/formatStatusRate.d.ts → formatStatusRate.d.ts} +0 -1
- package/dist/formatStatusRate.js +9 -0
- package/dist/{src/hooks/index.js → hooks/index.d.ts} +0 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/useFilteredDocuments.d.ts +5 -0
- package/dist/hooks/useFilteredDocuments.js +67 -0
- package/dist/hooks/useFilteredTestCases.d.ts +6 -0
- package/dist/hooks/useFilteredTestCases.js +36 -0
- package/dist/{src/hooks → hooks}/useMostSevereStatusByUri.d.ts +0 -1
- package/dist/hooks/useMostSevereStatusByUri.js +25 -0
- package/dist/hooks/useQueries.d.ts +6 -0
- package/dist/hooks/useQueries.js +9 -0
- package/dist/{src/hooks → hooks}/useResultStatistics.d.ts +1 -2
- package/dist/hooks/useResultStatistics.js +24 -0
- package/dist/hooks/useSearch.d.ts +2 -0
- package/dist/hooks/useSearch.js +6 -0
- package/dist/hooks/useSearchResult.d.ts +26 -0
- package/dist/hooks/useSearchResult.js +58 -0
- package/dist/hooks/useTestCaseStarted.d.ts +7 -0
- package/dist/hooks/useTestCaseStarted.js +20 -0
- package/dist/{src/hooks → hooks}/useTestRunHooks.d.ts +1 -2
- package/dist/hooks/useTestRunHooks.js +14 -0
- package/dist/{src/index.js → index.d.ts} +0 -1
- package/dist/index.js +3 -0
- package/dist/{src/isTagExpression.d.ts → isTagExpression.d.ts} +0 -1
- package/dist/isTagExpression.js +5 -0
- package/dist/search/FeatureSearch.d.ts +12 -0
- package/dist/search/FeatureSearch.js +39 -0
- package/dist/search/ScenarioLikeSearch.d.ts +19 -0
- package/dist/search/ScenarioLikeSearch.js +37 -0
- package/dist/search/StepSearch.d.ts +11 -0
- package/dist/search/StepSearch.js +40 -0
- package/dist/search/TextSearch.d.ts +11 -0
- package/dist/search/TextSearch.js +67 -0
- package/dist/search/createSearchIndex.d.ts +6 -0
- package/dist/search/createSearchIndex.js +10 -0
- package/dist/search/deriveLineageConstraints.d.ts +7 -0
- package/dist/search/deriveLineageConstraints.js +38 -0
- package/dist/search/filterAndExpandTestCaseEvents.d.ts +20 -0
- package/dist/search/filterAndExpandTestCaseEvents.js +32 -0
- package/dist/search/index.d.ts +6 -0
- package/dist/search/index.js +7 -0
- package/dist/search/pruneGherkinDocuments.d.ts +23 -0
- package/dist/search/pruneGherkinDocuments.js +179 -0
- package/dist/search/pruneTestCaseEvents.d.ts +16 -0
- package/dist/search/pruneTestCaseEvents.js +41 -0
- package/dist/search/types.d.ts +44 -0
- package/dist/search/types.js +2 -0
- package/dist/{src/statuses.d.ts → statuses.d.ts} +0 -1
- package/dist/statuses.js +12 -0
- package/dist/toRepositoryId.d.ts +1 -0
- package/dist/toRepositoryId.js +12 -0
- package/package.json +65 -75
- package/dist/src/CucumberQueryContext.d.ts +0 -5
- package/dist/src/CucumberQueryContext.d.ts.map +0 -1
- package/dist/src/CucumberQueryContext.js +0 -4
- package/dist/src/CucumberQueryContext.js.map +0 -1
- package/dist/src/GherkinQueryContext.d.ts +0 -5
- package/dist/src/GherkinQueryContext.d.ts.map +0 -1
- package/dist/src/GherkinQueryContext.js +0 -4
- package/dist/src/GherkinQueryContext.js.map +0 -1
- package/dist/src/SearchContext.d.ts +0 -13
- package/dist/src/SearchContext.d.ts.map +0 -1
- package/dist/src/SearchContext.js +0 -8
- package/dist/src/SearchContext.js.map +0 -1
- package/dist/src/ciCommitLink.d.ts +0 -3
- package/dist/src/ciCommitLink.d.ts.map +0 -1
- package/dist/src/ciCommitLink.js +0 -12
- package/dist/src/ciCommitLink.js.map +0 -1
- package/dist/src/components/app/CICommitLink.d.ts +0 -6
- package/dist/src/components/app/CICommitLink.d.ts.map +0 -1
- package/dist/src/components/app/CICommitLink.js +0 -21
- package/dist/src/components/app/CICommitLink.js.map +0 -1
- package/dist/src/components/app/CIJobLink.d.ts +0 -6
- package/dist/src/components/app/CIJobLink.d.ts.map +0 -1
- package/dist/src/components/app/CIJobLink.js +0 -14
- package/dist/src/components/app/CIJobLink.js.map +0 -1
- package/dist/src/components/app/ControlledSearchProvider.d.ts.map +0 -1
- package/dist/src/components/app/ControlledSearchProvider.js +0 -17
- package/dist/src/components/app/ControlledSearchProvider.js.map +0 -1
- package/dist/src/components/app/CopyButton.d.ts +0 -5
- package/dist/src/components/app/CopyButton.d.ts.map +0 -1
- package/dist/src/components/app/CopyButton.js +0 -23
- package/dist/src/components/app/CopyButton.js.map +0 -1
- package/dist/src/components/app/DocumentAccordion.d.ts.map +0 -1
- package/dist/src/components/app/DocumentAccordion.js +0 -30
- package/dist/src/components/app/DocumentAccordion.js.map +0 -1
- package/dist/src/components/app/EnvelopesProvider.d.ts +0 -8
- package/dist/src/components/app/EnvelopesProvider.d.ts.map +0 -1
- package/dist/src/components/app/EnvelopesProvider.js +0 -17
- package/dist/src/components/app/EnvelopesProvider.js.map +0 -1
- package/dist/src/components/app/ExecutionSummary.d.ts +0 -3
- package/dist/src/components/app/ExecutionSummary.d.ts.map +0 -1
- package/dist/src/components/app/ExecutionSummary.js +0 -84
- package/dist/src/components/app/ExecutionSummary.js.map +0 -1
- package/dist/src/components/app/FilteredDocuments.d.ts +0 -3
- package/dist/src/components/app/FilteredDocuments.d.ts.map +0 -1
- package/dist/src/components/app/FilteredDocuments.js +0 -15
- package/dist/src/components/app/FilteredDocuments.js.map +0 -1
- package/dist/src/components/app/GherkinDocumentList.d.ts +0 -9
- package/dist/src/components/app/GherkinDocumentList.d.ts.map +0 -1
- package/dist/src/components/app/GherkinDocumentList.js +0 -24
- package/dist/src/components/app/GherkinDocumentList.js.map +0 -1
- package/dist/src/components/app/Header.d.ts.map +0 -1
- package/dist/src/components/app/Header.js +0 -12
- package/dist/src/components/app/Header.js.map +0 -1
- package/dist/src/components/app/HealthChart.d.ts +0 -3
- package/dist/src/components/app/HealthChart.d.ts.map +0 -1
- package/dist/src/components/app/HealthChart.js +0 -15
- package/dist/src/components/app/HealthChart.js.map +0 -1
- package/dist/src/components/app/HighLight.d.ts +0 -9
- package/dist/src/components/app/HighLight.d.ts.map +0 -1
- package/dist/src/components/app/HighLight.js +0 -32
- package/dist/src/components/app/HighLight.js.map +0 -1
- package/dist/src/components/app/ImplementationIcon.d.ts +0 -6
- package/dist/src/components/app/ImplementationIcon.d.ts.map +0 -1
- package/dist/src/components/app/ImplementationIcon.js +0 -10
- package/dist/src/components/app/ImplementationIcon.js.map +0 -1
- package/dist/src/components/app/InMemorySearchProvider.d.ts.map +0 -1
- package/dist/src/components/app/InMemorySearchProvider.js +0 -10
- package/dist/src/components/app/InMemorySearchProvider.js.map +0 -1
- package/dist/src/components/app/NavigationButton.d.ts +0 -3
- package/dist/src/components/app/NavigationButton.d.ts.map +0 -1
- package/dist/src/components/app/NavigationButton.js +0 -6
- package/dist/src/components/app/NavigationButton.js.map +0 -1
- package/dist/src/components/app/OSIcon.d.ts +0 -6
- package/dist/src/components/app/OSIcon.d.ts.map +0 -1
- package/dist/src/components/app/OSIcon.js +0 -18
- package/dist/src/components/app/OSIcon.js.map +0 -1
- package/dist/src/components/app/QueriesProvider.d.ts +0 -10
- package/dist/src/components/app/QueriesProvider.d.ts.map +0 -1
- package/dist/src/components/app/QueriesProvider.js +0 -6
- package/dist/src/components/app/QueriesProvider.js.map +0 -1
- package/dist/src/components/app/Report.d.ts +0 -3
- package/dist/src/components/app/Report.d.ts.map +0 -1
- package/dist/src/components/app/Report.js +0 -19
- package/dist/src/components/app/Report.js.map +0 -1
- package/dist/src/components/app/RuntimeIcon.d.ts +0 -6
- package/dist/src/components/app/RuntimeIcon.d.ts.map +0 -1
- package/dist/src/components/app/RuntimeIcon.js +0 -18
- package/dist/src/components/app/RuntimeIcon.js.map +0 -1
- package/dist/src/components/app/SearchBar.d.ts +0 -3
- package/dist/src/components/app/SearchBar.d.ts.map +0 -1
- package/dist/src/components/app/SearchBar.js +0 -48
- package/dist/src/components/app/SearchBar.js.map +0 -1
- package/dist/src/components/app/StatusesSummary.d.ts +0 -3
- package/dist/src/components/app/StatusesSummary.d.ts.map +0 -1
- package/dist/src/components/app/StatusesSummary.js +0 -19
- package/dist/src/components/app/StatusesSummary.js.map +0 -1
- package/dist/src/components/app/TestRunHooks.d.ts +0 -3
- package/dist/src/components/app/TestRunHooks.d.ts.map +0 -1
- package/dist/src/components/app/TestRunHooks.js +0 -14
- package/dist/src/components/app/TestRunHooks.js.map +0 -1
- package/dist/src/components/app/UrlSearchProvider.d.ts.map +0 -1
- package/dist/src/components/app/UrlSearchProvider.js +0 -26
- package/dist/src/components/app/UrlSearchProvider.js.map +0 -1
- package/dist/src/components/app/findMostSevereTestStepResultStatus.d.ts.map +0 -1
- package/dist/src/components/app/findMostSevereTestStepResultStatus.js +0 -17
- package/dist/src/components/app/findMostSevereTestStepResultStatus.js.map +0 -1
- package/dist/src/components/app/icons/CucumberLogo.d.ts +0 -3
- package/dist/src/components/app/icons/CucumberLogo.d.ts.map +0 -1
- package/dist/src/components/app/icons/CucumberLogo.js +0 -9
- package/dist/src/components/app/icons/CucumberLogo.js.map +0 -1
- package/dist/src/components/app/icons/Jvm.d.ts +0 -3
- package/dist/src/components/app/icons/Jvm.d.ts.map +0 -1
- package/dist/src/components/app/icons/Jvm.js +0 -10
- package/dist/src/components/app/icons/Jvm.js.map +0 -1
- package/dist/src/components/app/icons/Linux.d.ts +0 -3
- package/dist/src/components/app/icons/Linux.d.ts.map +0 -1
- package/dist/src/components/app/icons/Linux.js +0 -20
- package/dist/src/components/app/icons/Linux.js.map +0 -1
- package/dist/src/components/app/icons/MacOS.d.ts +0 -3
- package/dist/src/components/app/icons/MacOS.d.ts.map +0 -1
- package/dist/src/components/app/icons/MacOS.js +0 -6
- package/dist/src/components/app/icons/MacOS.js.map +0 -1
- package/dist/src/components/app/icons/NodeJs.d.ts +0 -3
- package/dist/src/components/app/icons/NodeJs.d.ts.map +0 -1
- package/dist/src/components/app/icons/NodeJs.js +0 -8
- package/dist/src/components/app/icons/NodeJs.js.map +0 -1
- package/dist/src/components/app/icons/Ruby.d.ts +0 -3
- package/dist/src/components/app/icons/Ruby.d.ts.map +0 -1
- package/dist/src/components/app/icons/Ruby.js +0 -6
- package/dist/src/components/app/icons/Ruby.js.map +0 -1
- package/dist/src/components/app/icons/Windows.d.ts +0 -3
- package/dist/src/components/app/icons/Windows.d.ts.map +0 -1
- package/dist/src/components/app/icons/Windows.js +0 -6
- package/dist/src/components/app/icons/Windows.js.map +0 -1
- package/dist/src/components/app/index.d.ts +0 -15
- package/dist/src/components/app/index.d.ts.map +0 -1
- package/dist/src/components/app/index.js.map +0 -1
- package/dist/src/components/app/makeSetupString.d.ts +0 -3
- package/dist/src/components/app/makeSetupString.d.ts.map +0 -1
- package/dist/src/components/app/makeSetupString.js +0 -21
- package/dist/src/components/app/makeSetupString.js.map +0 -1
- package/dist/src/components/app/rehypePlugins.d.ts +0 -4
- package/dist/src/components/app/rehypePlugins.d.ts.map +0 -1
- package/dist/src/components/app/rehypePlugins.js +0 -9
- package/dist/src/components/app/rehypePlugins.js.map +0 -1
- package/dist/src/components/app/remarkPlugins.d.ts +0 -4
- package/dist/src/components/app/remarkPlugins.d.ts.map +0 -1
- package/dist/src/components/app/remarkPlugins.js +0 -4
- package/dist/src/components/app/remarkPlugins.js.map +0 -1
- package/dist/src/components/customise/CustomRendering.d.ts.map +0 -1
- package/dist/src/components/customise/CustomRendering.js +0 -34
- package/dist/src/components/customise/CustomRendering.js.map +0 -1
- package/dist/src/components/customise/CustomRendering.stories.scss +0 -25
- package/dist/src/components/customise/index.d.ts +0 -3
- package/dist/src/components/customise/index.d.ts.map +0 -1
- package/dist/src/components/customise/index.js.map +0 -1
- package/dist/src/components/customise/theming.d.ts.map +0 -1
- package/dist/src/components/customise/theming.js +0 -2
- package/dist/src/components/customise/theming.js.map +0 -1
- package/dist/src/components/gherkin/Anchor.d.ts +0 -4
- package/dist/src/components/gherkin/Anchor.d.ts.map +0 -1
- package/dist/src/components/gherkin/Anchor.js +0 -16
- package/dist/src/components/gherkin/Anchor.js.map +0 -1
- package/dist/src/components/gherkin/Background.d.ts +0 -4
- package/dist/src/components/gherkin/Background.d.ts.map +0 -1
- package/dist/src/components/gherkin/Background.js +0 -24
- package/dist/src/components/gherkin/Background.js.map +0 -1
- package/dist/src/components/gherkin/Children.d.ts +0 -4
- package/dist/src/components/gherkin/Children.d.ts.map +0 -1
- package/dist/src/components/gherkin/Children.js +0 -11
- package/dist/src/components/gherkin/Children.js.map +0 -1
- package/dist/src/components/gherkin/DataTable.d.ts +0 -4
- package/dist/src/components/gherkin/DataTable.d.ts.map +0 -1
- package/dist/src/components/gherkin/DataTable.js +0 -18
- package/dist/src/components/gherkin/DataTable.js.map +0 -1
- package/dist/src/components/gherkin/Description.d.ts +0 -4
- package/dist/src/components/gherkin/Description.d.ts.map +0 -1
- package/dist/src/components/gherkin/Description.js +0 -16
- package/dist/src/components/gherkin/Description.js.map +0 -1
- package/dist/src/components/gherkin/DocString.d.ts +0 -4
- package/dist/src/components/gherkin/DocString.d.ts.map +0 -1
- package/dist/src/components/gherkin/DocString.js +0 -13
- package/dist/src/components/gherkin/DocString.js.map +0 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts +0 -4
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +0 -1
- package/dist/src/components/gherkin/ErrorMessage.js +0 -11
- package/dist/src/components/gherkin/ErrorMessage.js.map +0 -1
- package/dist/src/components/gherkin/Examples.d.ts +0 -4
- package/dist/src/components/gherkin/Examples.d.ts.map +0 -1
- package/dist/src/components/gherkin/Examples.js +0 -42
- package/dist/src/components/gherkin/Examples.js.map +0 -1
- package/dist/src/components/gherkin/Feature.d.ts +0 -4
- package/dist/src/components/gherkin/Feature.d.ts.map +0 -1
- package/dist/src/components/gherkin/Feature.js +0 -40
- package/dist/src/components/gherkin/Feature.js.map +0 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts +0 -4
- package/dist/src/components/gherkin/GherkinDocument.d.ts.map +0 -1
- package/dist/src/components/gherkin/GherkinDocument.js +0 -11
- package/dist/src/components/gherkin/GherkinDocument.js.map +0 -1
- package/dist/src/components/gherkin/Keyword.d.ts +0 -4
- package/dist/src/components/gherkin/Keyword.d.ts.map +0 -1
- package/dist/src/components/gherkin/Keyword.js +0 -11
- package/dist/src/components/gherkin/Keyword.js.map +0 -1
- package/dist/src/components/gherkin/Parameter.d.ts +0 -4
- package/dist/src/components/gherkin/Parameter.d.ts.map +0 -1
- package/dist/src/components/gherkin/Parameter.js +0 -11
- package/dist/src/components/gherkin/Parameter.js.map +0 -1
- package/dist/src/components/gherkin/Rule.d.ts +0 -4
- package/dist/src/components/gherkin/Rule.d.ts.map +0 -1
- package/dist/src/components/gherkin/Rule.js +0 -36
- package/dist/src/components/gherkin/Rule.js.map +0 -1
- package/dist/src/components/gherkin/Scenario.d.ts +0 -4
- package/dist/src/components/gherkin/Scenario.d.ts.map +0 -1
- package/dist/src/components/gherkin/Scenario.js +0 -31
- package/dist/src/components/gherkin/Scenario.js.map +0 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts +0 -4
- package/dist/src/components/gherkin/StatusIcon.d.ts.map +0 -1
- package/dist/src/components/gherkin/StatusIcon.js +0 -24
- package/dist/src/components/gherkin/StatusIcon.js.map +0 -1
- package/dist/src/components/gherkin/StepsList.d.ts +0 -5
- package/dist/src/components/gherkin/StepsList.d.ts.map +0 -1
- package/dist/src/components/gherkin/StepsList.js +0 -6
- package/dist/src/components/gherkin/StepsList.js.map +0 -1
- package/dist/src/components/gherkin/Tags.d.ts +0 -4
- package/dist/src/components/gherkin/Tags.d.ts.map +0 -1
- package/dist/src/components/gherkin/Tags.js +0 -16
- package/dist/src/components/gherkin/Tags.js.map +0 -1
- package/dist/src/components/gherkin/Title.d.ts +0 -4
- package/dist/src/components/gherkin/Title.d.ts.map +0 -1
- package/dist/src/components/gherkin/Title.js +0 -13
- package/dist/src/components/gherkin/Title.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Attachment.d.ts +0 -4
- package/dist/src/components/gherkin/attachment/Attachment.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Attachment.js +0 -48
- package/dist/src/components/gherkin/attachment/Attachment.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Image.d.ts +0 -8
- package/dist/src/components/gherkin/attachment/Image.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Image.js +0 -18
- package/dist/src/components/gherkin/attachment/Image.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Links.d.ts +0 -8
- package/dist/src/components/gherkin/attachment/Links.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Links.js +0 -17
- package/dist/src/components/gherkin/attachment/Links.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Log.d.ts +0 -8
- package/dist/src/components/gherkin/attachment/Log.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Log.js +0 -12
- package/dist/src/components/gherkin/attachment/Log.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Text.d.ts +0 -9
- package/dist/src/components/gherkin/attachment/Text.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Text.js +0 -18
- package/dist/src/components/gherkin/attachment/Text.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Unknown.d.ts +0 -4
- package/dist/src/components/gherkin/attachment/Unknown.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Unknown.js +0 -69
- package/dist/src/components/gherkin/attachment/Unknown.js.map +0 -1
- package/dist/src/components/gherkin/attachment/Video.d.ts +0 -6
- package/dist/src/components/gherkin/attachment/Video.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/Video.js +0 -20
- package/dist/src/components/gherkin/attachment/Video.js.map +0 -1
- package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts +0 -3
- package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/attachmentFilename.js +0 -12
- package/dist/src/components/gherkin/attachment/attachmentFilename.js.map +0 -1
- package/dist/src/components/gherkin/attachment/base64Decode.d.ts +0 -2
- package/dist/src/components/gherkin/attachment/base64Decode.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/base64Decode.js +0 -5
- package/dist/src/components/gherkin/attachment/base64Decode.js.map +0 -1
- package/dist/src/components/gherkin/attachment/index.d.ts +0 -2
- package/dist/src/components/gherkin/attachment/index.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/index.js.map +0 -1
- package/dist/src/components/gherkin/attachment/useText.d.ts.map +0 -1
- package/dist/src/components/gherkin/attachment/useText.js +0 -28
- package/dist/src/components/gherkin/attachment/useText.js.map +0 -1
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts +0 -3
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts.map +0 -1
- package/dist/src/components/gherkin/composeHookStepTitle.js +0 -23
- package/dist/src/components/gherkin/composeHookStepTitle.js.map +0 -1
- package/dist/src/components/gherkin/composePickleStepTitle.d.ts.map +0 -1
- package/dist/src/components/gherkin/composePickleStepTitle.js +0 -36
- package/dist/src/components/gherkin/composePickleStepTitle.js.map +0 -1
- package/dist/src/components/gherkin/index.d.ts +0 -19
- package/dist/src/components/gherkin/index.d.ts.map +0 -1
- package/dist/src/components/gherkin/index.js.map +0 -1
- package/dist/src/components/gherkin/isNumber.d.ts.map +0 -1
- package/dist/src/components/gherkin/isNumber.js +0 -7
- package/dist/src/components/gherkin/isNumber.js.map +0 -1
- package/dist/src/components/gherkin/statusName.d.ts +0 -4
- package/dist/src/components/gherkin/statusName.d.ts.map +0 -1
- package/dist/src/components/gherkin/statusName.js +0 -4
- package/dist/src/components/gherkin/statusName.js.map +0 -1
- package/dist/src/components/index.d.ts +0 -4
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/index.js.map +0 -1
- package/dist/src/components/results/TestCaseOutcome.d.ts +0 -8
- package/dist/src/components/results/TestCaseOutcome.d.ts.map +0 -1
- package/dist/src/components/results/TestCaseOutcome.js +0 -36
- package/dist/src/components/results/TestCaseOutcome.js.map +0 -1
- package/dist/src/components/results/TestRunHookOutcome.d.ts.map +0 -1
- package/dist/src/components/results/TestRunHookOutcome.js +0 -20
- package/dist/src/components/results/TestRunHookOutcome.js.map +0 -1
- package/dist/src/components/results/TestStepAttachments.d.ts +0 -8
- package/dist/src/components/results/TestStepAttachments.d.ts.map +0 -1
- package/dist/src/components/results/TestStepAttachments.js +0 -13
- package/dist/src/components/results/TestStepAttachments.js.map +0 -1
- package/dist/src/components/results/TestStepDuration.d.ts +0 -6
- package/dist/src/components/results/TestStepDuration.d.ts.map +0 -1
- package/dist/src/components/results/TestStepDuration.js +0 -17
- package/dist/src/components/results/TestStepDuration.js.map +0 -1
- package/dist/src/components/results/TestStepOutcome.d.ts.map +0 -1
- package/dist/src/components/results/TestStepOutcome.js +0 -54
- package/dist/src/components/results/TestStepOutcome.js.map +0 -1
- 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/components/results/index.d.ts +0 -3
- package/dist/src/components/results/index.d.ts.map +0 -1
- package/dist/src/components/results/index.js +0 -3
- package/dist/src/components/results/index.js.map +0 -1
- package/dist/src/formatExecutionDistance.d.ts.map +0 -1
- package/dist/src/formatExecutionDistance.js +0 -7
- package/dist/src/formatExecutionDistance.js.map +0 -1
- package/dist/src/formatExecutionDuration.d.ts.map +0 -1
- package/dist/src/formatExecutionDuration.js +0 -12
- package/dist/src/formatExecutionDuration.js.map +0 -1
- package/dist/src/formatPassedQuantity.d.ts.map +0 -1
- package/dist/src/formatPassedQuantity.js +0 -4
- package/dist/src/formatPassedQuantity.js.map +0 -1
- package/dist/src/formatStatusRate.d.ts.map +0 -1
- package/dist/src/formatStatusRate.js +0 -9
- package/dist/src/formatStatusRate.js.map +0 -1
- package/dist/src/hooks/helpers.d.ts.map +0 -1
- package/dist/src/hooks/helpers.js +0 -7
- package/dist/src/hooks/helpers.js.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -3
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/hooks/useFilteredDocuments.d.ts +0 -6
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +0 -1
- package/dist/src/hooks/useFilteredDocuments.js +0 -49
- package/dist/src/hooks/useFilteredDocuments.js.map +0 -1
- package/dist/src/hooks/useMostSevereStatusByUri.d.ts.map +0 -1
- package/dist/src/hooks/useMostSevereStatusByUri.js +0 -25
- package/dist/src/hooks/useMostSevereStatusByUri.js.map +0 -1
- package/dist/src/hooks/useQueries.d.ts +0 -7
- package/dist/src/hooks/useQueries.d.ts.map +0 -1
- package/dist/src/hooks/useQueries.js +0 -9
- package/dist/src/hooks/useQueries.js.map +0 -1
- package/dist/src/hooks/useResultStatistics.d.ts.map +0 -1
- package/dist/src/hooks/useResultStatistics.js +0 -24
- package/dist/src/hooks/useResultStatistics.js.map +0 -1
- package/dist/src/hooks/useSearch.d.ts +0 -3
- package/dist/src/hooks/useSearch.d.ts.map +0 -1
- package/dist/src/hooks/useSearch.js +0 -6
- package/dist/src/hooks/useSearch.js.map +0 -1
- package/dist/src/hooks/useTestCaseStarted.d.ts +0 -3
- package/dist/src/hooks/useTestCaseStarted.d.ts.map +0 -1
- package/dist/src/hooks/useTestCaseStarted.js +0 -17
- package/dist/src/hooks/useTestCaseStarted.js.map +0 -1
- package/dist/src/hooks/useTestRunHooks.d.ts.map +0 -1
- package/dist/src/hooks/useTestRunHooks.js +0 -14
- package/dist/src/hooks/useTestRunHooks.js.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/isTagExpression.d.ts.map +0 -1
- package/dist/src/isTagExpression.js +0 -5
- package/dist/src/isTagExpression.js.map +0 -1
- package/dist/src/search/FeatureSearch.d.ts +0 -4
- package/dist/src/search/FeatureSearch.d.ts.map +0 -1
- package/dist/src/search/FeatureSearch.js +0 -45
- package/dist/src/search/FeatureSearch.js.map +0 -1
- package/dist/src/search/ScenarioLikeSearch.d.ts +0 -25
- package/dist/src/search/ScenarioLikeSearch.d.ts.map +0 -1
- package/dist/src/search/ScenarioLikeSearch.js +0 -41
- package/dist/src/search/ScenarioLikeSearch.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/StepSearch.d.ts +0 -19
- package/dist/src/search/StepSearch.d.ts.map +0 -1
- package/dist/src/search/StepSearch.js +0 -44
- package/dist/src/search/StepSearch.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
- package/dist/src/search/TextSearch.d.ts +0 -3
- package/dist/src/search/TextSearch.d.ts.map +0 -1
- package/dist/src/search/TextSearch.js +0 -63
- package/dist/src/search/TextSearch.js.map +0 -1
- package/dist/src/search/index.d.ts +0 -3
- package/dist/src/search/index.d.ts.map +0 -1
- package/dist/src/search/index.js +0 -3
- package/dist/src/search/index.js.map +0 -1
- package/dist/src/search/types.d.ts +0 -14
- package/dist/src/search/types.d.ts.map +0 -1
- package/dist/src/search/types.js +0 -2
- package/dist/src/search/types.js.map +0 -1
- package/dist/src/statuses.d.ts.map +0 -1
- package/dist/src/statuses.js +0 -12
- package/dist/src/statuses.js.map +0 -1
- package/dist/src/toRepositoryId.d.ts +0 -2
- package/dist/src/toRepositoryId.d.ts.map +0 -1
- package/dist/src/toRepositoryId.js +0 -11
- package/dist/src/toRepositoryId.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- /package/dist/{src/components → components}/app/CopyButton.module.scss +0 -0
- /package/dist/{src/components → components}/app/ExecutionSummary.module.scss +0 -0
- /package/dist/{src/components → components}/app/FilteredDocuments.module.scss +0 -0
- /package/dist/{src/components → components}/app/Header.module.scss +0 -0
- /package/dist/{src/components → components}/app/HealthChart.module.scss +0 -0
- /package/dist/{src/components → components}/app/NavigationButton.module.scss +0 -0
- /package/dist/{src/components → components}/app/Report.module.scss +0 -0
- /package/dist/{src/components → components}/app/SearchBar.module.scss +0 -0
- /package/dist/{src/components → components}/app/StatusesSummary.module.scss +0 -0
- /package/dist/{src/components → components}/app/TestRunHooks.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Anchor.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Children.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/DataTable.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Description.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/DocString.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Examples.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Parameter.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/StatusIcon.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/StepsList.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Tags.module.scss +0 -0
- /package/dist/{src/components → components}/gherkin/Title.module.scss +0 -0
- /package/dist/{src/components → components}/results/TestCaseOutcome.module.scss +0 -0
- /package/dist/{src/components → components}/results/TestRunHookOutcome.module.scss +0 -0
- /package/dist/{src/components → components}/results/TestStepAttachments.module.scss +0 -0
- /package/dist/{src/components → components}/results/TestStepDuration.module.scss +0 -0
- /package/dist/{src/styles → styles}/statuses.scss +0 -0
- /package/dist/{src/styles → styles}/tables.scss +0 -0
- /package/dist/{src/styles → styles}/theming.scss +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { create, insert, search } from '@orama/orama';
|
|
2
|
-
const schema = {
|
|
3
|
-
name: 'string',
|
|
4
|
-
description: 'string',
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* A little different than the other indexes - a Feature doesn't have its own id,
|
|
8
|
-
* so we use the uri of the GherkinDocument as a pointer
|
|
9
|
-
*/
|
|
10
|
-
class FeatureSearch {
|
|
11
|
-
featuresByUri = new Map();
|
|
12
|
-
index;
|
|
13
|
-
constructor(index) {
|
|
14
|
-
this.index = index;
|
|
15
|
-
}
|
|
16
|
-
async search(term) {
|
|
17
|
-
const { hits } = await search(this.index, {
|
|
18
|
-
term,
|
|
19
|
-
});
|
|
20
|
-
return hits.map((hit) => this.featuresByUri.get(hit.id));
|
|
21
|
-
}
|
|
22
|
-
async add(gherkinDocument) {
|
|
23
|
-
if (!gherkinDocument.feature)
|
|
24
|
-
return this;
|
|
25
|
-
if (!gherkinDocument.uri)
|
|
26
|
-
throw new Error('Missing uri on gherkinDocument');
|
|
27
|
-
this.featuresByUri.set(gherkinDocument.uri, gherkinDocument.feature);
|
|
28
|
-
await insert(this.index, {
|
|
29
|
-
id: gherkinDocument.uri,
|
|
30
|
-
name: gherkinDocument.feature.name,
|
|
31
|
-
description: gherkinDocument.feature.description,
|
|
32
|
-
});
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export async function createFeatureSearch() {
|
|
37
|
-
const index = await create({
|
|
38
|
-
schema,
|
|
39
|
-
sort: {
|
|
40
|
-
enabled: false,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
return new FeatureSearch(index);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=FeatureSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSearch.js","sourceRoot":"","sources":["../../../src/search/FeatureSearch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAS,MAAM,EAAE,MAAM,cAAc,CAAA;AAI5D,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;CACb,CAAA;AAEV;;;GAGG;AACH,MAAM,aAAa;IACA,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAA;IAC1C,KAAK,CAAsB;IAE5C,YAAY,KAA2B;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACxC,IAAI;SACL,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAc,CAAA;IACvE,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,eAAgC;QACxC,IAAI,CAAC,eAAe,CAAC,OAAO;YAAE,OAAO,IAAI,CAAA;QACzC,IAAI,CAAC,eAAe,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QAC3E,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;QACpE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACvB,EAAE,EAAE,eAAe,CAAC,GAAG;YACvB,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,IAAI;YAClC,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,WAAW;SACjD,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,MAAM,KAAK,GAAyB,MAAM,MAAM,CAAC;QAC/C,MAAM;QACN,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK;SACf;KACF,CAAC,CAAA;IACF,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import { Feature, GherkinDocument } from '@cucumber/messages'\nimport { create, insert, Orama, search } from '@orama/orama'\n\nimport { TypedIndex } from './types.js'\n\nconst schema = {\n name: 'string',\n description: 'string',\n} as const\n\n/**\n * A little different than the other indexes - a Feature doesn't have its own id,\n * so we use the uri of the GherkinDocument as a pointer\n */\nclass FeatureSearch implements TypedIndex<Feature, GherkinDocument> {\n private readonly featuresByUri = new Map<string, Feature>()\n private readonly index: Orama<typeof schema>\n\n constructor(index: Orama<typeof schema>) {\n this.index = index\n }\n\n async search(term: string): Promise<Array<Feature>> {\n const { hits } = await search(this.index, {\n term,\n })\n return hits.map((hit) => this.featuresByUri.get(hit.id)) as Feature[]\n }\n\n async add(gherkinDocument: GherkinDocument): Promise<this> {\n if (!gherkinDocument.feature) return this\n if (!gherkinDocument.uri) throw new Error('Missing uri on gherkinDocument')\n this.featuresByUri.set(gherkinDocument.uri, gherkinDocument.feature)\n await insert(this.index, {\n id: gherkinDocument.uri,\n name: gherkinDocument.feature.name,\n description: gherkinDocument.feature.description,\n })\n return this\n }\n}\n\nexport async function createFeatureSearch(): Promise<TypedIndex<Feature, GherkinDocument>> {\n const index: Orama<typeof schema> = await create({\n schema,\n sort: {\n enabled: false,\n },\n })\n return new FeatureSearch(index)\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Orama } from '@orama/orama';
|
|
2
|
-
import { TypedIndex } from './types.js';
|
|
3
|
-
declare const schema: {
|
|
4
|
-
readonly name: "string";
|
|
5
|
-
readonly description: "string";
|
|
6
|
-
};
|
|
7
|
-
export interface ScenarioLike {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Can be used for Backgrounds, Scenarios and Rules, searching against the
|
|
14
|
-
* name and description
|
|
15
|
-
*/
|
|
16
|
-
declare class ScenarioLikeSearch<T extends ScenarioLike> implements TypedIndex<T> {
|
|
17
|
-
private itemById;
|
|
18
|
-
private readonly index;
|
|
19
|
-
constructor(index: Orama<typeof schema>);
|
|
20
|
-
search(term: string): Promise<Array<T>>;
|
|
21
|
-
add(item: T): Promise<this>;
|
|
22
|
-
}
|
|
23
|
-
export declare function createScenarioLikeSearch<T extends ScenarioLike>(): Promise<ScenarioLikeSearch<T>>;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=ScenarioLikeSearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScenarioLikeSearch.d.ts","sourceRoot":"","sources":["../../../src/search/ScenarioLikeSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,EAAU,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,MAAM;;;CAGF,CAAA;AAEV,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,cAAM,kBAAkB,CAAC,CAAC,SAAS,YAAY,CAAE,YAAW,UAAU,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBAEhC,KAAK,EAAE,KAAK,CAAC,OAAO,MAAM,CAAC;IAIjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAOvC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CASlC;AAED,wBAAsB,wBAAwB,CAAC,CAAC,SAAS,YAAY,KAAK,OAAO,CAC/E,kBAAkB,CAAC,CAAC,CAAC,CACtB,CAQA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { create, insert, search } from '@orama/orama';
|
|
2
|
-
const schema = {
|
|
3
|
-
name: 'string',
|
|
4
|
-
description: 'string',
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Can be used for Backgrounds, Scenarios and Rules, searching against the
|
|
8
|
-
* name and description
|
|
9
|
-
*/
|
|
10
|
-
class ScenarioLikeSearch {
|
|
11
|
-
itemById = new Map();
|
|
12
|
-
index;
|
|
13
|
-
constructor(index) {
|
|
14
|
-
this.index = index;
|
|
15
|
-
}
|
|
16
|
-
async search(term) {
|
|
17
|
-
const { hits } = await search(this.index, {
|
|
18
|
-
term,
|
|
19
|
-
});
|
|
20
|
-
return hits.map((hit) => this.itemById.get(hit.id));
|
|
21
|
-
}
|
|
22
|
-
async add(item) {
|
|
23
|
-
this.itemById.set(item.id, item);
|
|
24
|
-
await insert(this.index, {
|
|
25
|
-
id: item.id,
|
|
26
|
-
name: item.name,
|
|
27
|
-
description: item.description,
|
|
28
|
-
});
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export async function createScenarioLikeSearch() {
|
|
33
|
-
const index = await create({
|
|
34
|
-
schema,
|
|
35
|
-
sort: {
|
|
36
|
-
enabled: false,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
return new ScenarioLikeSearch(index);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=ScenarioLikeSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScenarioLikeSearch.js","sourceRoot":"","sources":["../../../src/search/ScenarioLikeSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAS,MAAM,EAAE,MAAM,cAAc,CAAA;AAI5D,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;CACb,CAAA;AAQV;;;GAGG;AACH,MAAM,kBAAkB;IACd,QAAQ,GAAG,IAAI,GAAG,EAAa,CAAA;IACtB,KAAK,CAAsB;IAE5C,YAAY,KAA2B;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACxC,IAAI;SACL,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAQ,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAO;QACf,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QAChC,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACvB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB;IAG5C,MAAM,KAAK,GAAyB,MAAM,MAAM,CAAC;QAC/C,MAAM;QACN,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK;SACf;KACF,CAAC,CAAA;IACF,OAAO,IAAI,kBAAkB,CAAI,KAAK,CAAC,CAAA;AACzC,CAAC","sourcesContent":["import { create, insert, Orama, search } from '@orama/orama'\n\nimport { TypedIndex } from './types.js'\n\nconst schema = {\n name: 'string',\n description: 'string',\n} as const\n\nexport interface ScenarioLike {\n id: string\n name: string\n description: string\n}\n\n/**\n * Can be used for Backgrounds, Scenarios and Rules, searching against the\n * name and description\n */\nclass ScenarioLikeSearch<T extends ScenarioLike> implements TypedIndex<T> {\n private itemById = new Map<string, T>()\n private readonly index: Orama<typeof schema>\n\n constructor(index: Orama<typeof schema>) {\n this.index = index\n }\n\n async search(term: string): Promise<Array<T>> {\n const { hits } = await search(this.index, {\n term,\n })\n return hits.map((hit) => this.itemById.get(hit.id)) as T[]\n }\n\n async add(item: T): Promise<this> {\n this.itemById.set(item.id, item)\n await insert(this.index, {\n id: item.id,\n name: item.name,\n description: item.description,\n })\n return this\n }\n}\n\nexport async function createScenarioLikeSearch<T extends ScenarioLike>(): Promise<\n ScenarioLikeSearch<T>\n> {\n const index: Orama<typeof schema> = await create({\n schema,\n sort: {\n enabled: false,\n },\n })\n return new ScenarioLikeSearch<T>(index)\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
|
|
2
|
-
import { Searchable } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a search index that supports querying by term or tag expression, and
|
|
5
|
-
* returns an array of abridged Gherkin documents matching the query.
|
|
6
|
-
*
|
|
7
|
-
* @param gherkinQuery - query instance used internally for searching, with any
|
|
8
|
-
* documents already present being pre-populated in the search index
|
|
9
|
-
*/
|
|
10
|
-
export declare function createSearch(gherkinQuery: GherkinQuery): Promise<Searchable>;
|
|
11
|
-
//# sourceMappingURL=Search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/search/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAM/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAkCvC;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAUlF"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import isTagExpression from '../isTagExpression.js';
|
|
2
|
-
import { createTagSearch } from './TagSearch.js';
|
|
3
|
-
import { createTextSearch } from './TextSearch.js';
|
|
4
|
-
class Search {
|
|
5
|
-
tagSearch;
|
|
6
|
-
textSearch;
|
|
7
|
-
documents = [];
|
|
8
|
-
constructor(tagSearch, textSearch) {
|
|
9
|
-
this.tagSearch = tagSearch;
|
|
10
|
-
this.textSearch = textSearch;
|
|
11
|
-
}
|
|
12
|
-
async search(query) {
|
|
13
|
-
if (!query) {
|
|
14
|
-
return [...this.documents];
|
|
15
|
-
}
|
|
16
|
-
if (isTagExpression(query)) {
|
|
17
|
-
try {
|
|
18
|
-
return await this.tagSearch.search(query);
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
// No-op, we fall back to text search.
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return this.textSearch.search(query);
|
|
25
|
-
}
|
|
26
|
-
async add(gherkinDocument) {
|
|
27
|
-
this.documents.push(gherkinDocument);
|
|
28
|
-
await this.tagSearch.add(gherkinDocument);
|
|
29
|
-
await this.textSearch.add(gherkinDocument);
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Creates a search index that supports querying by term or tag expression, and
|
|
35
|
-
* returns an array of abridged Gherkin documents matching the query.
|
|
36
|
-
*
|
|
37
|
-
* @param gherkinQuery - query instance used internally for searching, with any
|
|
38
|
-
* documents already present being pre-populated in the search index
|
|
39
|
-
*/
|
|
40
|
-
export async function createSearch(gherkinQuery) {
|
|
41
|
-
const [tagSearch, textSearch] = await Promise.all([
|
|
42
|
-
createTagSearch(gherkinQuery),
|
|
43
|
-
createTextSearch(),
|
|
44
|
-
]);
|
|
45
|
-
const searchImpl = new Search(tagSearch, textSearch);
|
|
46
|
-
for (const doc of gherkinQuery.getGherkinDocuments()) {
|
|
47
|
-
await searchImpl.add(doc);
|
|
48
|
-
}
|
|
49
|
-
return searchImpl;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=Search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../src/search/Search.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAGlD,MAAM,MAAM;IAIS;IACA;IAJF,SAAS,GAAsB,EAAE,CAAA;IAElD,YACmB,SAAqB,EACrB,UAAsB;QADtB,cAAS,GAAT,SAAS,CAAY;QACrB,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEG,KAAK,CAAC,MAAM,CAAC,KAAa;QAC/B,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAA;SAC3B;QAED,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;aAC1C;YAAC,MAAM;gBACN,sCAAsC;aACvC;SACF;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,eAAgC;QAC/C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACpC,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QACzC,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,YAA0B;IAC3D,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,eAAe,CAAC,YAAY,CAAC;QAC7B,gBAAgB,EAAE;KACnB,CAAC,CAAA;IACF,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IACpD,KAAK,MAAM,GAAG,IAAI,YAAY,CAAC,mBAAmB,EAAE,EAAE;QACpD,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KAC1B;IACD,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { Query as GherkinQuery } from '@cucumber/gherkin-utils'\nimport { GherkinDocument } from '@cucumber/messages'\n\nimport isTagExpression from '../isTagExpression.js'\nimport { createTagSearch } from './TagSearch.js'\nimport { createTextSearch } from './TextSearch.js'\nimport { Searchable } from './types.js'\n\nclass Search {\n private readonly documents: GherkinDocument[] = []\n\n constructor(\n private readonly tagSearch: Searchable,\n private readonly textSearch: Searchable\n ) {}\n\n public async search(query: string): Promise<readonly GherkinDocument[]> {\n if (!query) {\n return [...this.documents]\n }\n\n if (isTagExpression(query)) {\n try {\n return await this.tagSearch.search(query)\n } catch {\n // No-op, we fall back to text search.\n }\n }\n\n return this.textSearch.search(query)\n }\n\n public async add(gherkinDocument: GherkinDocument) {\n this.documents.push(gherkinDocument)\n await this.tagSearch.add(gherkinDocument)\n await this.textSearch.add(gherkinDocument)\n return this\n }\n}\n\n/**\n * Creates a search index that supports querying by term or tag expression, and\n * returns an array of abridged Gherkin documents matching the query.\n *\n * @param gherkinQuery - query instance used internally for searching, with any\n * documents already present being pre-populated in the search index\n */\nexport async function createSearch(gherkinQuery: GherkinQuery): Promise<Searchable> {\n const [tagSearch, textSearch] = await Promise.all([\n createTagSearch(gherkinQuery),\n createTextSearch(),\n ])\n const searchImpl = new Search(tagSearch, textSearch)\n for (const doc of gherkinQuery.getGherkinDocuments()) {\n await searchImpl.add(doc)\n }\n return searchImpl\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Step } from '@cucumber/messages';
|
|
2
|
-
import { Orama } from '@orama/orama';
|
|
3
|
-
import { TypedIndex } from './types.js';
|
|
4
|
-
declare const schema: {
|
|
5
|
-
readonly keyword: "string";
|
|
6
|
-
readonly text: "string";
|
|
7
|
-
readonly docString: "string";
|
|
8
|
-
readonly dataTable: "string[]";
|
|
9
|
-
};
|
|
10
|
-
declare class StepSearch implements TypedIndex<Step> {
|
|
11
|
-
private readonly stepById;
|
|
12
|
-
private readonly index;
|
|
13
|
-
constructor(index: Orama<typeof schema>);
|
|
14
|
-
search(term: string): Promise<Array<Step>>;
|
|
15
|
-
add(step: Step): Promise<this>;
|
|
16
|
-
}
|
|
17
|
-
export declare function createStepSearch(): Promise<StepSearch>;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=StepSearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StepSearch.d.ts","sourceRoot":"","sources":["../../../src/search/StepSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAkB,KAAK,EAAU,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,QAAA,MAAM,MAAM;;;;;CAKF,CAAA;AAEV,cAAM,UAAW,YAAW,UAAU,CAAC,IAAI,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBAEhC,KAAK,EAAE,KAAK,CAAC,OAAO,MAAM,CAAC;IAIjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAU1C,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAWrC;AAED,wBAAsB,gBAAgB,wBAQrC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { create, insert, search } from '@orama/orama';
|
|
2
|
-
const schema = {
|
|
3
|
-
keyword: 'string',
|
|
4
|
-
text: 'string',
|
|
5
|
-
docString: 'string',
|
|
6
|
-
dataTable: 'string[]',
|
|
7
|
-
};
|
|
8
|
-
class StepSearch {
|
|
9
|
-
stepById = new Map();
|
|
10
|
-
index;
|
|
11
|
-
constructor(index) {
|
|
12
|
-
this.index = index;
|
|
13
|
-
}
|
|
14
|
-
async search(term) {
|
|
15
|
-
const { hits } = await search(this.index, {
|
|
16
|
-
term,
|
|
17
|
-
boost: {
|
|
18
|
-
text: 2,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
return hits.map((hit) => this.stepById.get(hit.id));
|
|
22
|
-
}
|
|
23
|
-
async add(step) {
|
|
24
|
-
this.stepById.set(step.id, step);
|
|
25
|
-
await insert(this.index, {
|
|
26
|
-
id: step.id,
|
|
27
|
-
keyword: step.keyword,
|
|
28
|
-
text: step.text,
|
|
29
|
-
docString: step.docString?.content,
|
|
30
|
-
dataTable: step.dataTable?.rows.flatMap((row) => row.cells).map((cell) => cell.value),
|
|
31
|
-
});
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export async function createStepSearch() {
|
|
36
|
-
const index = await create({
|
|
37
|
-
schema,
|
|
38
|
-
sort: {
|
|
39
|
-
enabled: false,
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
return new StepSearch(index);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=StepSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StepSearch.js","sourceRoot":"","sources":["../../../src/search/StepSearch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAS,MAAM,EAAE,MAAM,cAAc,CAAA;AAI5D,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,UAAU;CACb,CAAA;AAEV,MAAM,UAAU;IACG,QAAQ,GAAG,IAAI,GAAG,EAAgB,CAAA;IAClC,KAAK,CAAsB;IAE5C,YAAY,KAA2B;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACxC,IAAI;YACJ,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC;aACR;SACF,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAW,CAAA;IAC/D,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAU;QAClB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QAChC,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE;YACvB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO;YAClC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;SACtF,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,KAAK,GAAyB,MAAM,MAAM,CAAC;QAC/C,MAAM;QACN,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK;SACf;KACF,CAAC,CAAA;IACF,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC","sourcesContent":["import { Step } from '@cucumber/messages'\nimport { create, insert, Orama, search } from '@orama/orama'\n\nimport { TypedIndex } from './types.js'\n\nconst schema = {\n keyword: 'string',\n text: 'string',\n docString: 'string',\n dataTable: 'string[]',\n} as const\n\nclass StepSearch implements TypedIndex<Step> {\n private readonly stepById = new Map<string, Step>()\n private readonly index: Orama<typeof schema>\n\n constructor(index: Orama<typeof schema>) {\n this.index = index\n }\n\n async search(term: string): Promise<Array<Step>> {\n const { hits } = await search(this.index, {\n term,\n boost: {\n text: 2,\n },\n })\n return hits.map((hit) => this.stepById.get(hit.id)) as Step[]\n }\n\n async add(step: Step): Promise<this> {\n this.stepById.set(step.id, step)\n await insert(this.index, {\n id: step.id,\n keyword: step.keyword,\n text: step.text,\n docString: step.docString?.content,\n dataTable: step.dataTable?.rows.flatMap((row) => row.cells).map((cell) => cell.value),\n })\n return this\n }\n}\n\nexport async function createStepSearch() {\n const index: Orama<typeof schema> = await create({\n schema,\n sort: {\n enabled: false,\n },\n })\n return new StepSearch(index)\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TagSearch.d.ts","sourceRoot":"","sources":["../../../src/search/TagSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,YAAY,EAEtB,MAAM,yBAAyB,CAAA;AAMhC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AA6DvC,wBAAsB,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAErF"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { GherkinDocumentWalker, rejectAllFilters, } from '@cucumber/gherkin-utils';
|
|
2
|
-
import parse from '@cucumber/tag-expressions';
|
|
3
|
-
import { ArrayMultimap } from '@teppeis/multimaps';
|
|
4
|
-
class TagSearch {
|
|
5
|
-
gherkinQuery;
|
|
6
|
-
pickleById = new Map();
|
|
7
|
-
picklesByScenarioId = new ArrayMultimap();
|
|
8
|
-
gherkinDocuments = [];
|
|
9
|
-
constructor(gherkinQuery) {
|
|
10
|
-
this.gherkinQuery = gherkinQuery;
|
|
11
|
-
this.gherkinQuery = gherkinQuery;
|
|
12
|
-
}
|
|
13
|
-
async search(query) {
|
|
14
|
-
const expressionNode = parse(query);
|
|
15
|
-
const tagFilters = {
|
|
16
|
-
acceptScenario: (scenario) => {
|
|
17
|
-
const pickles = this.picklesByScenarioId.get(scenario.id);
|
|
18
|
-
for (const pickle of pickles) {
|
|
19
|
-
const tags = pickle.tags.map((tag) => tag.name);
|
|
20
|
-
if (expressionNode.evaluate(tags)) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return false;
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const filters = { ...rejectAllFilters, ...tagFilters };
|
|
28
|
-
const astWalker = new GherkinDocumentWalker(filters);
|
|
29
|
-
return this.gherkinDocuments
|
|
30
|
-
.map((gherkinDocument) => astWalker.walkGherkinDocument(gherkinDocument))
|
|
31
|
-
.filter((gherkinDocument) => gherkinDocument !== null);
|
|
32
|
-
}
|
|
33
|
-
async add(gherkinDocument) {
|
|
34
|
-
this.gherkinDocuments.push(gherkinDocument);
|
|
35
|
-
const pickles = this.gherkinQuery.getPickles();
|
|
36
|
-
pickles.forEach((pickle) => this.pickleById.set(pickle.id, pickle));
|
|
37
|
-
const astWalker = new GherkinDocumentWalker({}, {
|
|
38
|
-
handleScenario: (scenario) => {
|
|
39
|
-
if (!gherkinDocument.uri)
|
|
40
|
-
throw new Error('No uri for gherkinDocument');
|
|
41
|
-
const pickleIds = this.gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id);
|
|
42
|
-
pickleIds.map((pickleId) => {
|
|
43
|
-
const pickle = this.pickleById.get(pickleId);
|
|
44
|
-
if (!pickle)
|
|
45
|
-
throw new Error(`No pickle for id=${pickleId}`);
|
|
46
|
-
this.picklesByScenarioId.put(scenario.id, pickle);
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
astWalker.walkGherkinDocument(gherkinDocument);
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
export async function createTagSearch(gherkinQuery) {
|
|
55
|
-
return new TagSearch(gherkinQuery);
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=TagSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TagSearch.js","sourceRoot":"","sources":["../../../src/search/TagSearch.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n GherkinDocumentWalker,\n Query as GherkinQuery,\n rejectAllFilters,\n} from '@cucumber/gherkin-utils'\nimport * as messages from '@cucumber/messages'\nimport { GherkinDocument } from '@cucumber/messages'\nimport parse from '@cucumber/tag-expressions'\nimport { ArrayMultimap } from '@teppeis/multimaps'\n\nimport { Searchable } from './types.js'\n\nclass TagSearch {\n private readonly pickleById = new Map<string, messages.Pickle>()\n private readonly picklesByScenarioId = new ArrayMultimap<string, messages.Pickle>()\n private gherkinDocuments: messages.GherkinDocument[] = []\n\n constructor(private readonly gherkinQuery: GherkinQuery) {\n this.gherkinQuery = gherkinQuery\n }\n\n public async search(query: string): Promise<readonly messages.GherkinDocument[]> {\n const expressionNode = parse(query)\n const tagFilters = {\n acceptScenario: (scenario: messages.Scenario) => {\n const pickles = this.picklesByScenarioId.get(scenario.id)\n\n for (const pickle of pickles) {\n const tags = pickle.tags.map((tag) => tag.name)\n if (expressionNode.evaluate(tags)) {\n return true\n }\n }\n\n return false\n },\n }\n const filters = { ...rejectAllFilters, ...tagFilters }\n const astWalker = new GherkinDocumentWalker(filters)\n\n return this.gherkinDocuments\n .map((gherkinDocument) => astWalker.walkGherkinDocument(gherkinDocument))\n .filter((gherkinDocument) => gherkinDocument !== null) as GherkinDocument[]\n }\n\n public async add(gherkinDocument: messages.GherkinDocument) {\n this.gherkinDocuments.push(gherkinDocument)\n const pickles = this.gherkinQuery.getPickles()\n pickles.forEach((pickle) => this.pickleById.set(pickle.id, pickle))\n\n const astWalker = new GherkinDocumentWalker(\n {},\n {\n handleScenario: (scenario) => {\n if (!gherkinDocument.uri) throw new Error('No uri for gherkinDocument')\n const pickleIds = this.gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id)\n\n pickleIds.map((pickleId) => {\n const pickle = this.pickleById.get(pickleId)\n if (!pickle) throw new Error(`No pickle for id=${pickleId}`)\n this.picklesByScenarioId.put(scenario.id, pickle)\n })\n },\n }\n )\n astWalker.walkGherkinDocument(gherkinDocument)\n\n return this\n }\n}\n\nexport async function createTagSearch(gherkinQuery: GherkinQuery): Promise<Searchable> {\n return new TagSearch(gherkinQuery)\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextSearch.d.ts","sourceRoot":"","sources":["../../../src/search/TextSearch.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAc,MAAM,YAAY,CAAA;AAmEnD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC,CAU5D"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { GherkinDocumentWalker } from '@cucumber/gherkin-utils';
|
|
2
|
-
import { createFeatureSearch } from './FeatureSearch.js';
|
|
3
|
-
import { createScenarioLikeSearch } from './ScenarioLikeSearch.js';
|
|
4
|
-
import { createStepSearch } from './StepSearch.js';
|
|
5
|
-
class TextSearch {
|
|
6
|
-
gherkinDocuments = [];
|
|
7
|
-
stepSearch;
|
|
8
|
-
backgroundSearch;
|
|
9
|
-
scenarioSearch;
|
|
10
|
-
ruleSearch;
|
|
11
|
-
featureSearch;
|
|
12
|
-
constructor(stepSearch, backgroundSearch, scenarioSearch, ruleSearch, featureSearch) {
|
|
13
|
-
this.stepSearch = stepSearch;
|
|
14
|
-
this.backgroundSearch = backgroundSearch;
|
|
15
|
-
this.scenarioSearch = scenarioSearch;
|
|
16
|
-
this.ruleSearch = ruleSearch;
|
|
17
|
-
this.featureSearch = featureSearch;
|
|
18
|
-
}
|
|
19
|
-
async search(query) {
|
|
20
|
-
const [matchingSteps, matchingBackgrounds, matchingScenarios, matchingRules, matchingFeatures] = await Promise.all([
|
|
21
|
-
this.stepSearch.search(query),
|
|
22
|
-
this.backgroundSearch.search(query),
|
|
23
|
-
this.scenarioSearch.search(query),
|
|
24
|
-
this.ruleSearch.search(query),
|
|
25
|
-
this.featureSearch.search(query),
|
|
26
|
-
]);
|
|
27
|
-
const walker = new GherkinDocumentWalker({
|
|
28
|
-
acceptStep: (step) => matchingSteps.includes(step),
|
|
29
|
-
acceptBackground: (background) => matchingBackgrounds.includes(background),
|
|
30
|
-
acceptScenario: (scenario) => matchingScenarios.includes(scenario),
|
|
31
|
-
acceptRule: (rule) => matchingRules.includes(rule),
|
|
32
|
-
acceptFeature: (feature) => matchingFeatures.includes(feature),
|
|
33
|
-
});
|
|
34
|
-
return this.gherkinDocuments
|
|
35
|
-
.map((gherkinDocument) => walker.walkGherkinDocument(gherkinDocument))
|
|
36
|
-
.filter((gherkinDocument) => !!gherkinDocument);
|
|
37
|
-
}
|
|
38
|
-
async add(gherkinDocument) {
|
|
39
|
-
this.gherkinDocuments.push(gherkinDocument);
|
|
40
|
-
const promises = [];
|
|
41
|
-
const walker = new GherkinDocumentWalker({}, {
|
|
42
|
-
handleStep: (step) => promises.push(this.stepSearch.add(step)),
|
|
43
|
-
handleBackground: (background) => promises.push(this.backgroundSearch.add(background)),
|
|
44
|
-
handleScenario: (scenario) => promises.push(this.scenarioSearch.add(scenario)),
|
|
45
|
-
handleRule: (rule) => promises.push(this.ruleSearch.add(rule)),
|
|
46
|
-
});
|
|
47
|
-
promises.push(this.featureSearch.add(gherkinDocument));
|
|
48
|
-
walker.walkGherkinDocument(gherkinDocument);
|
|
49
|
-
await Promise.all(promises);
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export async function createTextSearch() {
|
|
54
|
-
const [stepSearch, backgroundSearch, scenarioSearch, ruleSearch, featureSearch] = await Promise.all([
|
|
55
|
-
createStepSearch(),
|
|
56
|
-
createScenarioLikeSearch(),
|
|
57
|
-
createScenarioLikeSearch(),
|
|
58
|
-
createScenarioLikeSearch(),
|
|
59
|
-
createFeatureSearch(),
|
|
60
|
-
]);
|
|
61
|
-
return new TextSearch(stepSearch, backgroundSearch, scenarioSearch, ruleSearch, featureSearch);
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=TextSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextSearch.js","sourceRoot":"","sources":["../../../src/search/TextSearch.ts"],"names":[],"mappings":"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","sourcesContent":["import { GherkinDocumentWalker } from '@cucumber/gherkin-utils'\nimport { Background, Feature, GherkinDocument, Rule, Scenario, Step } from '@cucumber/messages'\n\nimport { createFeatureSearch } from './FeatureSearch.js'\nimport { createScenarioLikeSearch } from './ScenarioLikeSearch.js'\nimport { createStepSearch } from './StepSearch.js'\nimport { Searchable, TypedIndex } from './types.js'\n\nclass TextSearch {\n private readonly gherkinDocuments: GherkinDocument[] = []\n\n private readonly stepSearch: TypedIndex<Step>\n private readonly backgroundSearch: TypedIndex<Background>\n private readonly scenarioSearch: TypedIndex<Scenario>\n private readonly ruleSearch: TypedIndex<Rule>\n private readonly featureSearch: TypedIndex<Feature, GherkinDocument>\n\n constructor(\n stepSearch: TypedIndex<Step>,\n backgroundSearch: TypedIndex<Background>,\n scenarioSearch: TypedIndex<Scenario>,\n ruleSearch: TypedIndex<Rule>,\n featureSearch: TypedIndex<Feature, GherkinDocument>\n ) {\n this.stepSearch = stepSearch\n this.backgroundSearch = backgroundSearch\n this.scenarioSearch = scenarioSearch\n this.ruleSearch = ruleSearch\n this.featureSearch = featureSearch\n }\n\n public async search(query: string): Promise<readonly GherkinDocument[]> {\n const [matchingSteps, matchingBackgrounds, matchingScenarios, matchingRules, matchingFeatures] =\n await Promise.all([\n this.stepSearch.search(query),\n this.backgroundSearch.search(query),\n this.scenarioSearch.search(query),\n this.ruleSearch.search(query),\n this.featureSearch.search(query),\n ])\n\n const walker = new GherkinDocumentWalker({\n acceptStep: (step) => matchingSteps.includes(step),\n acceptBackground: (background) => matchingBackgrounds.includes(background),\n acceptScenario: (scenario) => matchingScenarios.includes(scenario),\n acceptRule: (rule) => matchingRules.includes(rule),\n acceptFeature: (feature) => matchingFeatures.includes(feature),\n })\n\n return this.gherkinDocuments\n .map((gherkinDocument) => walker.walkGherkinDocument(gherkinDocument))\n .filter((gherkinDocument) => !!gherkinDocument) as readonly GherkinDocument[]\n }\n\n public async add(gherkinDocument: GherkinDocument) {\n this.gherkinDocuments.push(gherkinDocument)\n const promises: Promise<unknown>[] = []\n const walker = new GherkinDocumentWalker(\n {},\n {\n handleStep: (step) => promises.push(this.stepSearch.add(step)),\n handleBackground: (background) => promises.push(this.backgroundSearch.add(background)),\n handleScenario: (scenario) => promises.push(this.scenarioSearch.add(scenario)),\n handleRule: (rule) => promises.push(this.ruleSearch.add(rule)),\n }\n )\n promises.push(this.featureSearch.add(gherkinDocument))\n walker.walkGherkinDocument(gherkinDocument)\n await Promise.all(promises)\n return this\n }\n}\n\nexport async function createTextSearch(): Promise<Searchable> {\n const [stepSearch, backgroundSearch, scenarioSearch, ruleSearch, featureSearch] =\n await Promise.all([\n createStepSearch(),\n createScenarioLikeSearch<Background>(),\n createScenarioLikeSearch<Scenario>(),\n createScenarioLikeSearch<Rule>(),\n createFeatureSearch(),\n ])\n return new TextSearch(stepSearch, backgroundSearch, scenarioSearch, ruleSearch, featureSearch)\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,cAAc,YAAY,CAAA"}
|
package/dist/src/search/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,cAAc,YAAY,CAAA","sourcesContent":["export { createSearch } from './Search.js'\nexport * from './types.js'\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { GherkinDocument } from '@cucumber/messages';
|
|
2
|
-
/**
|
|
3
|
-
* Facade for an index that supports searching for and adding items of a given
|
|
4
|
-
* type. Also supports a different type being added if needed.
|
|
5
|
-
*/
|
|
6
|
-
export interface TypedIndex<ReturnedType, SourceType = ReturnedType> {
|
|
7
|
-
search: (query: string) => Promise<readonly ReturnedType[]>;
|
|
8
|
-
add: (item: SourceType) => Promise<this>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Shorthand type for an index of Gherkin documents.
|
|
12
|
-
*/
|
|
13
|
-
export type Searchable = TypedIndex<GherkinDocument>;
|
|
14
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,YAAY,EAAE,UAAU,GAAG,YAAY;IACjE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC,CAAA;IAC3D,GAAG,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACzC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA"}
|
package/dist/src/search/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":"","sourcesContent":["import { GherkinDocument } from '@cucumber/messages'\n\n/**\n * Facade for an index that supports searching for and adding items of a given\n * type. Also supports a different type being added if needed.\n */\nexport interface TypedIndex<ReturnedType, SourceType = ReturnedType> {\n search: (query: string) => Promise<readonly ReturnedType[]>\n add: (item: SourceType) => Promise<this>\n}\n\n/**\n * Shorthand type for an index of Gherkin documents.\n */\nexport type Searchable = TypedIndex<GherkinDocument>\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statuses.d.ts","sourceRoot":"","sources":["../../src/statuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,QAAA,MAAM,QAAQ,EAAE,aAAa,CAAC,oBAAoB,CAQjD,CAAA;AACD,eAAe,QAAQ,CAAA"}
|
package/dist/src/statuses.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TestStepResultStatus } from '@cucumber/messages';
|
|
2
|
-
const statuses = [
|
|
3
|
-
TestStepResultStatus.UNKNOWN,
|
|
4
|
-
TestStepResultStatus.PASSED,
|
|
5
|
-
TestStepResultStatus.SKIPPED,
|
|
6
|
-
TestStepResultStatus.PENDING,
|
|
7
|
-
TestStepResultStatus.UNDEFINED,
|
|
8
|
-
TestStepResultStatus.AMBIGUOUS,
|
|
9
|
-
TestStepResultStatus.FAILED,
|
|
10
|
-
];
|
|
11
|
-
export default statuses;
|
|
12
|
-
//# sourceMappingURL=statuses.js.map
|
package/dist/src/statuses.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statuses.js","sourceRoot":"","sources":["../../src/statuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,MAAM,QAAQ,GAAwC;IACpD,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,MAAM;IAC3B,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,SAAS;IAC9B,oBAAoB,CAAC,SAAS;IAC9B,oBAAoB,CAAC,MAAM;CAC5B,CAAA;AACD,eAAe,QAAQ,CAAA","sourcesContent":["import { TestStepResultStatus } from '@cucumber/messages'\n\nconst statuses: ReadonlyArray<TestStepResultStatus> = [\n TestStepResultStatus.UNKNOWN,\n TestStepResultStatus.PASSED,\n TestStepResultStatus.SKIPPED,\n TestStepResultStatus.PENDING,\n TestStepResultStatus.UNDEFINED,\n TestStepResultStatus.AMBIGUOUS,\n TestStepResultStatus.FAILED,\n]\nexport default statuses\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toRepositoryId.d.ts","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CASxD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default function toRepositoryId(s) {
|
|
2
|
-
if (!s.includes('://') && s.includes(':')) {
|
|
3
|
-
// scp style URL (not really a URL)
|
|
4
|
-
const [host, path] = s.split(':', 2);
|
|
5
|
-
s = `ssh://${host}/${path}`;
|
|
6
|
-
}
|
|
7
|
-
s = s.replace(/\.git$/, '');
|
|
8
|
-
const url = new URL(s);
|
|
9
|
-
return `${url.hostname}${url.pathname}`;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=toRepositoryId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toRepositoryId.js","sourceRoot":"","sources":["../../src/toRepositoryId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAS;IAC9C,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACzC,mCAAmC;QACnC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACpC,CAAC,GAAG,SAAS,IAAI,IAAI,IAAI,EAAE,CAAA;KAC5B;IACD,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC3B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAA;AACzC,CAAC","sourcesContent":["export default function toRepositoryId(s: string): string {\n if (!s.includes('://') && s.includes(':')) {\n // scp style URL (not really a URL)\n const [host, path] = s.split(':', 2)\n s = `ssh://${host}/${path}`\n }\n s = s.replace(/\\.git$/, '')\n const url = new URL(s)\n return `${url.hostname}${url.pathname}`\n}\n"]}
|