screw-bugs 0.1.7 → 0.1.9

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 (58) hide show
  1. package/README.md +83 -13
  2. package/dist/browser-playwright/launch.js +27 -10
  3. package/dist/browser-playwright/page.d.ts +50 -28
  4. package/dist/browser-playwright/page.js +101 -91
  5. package/dist/browser-playwright/recorder.d.ts +154 -0
  6. package/dist/browser-playwright/recorder.js +382 -0
  7. package/dist/build-info.json +3 -3
  8. package/dist/cli/commands.js +56 -11
  9. package/dist/cli/mcp.d.ts +11 -4
  10. package/dist/cli/mcp.js +86 -23
  11. package/dist/cli/operations.d.ts +30 -2
  12. package/dist/cli/operations.js +126 -20
  13. package/dist/cli/report-links.js +2 -2
  14. package/dist/cli/report-server.d.ts +41 -9
  15. package/dist/cli/report-server.js +139 -23
  16. package/dist/cli/share.d.ts +71 -4
  17. package/dist/cli/share.js +540 -109
  18. package/dist/cli/sign-in.d.ts +22 -10
  19. package/dist/cli/sign-in.js +23 -23
  20. package/dist/core/engine.js +54 -13
  21. package/dist/core/liveness.js +3 -1
  22. package/dist/core/services.d.ts +29 -4
  23. package/dist/core/share.d.ts +31 -0
  24. package/dist/core/share.js +139 -0
  25. package/dist/core/steps.d.ts +5 -0
  26. package/dist/core/steps.js +15 -1
  27. package/dist/core/video.d.ts +6 -0
  28. package/dist/core/video.js +8 -0
  29. package/dist/report/html.d.ts +4 -2
  30. package/dist/report/html.js +36 -13
  31. package/dist/report/icons.d.ts +3 -0
  32. package/dist/report/icons.js +5 -1
  33. package/dist/report/index.d.ts +3 -1
  34. package/dist/report/index.js +3 -1
  35. package/dist/report/live.d.ts +7 -0
  36. package/dist/report/live.js +135 -0
  37. package/dist/report/menu-bar.d.ts +3 -3
  38. package/dist/report/menu-bar.js +3 -3
  39. package/dist/report/player.d.ts +3 -3
  40. package/dist/report/player.js +3 -3
  41. package/dist/report/share-page.d.ts +48 -0
  42. package/dist/report/share-page.js +291 -0
  43. package/dist/report/styles.d.ts +2 -0
  44. package/dist/report/styles.js +2 -2
  45. package/dist/report/view.js +2 -0
  46. package/dist/report/walkthrough.d.ts +5 -2
  47. package/dist/report/walkthrough.js +17 -5
  48. package/dist/schema/accounts.js +10 -1
  49. package/dist/schema/evidence.d.ts +15 -8
  50. package/dist/schema/evidence.js +9 -4
  51. package/dist/schema/findings.js +1 -1
  52. package/dist/schema/job.d.ts +205 -65
  53. package/dist/schema/job.js +63 -11
  54. package/dist/schema/ledger.d.ts +80 -16
  55. package/dist/schema/ledger.js +36 -0
  56. package/dist/schema/share.d.ts +17 -0
  57. package/dist/schema/share.js +22 -0
  58. package/package.json +1 -1
@@ -83,10 +83,11 @@ export declare const Shot: Schema.Struct<{
83
83
  export type Shot = typeof Shot.Type;
84
84
  /**
85
85
  * What a step did to the page, by its action: `click` (and an `upload` through a file chooser)
86
- * moved the mouse and pressed it; `fill` typed into a field; `press` pressed a key; `scroll`,
87
- * `goto` and `reload` moved or loaded the page.
86
+ * moved the mouse and pressed it; `hover` moved the mouse over an element without pressing it;
87
+ * `fill` typed into a field; `press` pressed a key; `scroll`, `goto` and `reload` moved or loaded
88
+ * the page.
88
89
  */
89
- export declare const ActionKind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
90
+ export declare const ActionKind: Schema.Literals<readonly ["click", "hover", "fill", "upload", "press", "scroll", "goto", "reload"]>;
90
91
  export type ActionKind = typeof ActionKind.Type;
91
92
  /** A point in the viewport, in CSS pixels. */
92
93
  export declare const Point: Schema.Struct<{
@@ -99,13 +100,16 @@ export type Point = typeof Point.Type;
99
100
  * that acted on an element, where. Never what was typed: the job's own step says that.
100
101
  */
101
102
  export declare const StepAction: Schema.Struct<{
102
- readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
103
+ readonly kind: Schema.Literals<readonly ["click", "hover", "fill", "upload", "press", "scroll", "goto", "reload"]>;
103
104
  /**
104
105
  * When it happened, in ms from the start of the session's video (as `StepTiming`): for a click
105
106
  * or a key, when the browser dispatched its input event to the page (the mouse press, the key
106
107
  * going down), not when the page's handlers for it were done. Missing when that event was not
107
108
  * seen (see `point`), and always for a fill and for files set on a file input directly: a page
108
- * can make their edits itself, so an edit is no proof of when they acted.
109
+ * can make their edits itself, so an edit is no proof of when they acted. Always missing for a
110
+ * hover too: when the page moves or scrolls under a pointer that stands still, the browser
111
+ * itself sends trusted mouse events (`mouseover`, and in some versions `mousemove`), at a time
112
+ * the page chooses, so none proves when or where a hover moved the mouse.
109
113
  */
110
114
  readonly atMs: Schema.optionalKey<Schema.Number>;
111
115
  /**
@@ -149,7 +153,7 @@ export type OnScreenProblem = typeof OnScreenProblem.Type;
149
153
  /**
150
154
  * How the element a step checked or acted on showed on the screen, measured by code as the step
151
155
  * ran: for a check (waitFor visible, expectText, expectLink) once it held, for a click before it
152
- * and for a fill after it. A measurement only, for whoever writes the case up: it never changes
156
+ * and for a fill or a hover after it. A measurement only, for whoever writes the case up: it never changes
153
157
  * a status.
154
158
  */
155
159
  export declare const OnScreen: Schema.Struct<{
@@ -179,13 +183,16 @@ export declare const StepTiming: Schema.Struct<{
179
183
  }>>>;
180
184
  /** What it did to the page, when it acted. Missing in older ledgers and for checks. */
181
185
  readonly action: Schema.optionalKey<Schema.Struct<{
182
- readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
186
+ readonly kind: Schema.Literals<readonly ["click", "hover", "fill", "upload", "press", "scroll", "goto", "reload"]>;
183
187
  /**
184
188
  * When it happened, in ms from the start of the session's video (as `StepTiming`): for a click
185
189
  * or a key, when the browser dispatched its input event to the page (the mouse press, the key
186
190
  * going down), not when the page's handlers for it were done. Missing when that event was not
187
191
  * seen (see `point`), and always for a fill and for files set on a file input directly: a page
188
- * can make their edits itself, so an edit is no proof of when they acted.
192
+ * can make their edits itself, so an edit is no proof of when they acted. Always missing for a
193
+ * hover too: when the page moves or scrolls under a pointer that stands still, the browser
194
+ * itself sends trusted mouse events (`mouseover`, and in some versions `mousemove`), at a time
195
+ * the page chooses, so none proves when or where a hover moved the mouse.
189
196
  */
190
197
  readonly atMs: Schema.optionalKey<Schema.Number>;
191
198
  /**
@@ -72,11 +72,13 @@ export const Shot = Schema.Struct({
72
72
  });
73
73
  /**
74
74
  * What a step did to the page, by its action: `click` (and an `upload` through a file chooser)
75
- * moved the mouse and pressed it; `fill` typed into a field; `press` pressed a key; `scroll`,
76
- * `goto` and `reload` moved or loaded the page.
75
+ * moved the mouse and pressed it; `hover` moved the mouse over an element without pressing it;
76
+ * `fill` typed into a field; `press` pressed a key; `scroll`, `goto` and `reload` moved or loaded
77
+ * the page.
77
78
  */
78
79
  export const ActionKind = Schema.Literals([
79
80
  'click',
81
+ 'hover',
80
82
  'fill',
81
83
  'upload',
82
84
  'press',
@@ -97,7 +99,10 @@ export const StepAction = Schema.Struct({
97
99
  * or a key, when the browser dispatched its input event to the page (the mouse press, the key
98
100
  * going down), not when the page's handlers for it were done. Missing when that event was not
99
101
  * seen (see `point`), and always for a fill and for files set on a file input directly: a page
100
- * can make their edits itself, so an edit is no proof of when they acted.
102
+ * can make their edits itself, so an edit is no proof of when they acted. Always missing for a
103
+ * hover too: when the page moves or scrolls under a pointer that stands still, the browser
104
+ * itself sends trusted mouse events (`mouseover`, and in some versions `mousemove`), at a time
105
+ * the page chooses, so none proves when or where a hover moved the mouse.
101
106
  */
102
107
  atMs: Schema.optionalKey(Schema.Number),
103
108
  /**
@@ -128,7 +133,7 @@ export const OnScreenProblem = Schema.Literals(['clipped', 'covered', 'offscreen
128
133
  /**
129
134
  * How the element a step checked or acted on showed on the screen, measured by code as the step
130
135
  * ran: for a check (waitFor visible, expectText, expectLink) once it held, for a click before it
131
- * and for a fill after it. A measurement only, for whoever writes the case up: it never changes
136
+ * and for a fill or a hover after it. A measurement only, for whoever writes the case up: it never changes
132
137
  * a status.
133
138
  */
134
139
  export const OnScreen = Schema.Struct({
@@ -48,7 +48,7 @@ export const CaseFindings = Schema.Struct({
48
48
  'case did not do what its success says, even if every check passed: what is wrong, in ' +
49
49
  'one line. The case then counts as failed by your review everywhere results are shown. ' +
50
50
  'Leave it out when the case did what it should; minor issues go in didnt. It can never ' +
51
- 'make a case pass.').check(Schema.makeFilter((text) => /[\r\n]/.test(text) ? 'Use one line, with no line breaks' : undefined))),
51
+ 'make a case pass.').check(Schema.makeFilter((text) => (/[\r\n]/.test(text) ? 'Use one line, with no line breaks' : undefined), { toJsonSchema: () => ({ pattern: '^[^\\r\\n]*$' }) }))),
52
52
  highlights: Schema.optionalKey(Schema.Array(Highlight)
53
53
  .check(Schema.isMaxLength(6, { message: 'Use at most 6 highlights per case' }))
54
54
  .annotate({ description: 'Elements to mark on this case’s screenshots. At most 6.' })),