From bdef8ad8287677a51e6ee546efa033ad46d56803 Mon Sep 17 00:00:00 2001 From: Matthias Behr Date: Wed, 1 Jan 2025 19:12:28 +0100 Subject: [PATCH] feat(sequences): add ignoreOutOfOrder step attribute --- docs/fishbone/docs/sequences.md | 7 ++++--- package.json | 2 +- src/webview/package.json | 2 +- src/webview/yarn.lock | 8 ++++---- yarn.lock | 8 ++++---- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/fishbone/docs/sequences.md b/docs/fishbone/docs/sequences.md index bf1dca0..fcebc24 100644 --- a/docs/fishbone/docs/sequences.md +++ b/docs/fishbone/docs/sequences.md @@ -70,11 +70,12 @@ attribute | description --------- | ----------- `name` | Optional: Name of this step. If not provided name of the filter or name of the contained sequence will be used. `card` | Optional: Cardinality of this step. Defaults to "exactly once/mandatory step" if not provided. Can be any of:
`?`:zero or once, so an optional step,
`*`:any number of times = 0.., so an optional step that can occur not at all or any number of times
`+`:once or multiple times, so a mandatory step that can occur multiple times but at least once -`canCreateNew`| Optional: Determines whether this step can create a new sequence occurrence. Defaults to `true`. Must not be `false` for the first step in a sequence. Set to `false` if this step shall only be checked for a created occurrence from an earlier step. So the `filter`, `sequence`, `alt` or `par` will be ignored then. +`canCreateNew` | Optional: Determines whether this step can create a new sequence occurrence. Defaults to `true`. Must not be `false` for the first step in a sequence. Set to `false` if this step shall only be checked for a created occurrence from an earlier step. So the `filter`, `sequence`, `alt` or `par` will be ignored then. +`ignoreOutOfOrder` | Optional: if true, any matches/occurrences of this step that are out of order/sequence are ignored. Can only be used if the step before this step is mandatory. Defaults to `false`. This can be used if some messages occur often but you expect it exactly after one step and you do ignore any other occurrences. `filter` | [DLT filter](https://mbehr1.github.io/dlt-logs/docs/filterReference#details) definition. If this filter matches a msg the step is seen as "matching". Either `filter`, `sequence`, `alt` or `par` must be provided. `sequence` | A definition of a `sub-sequence`. For this step a full sequence is used. This is useful to either break down a bigger sequence into smaller parts of if this step can be executed multiple times (e.g. with `card:*`) but consists of multiple events/steps. See [example](#example). -`alt`| A definition for a list of alternative steps. The `alt` attribute is an array/list of step definitions. Any `card` or `canCreateNew` attribute will automatically be applied to the alternative steps. For this step to be `ok` exactly one step needs to be `ok`. See [example alt](#example-alternative-steps). -`par`| A definition for a list of parallel steps. The `par` attribute is an array/list of step definitions. Single steps can have their own `card` or `canCreateNew` attribute and the step with `par` as well. For this step to be `ok` all mandatory steps ( `card` not `?,*` ) need to be `ok`. The order in which the parallel steps are fulfilled doesn't matter. +`alt` | A definition for a list of alternative steps. The `alt` attribute is an array/list of step definitions. Any `card` or `canCreateNew` attribute will automatically be applied to the alternative steps. For this step to be `ok` exactly one step needs to be `ok`. See [example alt](#example-alternative-steps). +`par` | A definition for a list of parallel steps. The `par` attribute is an array/list of step definitions. Single steps can have their own `card` or `canCreateNew` attribute and the step with `par` as well. For this step to be `ok` all mandatory steps ( `card` not `?,*` ) need to be `ok`. The order in which the parallel steps are fulfilled doesn't matter. :::important A step must contain either a filter or a sub-sequence or an alt-list but not more than one! diff --git a/package.json b/package.json index 2faaff5..dee86ce 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ }, "dependencies": { "@vscode/extension-telemetry": "^0.8.4", - "dlt-logs-utils": "0.9.1", + "dlt-logs-utils": "0.10.0", "jju": "github:mbehr1/jju#3aa4169df926e99083fdd511d7c20b5bd9ba789f", "js-yaml": "^4.1.0", "json5": "2.2.3", diff --git a/src/webview/package.json b/src/webview/package.json index f7d3a92..335aee8 100644 --- a/src/webview/package.json +++ b/src/webview/package.json @@ -13,7 +13,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", - "dlt-logs-utils": "0.9.1", + "dlt-logs-utils": "0.10.0", "dompurify": "^2.4.0", "jju": "github:mbehr1/jju#3aa4169df926e99083fdd511d7c20b5bd9ba789f", "js-yaml": "^4.1.0", diff --git a/src/webview/yarn.lock b/src/webview/yarn.lock index 5d17265..2c03301 100644 --- a/src/webview/yarn.lock +++ b/src/webview/yarn.lock @@ -4259,10 +4259,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dlt-logs-utils@0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.9.1.tgz#0f34ba9aec4d9518aacb8e4ed1a39514c6cce0bd" - integrity sha512-fmvuj3jZYv2Y5vYP1xOMu0OgsZJalkEVQi65avEvdWWNCocsQnxwTMlOvpemDuGBO3p2fswHjsDt9+e8i0BWFA== +dlt-logs-utils@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.10.0.tgz#e8651aaf053497efc45d0e6fb93f08026c4bd819" + integrity sha512-YWDWyzlwKM2Lsp4F/+o+feFwNaKxj4SngT6XpJqcW5CIIyQgnFza1HxiFh3Kp8V0d5O1gBJJw7fUYFzyTRremQ== dlv@^1.1.3: version "1.1.3" diff --git a/yarn.lock b/yarn.lock index 3bd2f94..e71d36b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2453,10 +2453,10 @@ dir-glob@^3.0.0, dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dlt-logs-utils@0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.9.1.tgz#0f34ba9aec4d9518aacb8e4ed1a39514c6cce0bd" - integrity sha512-fmvuj3jZYv2Y5vYP1xOMu0OgsZJalkEVQi65avEvdWWNCocsQnxwTMlOvpemDuGBO3p2fswHjsDt9+e8i0BWFA== +dlt-logs-utils@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.10.0.tgz#e8651aaf053497efc45d0e6fb93f08026c4bd819" + integrity sha512-YWDWyzlwKM2Lsp4F/+o+feFwNaKxj4SngT6XpJqcW5CIIyQgnFza1HxiFh3Kp8V0d5O1gBJJw7fUYFzyTRremQ== doctrine@^3.0.0: version "3.0.0"