@debuffjp/cli 0.4.0 → 0.5.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.
@@ -10,6 +10,10 @@
10
10
  "$schema": { "type": "string" },
11
11
  "name": { "type": "string", "description": "Defaults to the file name." },
12
12
  "page": { "type": "string", "description": "Path to open on the dev server.", "default": "/" },
13
+ "reducedMotion": {
14
+ "type": "boolean",
15
+ "description": "Run with the browser asking for reduced motion (prefers-reduced-motion: reduce)."
16
+ },
13
17
  "steps": { "type": "array", "items": { "$ref": "#/$defs/step" } }
14
18
  },
15
19
  "$defs": {
@@ -90,8 +94,59 @@
90
94
  "properties": {
91
95
  "expect": {
92
96
  "type": "object",
93
- "description": "Dotted paths into dev state (scene, tick, time, frozen, stats.*, state.*).",
97
+ "description": "Dotted paths into dev state (scene, tick, time, frozen, stats.*, state.*, events.<name> = times game.emit(name) ran).",
98
+ "additionalProperties": { "$ref": "#/$defs/comparison" }
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "type": "object",
104
+ "required": ["until"],
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "until": {
108
+ "type": "object",
109
+ "description": "Advance one step at a time until every condition holds (same paths as expect).",
94
110
  "additionalProperties": { "$ref": "#/$defs/comparison" }
111
+ },
112
+ "within": {
113
+ "type": "integer",
114
+ "minimum": 0,
115
+ "default": 600,
116
+ "description": "Fail if the conditions don't hold within this many steps."
117
+ }
118
+ }
119
+ },
120
+ {
121
+ "type": "object",
122
+ "required": ["flashes"],
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "flashes": {
126
+ "type": "integer",
127
+ "minimum": 1,
128
+ "description": "Play this many steps and fail on flashing that could trigger photosensitive seizures: more than three flashes a second over a quarter of a 10° field (approximates WCAG 2.3.1)."
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "type": "object",
134
+ "required": ["contrast"],
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "contrast": {
138
+ "type": "array",
139
+ "items": { "type": "number" },
140
+ "minItems": 4,
141
+ "maxItems": 4,
142
+ "description": "Region [x, y, w, h] in logical units."
143
+ },
144
+ "min": {
145
+ "type": "number",
146
+ "minimum": 1,
147
+ "maximum": 21,
148
+ "default": 4.5,
149
+ "description": "Minimum contrast between the region's light and dark parts (4.5 is WCAG AA for text)."
95
150
  }
96
151
  }
97
152
  },