@auto-engineer/pipeline 0.20.0 → 0.21.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.
Files changed (206) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +4 -4
  3. package/.turbo/turbo-type-check.log +1 -1
  4. package/CHANGELOG.md +12 -0
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/package.json +3 -3
  7. package/coverage/base.css +0 -224
  8. package/coverage/block-navigation.js +0 -87
  9. package/coverage/builder/define.ts.html +0 -2224
  10. package/coverage/builder/index.html +0 -116
  11. package/coverage/config/index.html +0 -116
  12. package/coverage/config/pipeline-config.ts.html +0 -181
  13. package/coverage/core/descriptors.ts.html +0 -397
  14. package/coverage/core/index.html +0 -131
  15. package/coverage/core/types.ts.html +0 -133
  16. package/coverage/coverage-final.json +0 -33
  17. package/coverage/favicon.png +0 -0
  18. package/coverage/graph/filter-graph.ts.html +0 -418
  19. package/coverage/graph/index.html +0 -131
  20. package/coverage/graph/types.ts.html +0 -172
  21. package/coverage/index.html +0 -266
  22. package/coverage/logging/event-logger.ts.html +0 -235
  23. package/coverage/logging/index.html +0 -116
  24. package/coverage/plugins/handler-adapter.ts.html +0 -148
  25. package/coverage/plugins/index.html +0 -131
  26. package/coverage/plugins/plugin-loader.ts.html +0 -691
  27. package/coverage/prettify.css +0 -1
  28. package/coverage/prettify.js +0 -2
  29. package/coverage/projections/await-tracker-projection.ts.html +0 -289
  30. package/coverage/projections/index.html +0 -221
  31. package/coverage/projections/item-status-projection.ts.html +0 -181
  32. package/coverage/projections/latest-run-projection.ts.html +0 -145
  33. package/coverage/projections/message-log-projection.ts.html +0 -424
  34. package/coverage/projections/node-status-projection.ts.html +0 -184
  35. package/coverage/projections/phased-execution-projection.ts.html +0 -523
  36. package/coverage/projections/settled-instance-projection.ts.html +0 -565
  37. package/coverage/projections/stats-projection.ts.html +0 -163
  38. package/coverage/runtime/await-tracker.ts.html +0 -271
  39. package/coverage/runtime/context.ts.html +0 -124
  40. package/coverage/runtime/event-command-map.ts.html +0 -220
  41. package/coverage/runtime/index.html +0 -191
  42. package/coverage/runtime/phased-executor.ts.html +0 -775
  43. package/coverage/runtime/pipeline-runtime.ts.html +0 -448
  44. package/coverage/runtime/settled-tracker.ts.html +0 -790
  45. package/coverage/server/index.html +0 -131
  46. package/coverage/server/pipeline-server.ts.html +0 -3253
  47. package/coverage/server/sse-manager.ts.html +0 -310
  48. package/coverage/sort-arrow-sprite.png +0 -0
  49. package/coverage/sorter.js +0 -210
  50. package/coverage/store/index.html +0 -146
  51. package/coverage/store/pipeline-event-store.ts.html +0 -553
  52. package/coverage/store/pipeline-read-model.ts.html +0 -754
  53. package/coverage/store/sqlite-pipeline-event-store.ts.html +0 -193
  54. package/coverage/testing/event-capture.ts.html +0 -280
  55. package/coverage/testing/index.html +0 -161
  56. package/coverage/testing/mock-handlers.ts.html +0 -259
  57. package/coverage/testing/snapshot-compare.ts.html +0 -403
  58. package/coverage/testing/snapshot-sanitize.ts.html +0 -136
  59. package/dist/src/builder/define.specs.d.ts +0 -2
  60. package/dist/src/builder/define.specs.d.ts.map +0 -1
  61. package/dist/src/builder/define.specs.js +0 -435
  62. package/dist/src/builder/define.specs.js.map +0 -1
  63. package/dist/src/core/descriptors.specs.d.ts +0 -2
  64. package/dist/src/core/descriptors.specs.d.ts.map +0 -1
  65. package/dist/src/core/descriptors.specs.js +0 -24
  66. package/dist/src/core/descriptors.specs.js.map +0 -1
  67. package/dist/src/core/types.specs.d.ts +0 -2
  68. package/dist/src/core/types.specs.d.ts.map +0 -1
  69. package/dist/src/core/types.specs.js +0 -40
  70. package/dist/src/core/types.specs.js.map +0 -1
  71. package/dist/src/graph/filter-graph.specs.d.ts +0 -2
  72. package/dist/src/graph/filter-graph.specs.d.ts.map +0 -1
  73. package/dist/src/graph/filter-graph.specs.js +0 -204
  74. package/dist/src/graph/filter-graph.specs.js.map +0 -1
  75. package/dist/src/graph/types.specs.d.ts +0 -2
  76. package/dist/src/graph/types.specs.d.ts.map +0 -1
  77. package/dist/src/graph/types.specs.js +0 -148
  78. package/dist/src/graph/types.specs.js.map +0 -1
  79. package/dist/src/logging/event-logger.specs.d.ts +0 -2
  80. package/dist/src/logging/event-logger.specs.d.ts.map +0 -1
  81. package/dist/src/logging/event-logger.specs.js +0 -81
  82. package/dist/src/logging/event-logger.specs.js.map +0 -1
  83. package/dist/src/plugins/handler-adapter.specs.d.ts +0 -2
  84. package/dist/src/plugins/handler-adapter.specs.d.ts.map +0 -1
  85. package/dist/src/plugins/handler-adapter.specs.js +0 -129
  86. package/dist/src/plugins/handler-adapter.specs.js.map +0 -1
  87. package/dist/src/plugins/plugin-loader.specs.d.ts +0 -2
  88. package/dist/src/plugins/plugin-loader.specs.d.ts.map +0 -1
  89. package/dist/src/plugins/plugin-loader.specs.js +0 -246
  90. package/dist/src/plugins/plugin-loader.specs.js.map +0 -1
  91. package/dist/src/projections/item-status-projection.specs.d.ts +0 -2
  92. package/dist/src/projections/item-status-projection.specs.d.ts.map +0 -1
  93. package/dist/src/projections/item-status-projection.specs.js +0 -119
  94. package/dist/src/projections/item-status-projection.specs.js.map +0 -1
  95. package/dist/src/projections/latest-run-projection.specs.d.ts +0 -2
  96. package/dist/src/projections/latest-run-projection.specs.d.ts.map +0 -1
  97. package/dist/src/projections/latest-run-projection.specs.js +0 -33
  98. package/dist/src/projections/latest-run-projection.specs.js.map +0 -1
  99. package/dist/src/projections/message-log-projection.specs.d.ts +0 -2
  100. package/dist/src/projections/message-log-projection.specs.d.ts.map +0 -1
  101. package/dist/src/projections/message-log-projection.specs.js +0 -101
  102. package/dist/src/projections/message-log-projection.specs.js.map +0 -1
  103. package/dist/src/projections/node-status-projection.specs.d.ts +0 -2
  104. package/dist/src/projections/node-status-projection.specs.d.ts.map +0 -1
  105. package/dist/src/projections/node-status-projection.specs.js +0 -116
  106. package/dist/src/projections/node-status-projection.specs.js.map +0 -1
  107. package/dist/src/projections/phased-execution-projection.specs.d.ts +0 -2
  108. package/dist/src/projections/phased-execution-projection.specs.d.ts.map +0 -1
  109. package/dist/src/projections/phased-execution-projection.specs.js +0 -171
  110. package/dist/src/projections/phased-execution-projection.specs.js.map +0 -1
  111. package/dist/src/projections/settled-instance-projection.specs.d.ts +0 -2
  112. package/dist/src/projections/settled-instance-projection.specs.d.ts.map +0 -1
  113. package/dist/src/projections/settled-instance-projection.specs.js +0 -217
  114. package/dist/src/projections/settled-instance-projection.specs.js.map +0 -1
  115. package/dist/src/projections/stats-projection.specs.d.ts +0 -2
  116. package/dist/src/projections/stats-projection.specs.d.ts.map +0 -1
  117. package/dist/src/projections/stats-projection.specs.js +0 -91
  118. package/dist/src/projections/stats-projection.specs.js.map +0 -1
  119. package/dist/src/runtime/await-tracker.specs.d.ts +0 -2
  120. package/dist/src/runtime/await-tracker.specs.d.ts.map +0 -1
  121. package/dist/src/runtime/await-tracker.specs.js +0 -64
  122. package/dist/src/runtime/await-tracker.specs.js.map +0 -1
  123. package/dist/src/runtime/context.specs.d.ts +0 -2
  124. package/dist/src/runtime/context.specs.d.ts.map +0 -1
  125. package/dist/src/runtime/context.specs.js +0 -26
  126. package/dist/src/runtime/context.specs.js.map +0 -1
  127. package/dist/src/runtime/event-command-map.specs.d.ts +0 -2
  128. package/dist/src/runtime/event-command-map.specs.d.ts.map +0 -1
  129. package/dist/src/runtime/event-command-map.specs.js +0 -108
  130. package/dist/src/runtime/event-command-map.specs.js.map +0 -1
  131. package/dist/src/runtime/phased-executor.specs.d.ts +0 -2
  132. package/dist/src/runtime/phased-executor.specs.d.ts.map +0 -1
  133. package/dist/src/runtime/phased-executor.specs.js +0 -418
  134. package/dist/src/runtime/phased-executor.specs.js.map +0 -1
  135. package/dist/src/runtime/pipeline-runtime.specs.d.ts +0 -2
  136. package/dist/src/runtime/pipeline-runtime.specs.d.ts.map +0 -1
  137. package/dist/src/runtime/pipeline-runtime.specs.js +0 -227
  138. package/dist/src/runtime/pipeline-runtime.specs.js.map +0 -1
  139. package/dist/src/runtime/settled-tracker.specs.d.ts +0 -2
  140. package/dist/src/runtime/settled-tracker.specs.d.ts.map +0 -1
  141. package/dist/src/runtime/settled-tracker.specs.js +0 -811
  142. package/dist/src/runtime/settled-tracker.specs.js.map +0 -1
  143. package/dist/src/server/full-orchestration.e2e.specs.d.ts +0 -2
  144. package/dist/src/server/full-orchestration.e2e.specs.d.ts.map +0 -1
  145. package/dist/src/server/full-orchestration.e2e.specs.js +0 -561
  146. package/dist/src/server/full-orchestration.e2e.specs.js.map +0 -1
  147. package/dist/src/server/pipeline-server.e2e.specs.d.ts +0 -2
  148. package/dist/src/server/pipeline-server.e2e.specs.d.ts.map +0 -1
  149. package/dist/src/server/pipeline-server.e2e.specs.js +0 -373
  150. package/dist/src/server/pipeline-server.e2e.specs.js.map +0 -1
  151. package/dist/src/server/pipeline-server.specs.d.ts +0 -2
  152. package/dist/src/server/pipeline-server.specs.d.ts.map +0 -1
  153. package/dist/src/server/pipeline-server.specs.js +0 -1407
  154. package/dist/src/server/pipeline-server.specs.js.map +0 -1
  155. package/dist/src/server/sse-manager.specs.d.ts +0 -2
  156. package/dist/src/server/sse-manager.specs.d.ts.map +0 -1
  157. package/dist/src/server/sse-manager.specs.js +0 -178
  158. package/dist/src/server/sse-manager.specs.js.map +0 -1
  159. package/dist/src/store/pipeline-event-store.specs.d.ts +0 -2
  160. package/dist/src/store/pipeline-event-store.specs.d.ts.map +0 -1
  161. package/dist/src/store/pipeline-event-store.specs.js +0 -287
  162. package/dist/src/store/pipeline-event-store.specs.js.map +0 -1
  163. package/dist/src/store/pipeline-read-model.specs.d.ts +0 -2
  164. package/dist/src/store/pipeline-read-model.specs.d.ts.map +0 -1
  165. package/dist/src/store/pipeline-read-model.specs.js +0 -830
  166. package/dist/src/store/pipeline-read-model.specs.js.map +0 -1
  167. package/dist/src/testing/event-capture.specs.d.ts +0 -2
  168. package/dist/src/testing/event-capture.specs.d.ts.map +0 -1
  169. package/dist/src/testing/event-capture.specs.js +0 -114
  170. package/dist/src/testing/event-capture.specs.js.map +0 -1
  171. package/dist/src/testing/fixtures/kanban-full.pipeline.specs.d.ts +0 -2
  172. package/dist/src/testing/fixtures/kanban-full.pipeline.specs.d.ts.map +0 -1
  173. package/dist/src/testing/fixtures/kanban-full.pipeline.specs.js +0 -263
  174. package/dist/src/testing/fixtures/kanban-full.pipeline.specs.js.map +0 -1
  175. package/dist/src/testing/fixtures/kanban.pipeline.specs.d.ts +0 -2
  176. package/dist/src/testing/fixtures/kanban.pipeline.specs.d.ts.map +0 -1
  177. package/dist/src/testing/fixtures/kanban.pipeline.specs.js +0 -29
  178. package/dist/src/testing/fixtures/kanban.pipeline.specs.js.map +0 -1
  179. package/dist/src/testing/kanban-todo.e2e.specs.d.ts +0 -2
  180. package/dist/src/testing/kanban-todo.e2e.specs.d.ts.map +0 -1
  181. package/dist/src/testing/kanban-todo.e2e.specs.js +0 -160
  182. package/dist/src/testing/kanban-todo.e2e.specs.js.map +0 -1
  183. package/dist/src/testing/mock-handlers.specs.d.ts +0 -2
  184. package/dist/src/testing/mock-handlers.specs.d.ts.map +0 -1
  185. package/dist/src/testing/mock-handlers.specs.js +0 -193
  186. package/dist/src/testing/mock-handlers.specs.js.map +0 -1
  187. package/dist/src/testing/real-execution.e2e.specs.d.ts +0 -2
  188. package/dist/src/testing/real-execution.e2e.specs.d.ts.map +0 -1
  189. package/dist/src/testing/real-execution.e2e.specs.js +0 -140
  190. package/dist/src/testing/real-execution.e2e.specs.js.map +0 -1
  191. package/dist/src/testing/real-plugin.e2e.specs.d.ts +0 -2
  192. package/dist/src/testing/real-plugin.e2e.specs.d.ts.map +0 -1
  193. package/dist/src/testing/real-plugin.e2e.specs.js +0 -65
  194. package/dist/src/testing/real-plugin.e2e.specs.js.map +0 -1
  195. package/dist/src/testing/server-startup.e2e.specs.d.ts +0 -2
  196. package/dist/src/testing/server-startup.e2e.specs.d.ts.map +0 -1
  197. package/dist/src/testing/server-startup.e2e.specs.js +0 -104
  198. package/dist/src/testing/server-startup.e2e.specs.js.map +0 -1
  199. package/dist/src/testing/snapshot-compare.specs.d.ts +0 -2
  200. package/dist/src/testing/snapshot-compare.specs.d.ts.map +0 -1
  201. package/dist/src/testing/snapshot-compare.specs.js +0 -112
  202. package/dist/src/testing/snapshot-compare.specs.js.map +0 -1
  203. package/dist/src/testing/snapshot-sanitize.specs.d.ts +0 -2
  204. package/dist/src/testing/snapshot-sanitize.specs.d.ts.map +0 -1
  205. package/dist/src/testing/snapshot-sanitize.specs.js +0 -104
  206. package/dist/src/testing/snapshot-sanitize.specs.js.map +0 -1
package/coverage/base.css DELETED
@@ -1,224 +0,0 @@
1
- body, html {
2
- margin:0; padding: 0;
3
- height: 100%;
4
- }
5
- body {
6
- font-family: Helvetica Neue, Helvetica, Arial;
7
- font-size: 14px;
8
- color:#333;
9
- }
10
- .small { font-size: 12px; }
11
- *, *:after, *:before {
12
- -webkit-box-sizing:border-box;
13
- -moz-box-sizing:border-box;
14
- box-sizing:border-box;
15
- }
16
- h1 { font-size: 20px; margin: 0;}
17
- h2 { font-size: 14px; }
18
- pre {
19
- font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
- margin: 0;
21
- padding: 0;
22
- -moz-tab-size: 2;
23
- -o-tab-size: 2;
24
- tab-size: 2;
25
- }
26
- a { color:#0074D9; text-decoration:none; }
27
- a:hover { text-decoration:underline; }
28
- .strong { font-weight: bold; }
29
- .space-top1 { padding: 10px 0 0 0; }
30
- .pad2y { padding: 20px 0; }
31
- .pad1y { padding: 10px 0; }
32
- .pad2x { padding: 0 20px; }
33
- .pad2 { padding: 20px; }
34
- .pad1 { padding: 10px; }
35
- .space-left2 { padding-left:55px; }
36
- .space-right2 { padding-right:20px; }
37
- .center { text-align:center; }
38
- .clearfix { display:block; }
39
- .clearfix:after {
40
- content:'';
41
- display:block;
42
- height:0;
43
- clear:both;
44
- visibility:hidden;
45
- }
46
- .fl { float: left; }
47
- @media only screen and (max-width:640px) {
48
- .col3 { width:100%; max-width:100%; }
49
- .hide-mobile { display:none!important; }
50
- }
51
-
52
- .quiet {
53
- color: #7f7f7f;
54
- color: rgba(0,0,0,0.5);
55
- }
56
- .quiet a { opacity: 0.7; }
57
-
58
- .fraction {
59
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
- font-size: 10px;
61
- color: #555;
62
- background: #E8E8E8;
63
- padding: 4px 5px;
64
- border-radius: 3px;
65
- vertical-align: middle;
66
- }
67
-
68
- div.path a:link, div.path a:visited { color: #333; }
69
- table.coverage {
70
- border-collapse: collapse;
71
- margin: 10px 0 0 0;
72
- padding: 0;
73
- }
74
-
75
- table.coverage td {
76
- margin: 0;
77
- padding: 0;
78
- vertical-align: top;
79
- }
80
- table.coverage td.line-count {
81
- text-align: right;
82
- padding: 0 5px 0 20px;
83
- }
84
- table.coverage td.line-coverage {
85
- text-align: right;
86
- padding-right: 10px;
87
- min-width:20px;
88
- }
89
-
90
- table.coverage td span.cline-any {
91
- display: inline-block;
92
- padding: 0 5px;
93
- width: 100%;
94
- }
95
- .missing-if-branch {
96
- display: inline-block;
97
- margin-right: 5px;
98
- border-radius: 3px;
99
- position: relative;
100
- padding: 0 4px;
101
- background: #333;
102
- color: yellow;
103
- }
104
-
105
- .skip-if-branch {
106
- display: none;
107
- margin-right: 10px;
108
- position: relative;
109
- padding: 0 4px;
110
- background: #ccc;
111
- color: white;
112
- }
113
- .missing-if-branch .typ, .skip-if-branch .typ {
114
- color: inherit !important;
115
- }
116
- .coverage-summary {
117
- border-collapse: collapse;
118
- width: 100%;
119
- }
120
- .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
- .keyline-all { border: 1px solid #ddd; }
122
- .coverage-summary td, .coverage-summary th { padding: 10px; }
123
- .coverage-summary tbody { border: 1px solid #bbb; }
124
- .coverage-summary td { border-right: 1px solid #bbb; }
125
- .coverage-summary td:last-child { border-right: none; }
126
- .coverage-summary th {
127
- text-align: left;
128
- font-weight: normal;
129
- white-space: nowrap;
130
- }
131
- .coverage-summary th.file { border-right: none !important; }
132
- .coverage-summary th.pct { }
133
- .coverage-summary th.pic,
134
- .coverage-summary th.abs,
135
- .coverage-summary td.pct,
136
- .coverage-summary td.abs { text-align: right; }
137
- .coverage-summary td.file { white-space: nowrap; }
138
- .coverage-summary td.pic { min-width: 120px !important; }
139
- .coverage-summary tfoot td { }
140
-
141
- .coverage-summary .sorter {
142
- height: 10px;
143
- width: 7px;
144
- display: inline-block;
145
- margin-left: 0.5em;
146
- background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
- }
148
- .coverage-summary .sorted .sorter {
149
- background-position: 0 -20px;
150
- }
151
- .coverage-summary .sorted-desc .sorter {
152
- background-position: 0 -10px;
153
- }
154
- .status-line { height: 10px; }
155
- /* yellow */
156
- .cbranch-no { background: yellow !important; color: #111; }
157
- /* dark red */
158
- .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
- .low .chart { border:1px solid #C21F39 }
160
- .highlighted,
161
- .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
- background: #C21F39 !important;
163
- }
164
- /* medium red */
165
- .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
- /* light red */
167
- .low, .cline-no { background:#FCE1E5 }
168
- /* light green */
169
- .high, .cline-yes { background:rgb(230,245,208) }
170
- /* medium green */
171
- .cstat-yes { background:rgb(161,215,106) }
172
- /* dark green */
173
- .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
- .high .chart { border:1px solid rgb(77,146,33) }
175
- /* dark yellow (gold) */
176
- .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
- .medium .chart { border:1px solid #f9cd0b; }
178
- /* light yellow */
179
- .medium { background: #fff4c2; }
180
-
181
- .cstat-skip { background: #ddd; color: #111; }
182
- .fstat-skip { background: #ddd; color: #111 !important; }
183
- .cbranch-skip { background: #ddd !important; color: #111; }
184
-
185
- span.cline-neutral { background: #eaeaea; }
186
-
187
- .coverage-summary td.empty {
188
- opacity: .5;
189
- padding-top: 4px;
190
- padding-bottom: 4px;
191
- line-height: 1;
192
- color: #888;
193
- }
194
-
195
- .cover-fill, .cover-empty {
196
- display:inline-block;
197
- height: 12px;
198
- }
199
- .chart {
200
- line-height: 0;
201
- }
202
- .cover-empty {
203
- background: white;
204
- }
205
- .cover-full {
206
- border-right: none !important;
207
- }
208
- pre.prettyprint {
209
- border: none !important;
210
- padding: 0 !important;
211
- margin: 0 !important;
212
- }
213
- .com { color: #999 !important; }
214
- .ignore-none { color: #999; font-weight: normal; }
215
-
216
- .wrapper {
217
- min-height: 100%;
218
- height: auto !important;
219
- height: 100%;
220
- margin: 0 auto -48px;
221
- }
222
- .footer, .push {
223
- height: 48px;
224
- }
@@ -1,87 +0,0 @@
1
- /* eslint-disable */
2
- var jumpToCode = (function init() {
3
- // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
-
6
- // Elements to highlight in the file listing view
7
- var fileListingElements = ['td.pct.low'];
8
-
9
- // We don't want to select elements that are direct descendants of another match
10
- var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
-
12
- // Selector that finds elements on the page to which we can jump
13
- var selector =
14
- fileListingElements.join(', ') +
15
- ', ' +
16
- notSelector +
17
- missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
-
19
- // The NodeList of matching elements
20
- var missingCoverageElements = document.querySelectorAll(selector);
21
-
22
- var currentIndex;
23
-
24
- function toggleClass(index) {
25
- missingCoverageElements
26
- .item(currentIndex)
27
- .classList.remove('highlighted');
28
- missingCoverageElements.item(index).classList.add('highlighted');
29
- }
30
-
31
- function makeCurrent(index) {
32
- toggleClass(index);
33
- currentIndex = index;
34
- missingCoverageElements.item(index).scrollIntoView({
35
- behavior: 'smooth',
36
- block: 'center',
37
- inline: 'center'
38
- });
39
- }
40
-
41
- function goToPrevious() {
42
- var nextIndex = 0;
43
- if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
- nextIndex = missingCoverageElements.length - 1;
45
- } else if (missingCoverageElements.length > 1) {
46
- nextIndex = currentIndex - 1;
47
- }
48
-
49
- makeCurrent(nextIndex);
50
- }
51
-
52
- function goToNext() {
53
- var nextIndex = 0;
54
-
55
- if (
56
- typeof currentIndex === 'number' &&
57
- currentIndex < missingCoverageElements.length - 1
58
- ) {
59
- nextIndex = currentIndex + 1;
60
- }
61
-
62
- makeCurrent(nextIndex);
63
- }
64
-
65
- return function jump(event) {
66
- if (
67
- document.getElementById('fileSearch') === document.activeElement &&
68
- document.activeElement != null
69
- ) {
70
- // if we're currently focused on the search input, we don't want to navigate
71
- return;
72
- }
73
-
74
- switch (event.which) {
75
- case 78: // n
76
- case 74: // j
77
- goToNext();
78
- break;
79
- case 66: // b
80
- case 75: // k
81
- case 80: // p
82
- goToPrevious();
83
- break;
84
- }
85
- };
86
- })();
87
- window.addEventListener('keydown', jumpToCode);