doc-detective-common 1.13.0 → 1.14.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.
@@ -0,0 +1,14 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [doc-detective] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: doc-detective # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13
+ polar: # Replace with a single Polar username
14
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc-detective-common",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Shared components for Doc Detective projects. ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,6 @@
8
8
  "test:full": "npm run dereferenceSchemas && npm run test",
9
9
  "test": "jest"
10
10
  },
11
- "precommit": "test",
12
11
  "repository": {
13
12
  "type": "git",
14
13
  "url": "git+https://github.com/doc-detective/doc-detective-common.git"
@@ -23,12 +22,11 @@
23
22
  "jest": "^29.7.0"
24
23
  },
25
24
  "dependencies": {
26
- "@apidevtools/json-schema-ref-parser": "^11.1.0",
25
+ "@apidevtools/json-schema-ref-parser": "^11.5.4",
27
26
  "ajv": "^8.12.0",
28
27
  "ajv-errors": "^3.0.0",
29
28
  "ajv-formats": "^2.1.1",
30
29
  "ajv-keywords": "^5.1.0",
31
- "pre-commit": "^1.2.2",
32
30
  "uuid": "^9.0.1"
33
31
  }
34
32
  }
@@ -108,7 +108,7 @@
108
108
  "detectSteps": {
109
109
  "type": "boolean",
110
110
  "description": "Whether or not to detect steps in input files based on markup regex.",
111
- "default": true
111
+ "default": false
112
112
  },
113
113
  "mediaDirectory": {
114
114
  "description": "Path of the directory in which to store output media files.",
@@ -521,6 +521,7 @@
521
521
  "name": "Markdown",
522
522
  "extensions": [
523
523
  ".md",
524
+ ".markdown",
524
525
  ".mdx"
525
526
  ],
526
527
  "testStartStatementOpen": "[comment]: # (test start",
@@ -664,6 +665,36 @@
664
665
  ]
665
666
  }
666
667
  ]
668
+ },
669
+ {
670
+ "name": "AsciiDoc",
671
+ "extensions": [
672
+ ".adoc",
673
+ ".asciidoc, .asc"
674
+ ],
675
+ "testStartStatementOpen": "// (test start",
676
+ "testStartStatementClose": ")",
677
+ "testIgnoreStatement": "// (test ignore)",
678
+ "testEndStatement": "// (test end)",
679
+ "stepStatementOpen": "// (step",
680
+ "stepStatementClose": ")",
681
+ "markup": []
682
+ },
683
+ {
684
+ "name": "HTML/XML",
685
+ "extensions": [
686
+ ".html",
687
+ ".htm",
688
+ ".xml",
689
+ ".xhtml"
690
+ ],
691
+ "testStartStatementOpen": "<!-- test start",
692
+ "testStartStatementClose": "-->",
693
+ "testIgnoreStatement": "<!-- test ignore -->",
694
+ "testEndStatement": "<!-- test end -->",
695
+ "stepStatementOpen": "<!-- step",
696
+ "stepStatementClose": "-->",
697
+ "markup": []
667
698
  }
668
699
  ]
669
700
  },
@@ -31,6 +31,51 @@
31
31
  ]
32
32
  },
33
33
  "default": []
34
+ },
35
+ "exitCodes": {
36
+ "type": "array",
37
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
38
+ "items": {
39
+ "oneOf": [
40
+ {
41
+ "type": "integer"
42
+ }
43
+ ]
44
+ },
45
+ "default": [
46
+ 0
47
+ ]
48
+ },
49
+ "output": {
50
+ "type": "string",
51
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
52
+ },
53
+ "setVariables": {
54
+ "type": "array",
55
+ "description": "Extract environment variables from the command's output.",
56
+ "items": {
57
+ "oneOf": [
58
+ {
59
+ "description": "",
60
+ "type": "object",
61
+ "properties": {
62
+ "name": {
63
+ "description": "Name of the environment variable to set.",
64
+ "type": "string"
65
+ },
66
+ "regex": {
67
+ "description": "Regex to extract the environment variable from the command's output.",
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "name",
73
+ "regex"
74
+ ]
75
+ }
76
+ ]
77
+ },
78
+ "default": []
34
79
  }
35
80
  },
36
81
  "dynamicDefaults": {
@@ -57,6 +102,38 @@
57
102
  ],
58
103
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
59
104
  "description": "This is a test!"
105
+ },
106
+ {
107
+ "action": "runShell",
108
+ "command": "docker run hello-world",
109
+ "exitCodes": [
110
+ 0
111
+ ],
112
+ "output": "Hello from Docker!"
113
+ },
114
+ {
115
+ "action": "runShell",
116
+ "command": "false",
117
+ "exitCodes": [
118
+ 1
119
+ ]
120
+ },
121
+ {
122
+ "action": "runShell",
123
+ "command": "echo",
124
+ "args": [
125
+ "setup"
126
+ ],
127
+ "exitCodes": [
128
+ 0
129
+ ],
130
+ "output": "/.*?/",
131
+ "setVariables": [
132
+ {
133
+ "name": "TEST",
134
+ "regex": ".*"
135
+ }
136
+ ]
60
137
  }
61
138
  ]
62
139
  }
@@ -664,6 +664,51 @@
664
664
  ]
665
665
  },
666
666
  "default": []
667
+ },
668
+ "exitCodes": {
669
+ "type": "array",
670
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
671
+ "items": {
672
+ "oneOf": [
673
+ {
674
+ "type": "integer"
675
+ }
676
+ ]
677
+ },
678
+ "default": [
679
+ 0
680
+ ]
681
+ },
682
+ "output": {
683
+ "type": "string",
684
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
685
+ },
686
+ "setVariables": {
687
+ "type": "array",
688
+ "description": "Extract environment variables from the command's output.",
689
+ "items": {
690
+ "oneOf": [
691
+ {
692
+ "description": "",
693
+ "type": "object",
694
+ "properties": {
695
+ "name": {
696
+ "description": "Name of the environment variable to set.",
697
+ "type": "string"
698
+ },
699
+ "regex": {
700
+ "description": "Regex to extract the environment variable from the command's output.",
701
+ "type": "string"
702
+ }
703
+ },
704
+ "required": [
705
+ "name",
706
+ "regex"
707
+ ]
708
+ }
709
+ ]
710
+ },
711
+ "default": []
667
712
  }
668
713
  },
669
714
  "dynamicDefaults": {
@@ -690,6 +735,38 @@
690
735
  ],
691
736
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
692
737
  "description": "This is a test!"
738
+ },
739
+ {
740
+ "action": "runShell",
741
+ "command": "docker run hello-world",
742
+ "exitCodes": [
743
+ 0
744
+ ],
745
+ "output": "Hello from Docker!"
746
+ },
747
+ {
748
+ "action": "runShell",
749
+ "command": "false",
750
+ "exitCodes": [
751
+ 1
752
+ ]
753
+ },
754
+ {
755
+ "action": "runShell",
756
+ "command": "echo",
757
+ "args": [
758
+ "setup"
759
+ ],
760
+ "exitCodes": [
761
+ 0
762
+ ],
763
+ "output": "/.*?/",
764
+ "setVariables": [
765
+ {
766
+ "name": "TEST",
767
+ "regex": ".*"
768
+ }
769
+ ]
693
770
  }
694
771
  ]
695
772
  },
@@ -520,6 +520,51 @@
520
520
  ]
521
521
  },
522
522
  "default": []
523
+ },
524
+ "exitCodes": {
525
+ "type": "array",
526
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
527
+ "items": {
528
+ "oneOf": [
529
+ {
530
+ "type": "integer"
531
+ }
532
+ ]
533
+ },
534
+ "default": [
535
+ 0
536
+ ]
537
+ },
538
+ "output": {
539
+ "type": "string",
540
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
541
+ },
542
+ "setVariables": {
543
+ "type": "array",
544
+ "description": "Extract environment variables from the command's output.",
545
+ "items": {
546
+ "oneOf": [
547
+ {
548
+ "description": "",
549
+ "type": "object",
550
+ "properties": {
551
+ "name": {
552
+ "description": "Name of the environment variable to set.",
553
+ "type": "string"
554
+ },
555
+ "regex": {
556
+ "description": "Regex to extract the environment variable from the command's output.",
557
+ "type": "string"
558
+ }
559
+ },
560
+ "required": [
561
+ "name",
562
+ "regex"
563
+ ]
564
+ }
565
+ ]
566
+ },
567
+ "default": []
523
568
  }
524
569
  },
525
570
  "dynamicDefaults": {
@@ -546,6 +591,38 @@
546
591
  ],
547
592
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
548
593
  "description": "This is a test!"
594
+ },
595
+ {
596
+ "action": "runShell",
597
+ "command": "docker run hello-world",
598
+ "exitCodes": [
599
+ 0
600
+ ],
601
+ "output": "Hello from Docker!"
602
+ },
603
+ {
604
+ "action": "runShell",
605
+ "command": "false",
606
+ "exitCodes": [
607
+ 1
608
+ ]
609
+ },
610
+ {
611
+ "action": "runShell",
612
+ "command": "echo",
613
+ "args": [
614
+ "setup"
615
+ ],
616
+ "exitCodes": [
617
+ 0
618
+ ],
619
+ "output": "/.*?/",
620
+ "setVariables": [
621
+ {
622
+ "name": "TEST",
623
+ "regex": ".*"
624
+ }
625
+ ]
549
626
  }
550
627
  ]
551
628
  },
@@ -189,7 +189,7 @@
189
189
  "detectSteps": {
190
190
  "type": "boolean",
191
191
  "description": "Whether or not to detect steps in input files based on markup regex.",
192
- "default": true
192
+ "default": false
193
193
  },
194
194
  "mediaDirectory": {
195
195
  "description": "Path of the directory in which to store output media files.",
@@ -602,6 +602,7 @@
602
602
  "name": "Markdown",
603
603
  "extensions": [
604
604
  ".md",
605
+ ".markdown",
605
606
  ".mdx"
606
607
  ],
607
608
  "testStartStatementOpen": "[comment]: # (test start",
@@ -745,6 +746,36 @@
745
746
  ]
746
747
  }
747
748
  ]
749
+ },
750
+ {
751
+ "name": "AsciiDoc",
752
+ "extensions": [
753
+ ".adoc",
754
+ ".asciidoc, .asc"
755
+ ],
756
+ "testStartStatementOpen": "// (test start",
757
+ "testStartStatementClose": ")",
758
+ "testIgnoreStatement": "// (test ignore)",
759
+ "testEndStatement": "// (test end)",
760
+ "stepStatementOpen": "// (step",
761
+ "stepStatementClose": ")",
762
+ "markup": []
763
+ },
764
+ {
765
+ "name": "HTML/XML",
766
+ "extensions": [
767
+ ".html",
768
+ ".htm",
769
+ ".xml",
770
+ ".xhtml"
771
+ ],
772
+ "testStartStatementOpen": "<!-- test start",
773
+ "testStartStatementClose": "-->",
774
+ "testIgnoreStatement": "<!-- test ignore -->",
775
+ "testEndStatement": "<!-- test end -->",
776
+ "stepStatementOpen": "<!-- step",
777
+ "stepStatementClose": "-->",
778
+ "markup": []
748
779
  }
749
780
  ]
750
781
  },
@@ -1895,6 +1926,51 @@
1895
1926
  ]
1896
1927
  },
1897
1928
  "default": []
1929
+ },
1930
+ "exitCodes": {
1931
+ "type": "array",
1932
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
1933
+ "items": {
1934
+ "oneOf": [
1935
+ {
1936
+ "type": "integer"
1937
+ }
1938
+ ]
1939
+ },
1940
+ "default": [
1941
+ 0
1942
+ ]
1943
+ },
1944
+ "output": {
1945
+ "type": "string",
1946
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
1947
+ },
1948
+ "setVariables": {
1949
+ "type": "array",
1950
+ "description": "Extract environment variables from the command's output.",
1951
+ "items": {
1952
+ "oneOf": [
1953
+ {
1954
+ "description": "",
1955
+ "type": "object",
1956
+ "properties": {
1957
+ "name": {
1958
+ "description": "Name of the environment variable to set.",
1959
+ "type": "string"
1960
+ },
1961
+ "regex": {
1962
+ "description": "Regex to extract the environment variable from the command's output.",
1963
+ "type": "string"
1964
+ }
1965
+ },
1966
+ "required": [
1967
+ "name",
1968
+ "regex"
1969
+ ]
1970
+ }
1971
+ ]
1972
+ },
1973
+ "default": []
1898
1974
  }
1899
1975
  },
1900
1976
  "dynamicDefaults": {
@@ -1921,6 +1997,38 @@
1921
1997
  ],
1922
1998
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
1923
1999
  "description": "This is a test!"
2000
+ },
2001
+ {
2002
+ "action": "runShell",
2003
+ "command": "docker run hello-world",
2004
+ "exitCodes": [
2005
+ 0
2006
+ ],
2007
+ "output": "Hello from Docker!"
2008
+ },
2009
+ {
2010
+ "action": "runShell",
2011
+ "command": "false",
2012
+ "exitCodes": [
2013
+ 1
2014
+ ]
2015
+ },
2016
+ {
2017
+ "action": "runShell",
2018
+ "command": "echo",
2019
+ "args": [
2020
+ "setup"
2021
+ ],
2022
+ "exitCodes": [
2023
+ 0
2024
+ ],
2025
+ "output": "/.*?/",
2026
+ "setVariables": [
2027
+ {
2028
+ "name": "TEST",
2029
+ "regex": ".*"
2030
+ }
2031
+ ]
1924
2032
  }
1925
2033
  ]
1926
2034
  },
@@ -2789,6 +2897,51 @@
2789
2897
  ]
2790
2898
  },
2791
2899
  "default": []
2900
+ },
2901
+ "exitCodes": {
2902
+ "type": "array",
2903
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
2904
+ "items": {
2905
+ "oneOf": [
2906
+ {
2907
+ "type": "integer"
2908
+ }
2909
+ ]
2910
+ },
2911
+ "default": [
2912
+ 0
2913
+ ]
2914
+ },
2915
+ "output": {
2916
+ "type": "string",
2917
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
2918
+ },
2919
+ "setVariables": {
2920
+ "type": "array",
2921
+ "description": "Extract environment variables from the command's output.",
2922
+ "items": {
2923
+ "oneOf": [
2924
+ {
2925
+ "description": "",
2926
+ "type": "object",
2927
+ "properties": {
2928
+ "name": {
2929
+ "description": "Name of the environment variable to set.",
2930
+ "type": "string"
2931
+ },
2932
+ "regex": {
2933
+ "description": "Regex to extract the environment variable from the command's output.",
2934
+ "type": "string"
2935
+ }
2936
+ },
2937
+ "required": [
2938
+ "name",
2939
+ "regex"
2940
+ ]
2941
+ }
2942
+ ]
2943
+ },
2944
+ "default": []
2792
2945
  }
2793
2946
  },
2794
2947
  "dynamicDefaults": {
@@ -2815,6 +2968,38 @@
2815
2968
  ],
2816
2969
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
2817
2970
  "description": "This is a test!"
2971
+ },
2972
+ {
2973
+ "action": "runShell",
2974
+ "command": "docker run hello-world",
2975
+ "exitCodes": [
2976
+ 0
2977
+ ],
2978
+ "output": "Hello from Docker!"
2979
+ },
2980
+ {
2981
+ "action": "runShell",
2982
+ "command": "false",
2983
+ "exitCodes": [
2984
+ 1
2985
+ ]
2986
+ },
2987
+ {
2988
+ "action": "runShell",
2989
+ "command": "echo",
2990
+ "args": [
2991
+ "setup"
2992
+ ],
2993
+ "exitCodes": [
2994
+ 0
2995
+ ],
2996
+ "output": "/.*?/",
2997
+ "setVariables": [
2998
+ {
2999
+ "name": "TEST",
3000
+ "regex": ".*"
3001
+ }
3002
+ ]
2818
3003
  }
2819
3004
  ]
2820
3005
  },
@@ -4004,6 +4189,51 @@
4004
4189
  ]
4005
4190
  },
4006
4191
  "default": []
4192
+ },
4193
+ "exitCodes": {
4194
+ "type": "array",
4195
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
4196
+ "items": {
4197
+ "oneOf": [
4198
+ {
4199
+ "type": "integer"
4200
+ }
4201
+ ]
4202
+ },
4203
+ "default": [
4204
+ 0
4205
+ ]
4206
+ },
4207
+ "output": {
4208
+ "type": "string",
4209
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
4210
+ },
4211
+ "setVariables": {
4212
+ "type": "array",
4213
+ "description": "Extract environment variables from the command's output.",
4214
+ "items": {
4215
+ "oneOf": [
4216
+ {
4217
+ "description": "",
4218
+ "type": "object",
4219
+ "properties": {
4220
+ "name": {
4221
+ "description": "Name of the environment variable to set.",
4222
+ "type": "string"
4223
+ },
4224
+ "regex": {
4225
+ "description": "Regex to extract the environment variable from the command's output.",
4226
+ "type": "string"
4227
+ }
4228
+ },
4229
+ "required": [
4230
+ "name",
4231
+ "regex"
4232
+ ]
4233
+ }
4234
+ ]
4235
+ },
4236
+ "default": []
4007
4237
  }
4008
4238
  },
4009
4239
  "dynamicDefaults": {
@@ -4030,6 +4260,38 @@
4030
4260
  ],
4031
4261
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
4032
4262
  "description": "This is a test!"
4263
+ },
4264
+ {
4265
+ "action": "runShell",
4266
+ "command": "docker run hello-world",
4267
+ "exitCodes": [
4268
+ 0
4269
+ ],
4270
+ "output": "Hello from Docker!"
4271
+ },
4272
+ {
4273
+ "action": "runShell",
4274
+ "command": "false",
4275
+ "exitCodes": [
4276
+ 1
4277
+ ]
4278
+ },
4279
+ {
4280
+ "action": "runShell",
4281
+ "command": "echo",
4282
+ "args": [
4283
+ "setup"
4284
+ ],
4285
+ "exitCodes": [
4286
+ 0
4287
+ ],
4288
+ "output": "/.*?/",
4289
+ "setVariables": [
4290
+ {
4291
+ "name": "TEST",
4292
+ "regex": ".*"
4293
+ }
4294
+ ]
4033
4295
  }
4034
4296
  ]
4035
4297
  },
@@ -73,7 +73,7 @@
73
73
  "detectSteps": {
74
74
  "type": "boolean",
75
75
  "description": "Whether or not to detect steps in input files based on markup regex.",
76
- "default": true
76
+ "default": false
77
77
  },
78
78
  "mediaDirectory": {
79
79
  "description": "Path of the directory in which to store output media files.",
@@ -312,7 +312,7 @@
312
312
  "default": [
313
313
  {
314
314
  "name": "Markdown",
315
- "extensions": [".md", ".mdx"],
315
+ "extensions": [".md", ".markdown", ".mdx"],
316
316
  "testStartStatementOpen": "[comment]: # (test start",
317
317
  "testStartStatementClose": ")",
318
318
  "testIgnoreStatement": "[comment]: # (test ignore)",
@@ -419,6 +419,28 @@
419
419
  ]
420
420
  }
421
421
  ]
422
+ },
423
+ {
424
+ "name": "AsciiDoc",
425
+ "extensions": [".adoc", ".asciidoc, .asc"],
426
+ "testStartStatementOpen": "// (test start",
427
+ "testStartStatementClose": ")",
428
+ "testIgnoreStatement": "// (test ignore)",
429
+ "testEndStatement": "// (test end)",
430
+ "stepStatementOpen": "// (step",
431
+ "stepStatementClose": ")",
432
+ "markup": []
433
+ },
434
+ {
435
+ "name": "HTML/XML",
436
+ "extensions": [".html", ".htm", ".xml", ".xhtml"],
437
+ "testStartStatementOpen": "<!-- test start",
438
+ "testStartStatementClose": "-->",
439
+ "testIgnoreStatement": "<!-- test ignore -->",
440
+ "testEndStatement": "<!-- test end -->",
441
+ "stepStatementOpen": "<!-- step",
442
+ "stepStatementClose": "-->",
443
+ "markup": []
422
444
  }
423
445
  ]
424
446
  },
@@ -573,13 +595,15 @@
573
595
  {
574
596
  "name": "onscreenText",
575
597
  "regex": ["\\*\\*.+?\\*\\*"],
576
- "actions": [{
577
- "name": "find",
578
- "params": {
579
- "moveTo": true,
580
- "click": true
598
+ "actions": [
599
+ {
600
+ "name": "find",
601
+ "params": {
602
+ "moveTo": true,
603
+ "click": true
604
+ }
581
605
  }
582
- }]
606
+ ]
583
607
  },
584
608
  {
585
609
  "name": "emphasis",
@@ -31,6 +31,46 @@
31
31
  ]
32
32
  },
33
33
  "default": []
34
+ },
35
+ "exitCodes": {
36
+ "type": "array",
37
+ "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
38
+ "items": {
39
+ "oneOf": [
40
+ {
41
+ "type": "integer"
42
+ }
43
+ ]
44
+ },
45
+ "default": [0]
46
+ },
47
+ "output": {
48
+ "type": "string",
49
+ "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
50
+ },
51
+ "setVariables": {
52
+ "type": "array",
53
+ "description": "Extract environment variables from the command's output.",
54
+ "items": {
55
+ "oneOf": [
56
+ {
57
+ "description": "",
58
+ "type": "object",
59
+ "properties": {
60
+ "name": {
61
+ "description": "Name of the environment variable to set.",
62
+ "type": "string"
63
+ },
64
+ "regex": {
65
+ "description": "Regex to extract the environment variable from the command's output.",
66
+ "type": "string"
67
+ }
68
+ },
69
+ "required": ["name", "regex"]
70
+ }
71
+ ]
72
+ },
73
+ "default": []
34
74
  }
35
75
  },
36
76
  "dynamicDefaults": {
@@ -50,6 +90,30 @@
50
90
  "args": ["hello-world"],
51
91
  "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
52
92
  "description": "This is a test!"
93
+ },
94
+ {
95
+ "action": "runShell",
96
+ "command": "docker run hello-world",
97
+ "exitCodes": [0],
98
+ "output": "Hello from Docker!"
99
+ },
100
+ {
101
+ "action": "runShell",
102
+ "command": "false",
103
+ "exitCodes": [1]
104
+ },
105
+ {
106
+ "action": "runShell",
107
+ "command": "echo",
108
+ "args": ["setup"],
109
+ "exitCodes": [0],
110
+ "output": "/.*?/",
111
+ "setVariables": [
112
+ {
113
+ "name": "TEST",
114
+ "regex": ".*"
115
+ }
116
+ ]
53
117
  }
54
118
  ]
55
119
  }