@kurvball/rehearse 0.0.0-stage → 1.3.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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -2
  3. package/dist/affected/affected.d.ts +22 -0
  4. package/dist/affected/affected.js +162 -0
  5. package/dist/affected/index.d.ts +1 -0
  6. package/dist/affected/index.js +1 -0
  7. package/dist/args.d.ts +12 -0
  8. package/dist/args.js +42 -0
  9. package/dist/cli.d.ts +4 -0
  10. package/dist/cli.js +100 -0
  11. package/dist/commands/check.d.ts +2 -0
  12. package/dist/commands/check.js +42 -0
  13. package/dist/commands/clean.d.ts +2 -0
  14. package/dist/commands/clean.js +37 -0
  15. package/dist/commands/command.d.ts +30 -0
  16. package/dist/commands/command.js +38 -0
  17. package/dist/commands/compare.d.ts +4 -0
  18. package/dist/commands/compare.js +89 -0
  19. package/dist/commands/drive.d.ts +2 -0
  20. package/dist/commands/drive.js +244 -0
  21. package/dist/commands/index.d.ts +3 -0
  22. package/dist/commands/index.js +32 -0
  23. package/dist/commands/init.d.ts +2 -0
  24. package/dist/commands/init.js +19 -0
  25. package/dist/commands/list.d.ts +2 -0
  26. package/dist/commands/list.js +69 -0
  27. package/dist/commands/open.d.ts +2 -0
  28. package/dist/commands/open.js +60 -0
  29. package/dist/commands/people.d.ts +2 -0
  30. package/dist/commands/people.js +49 -0
  31. package/dist/commands/run.d.ts +4 -0
  32. package/dist/commands/run.js +84 -0
  33. package/dist/commands/services.d.ts +28 -0
  34. package/dist/commands/services.js +51 -0
  35. package/dist/commands/stage.d.ts +7 -0
  36. package/dist/commands/stage.js +53 -0
  37. package/dist/commands/up.d.ts +3 -0
  38. package/dist/commands/up.js +77 -0
  39. package/dist/commands/validate.d.ts +2 -0
  40. package/dist/commands/validate.js +35 -0
  41. package/dist/commands/worlds.d.ts +2 -0
  42. package/dist/commands/worlds.js +15 -0
  43. package/dist/compare/announce.d.ts +6 -0
  44. package/dist/compare/announce.js +27 -0
  45. package/dist/compare/compare.d.ts +83 -0
  46. package/dist/compare/compare.js +335 -0
  47. package/dist/compare/diff.d.ts +15 -0
  48. package/dist/compare/diff.js +105 -0
  49. package/dist/compare/index.d.ts +5 -0
  50. package/dist/compare/index.js +5 -0
  51. package/dist/compare/setaside.d.ts +29 -0
  52. package/dist/compare/setaside.js +121 -0
  53. package/dist/compare/verdict.d.ts +21 -0
  54. package/dist/compare/verdict.js +30 -0
  55. package/dist/drive/aria.d.ts +8 -0
  56. package/dist/drive/aria.js +12 -0
  57. package/dist/drive/browser.d.ts +34 -0
  58. package/dist/drive/browser.js +216 -0
  59. package/dist/drive/daemon.d.ts +1 -0
  60. package/dist/drive/daemon.js +171 -0
  61. package/dist/drive/grammar.d.ts +93 -0
  62. package/dist/drive/grammar.js +303 -0
  63. package/dist/drive/index.d.ts +4 -0
  64. package/dist/drive/index.js +4 -0
  65. package/dist/drive/names.d.ts +24 -0
  66. package/dist/drive/names.js +97 -0
  67. package/dist/drive/state.d.ts +13 -0
  68. package/dist/drive/state.js +28 -0
  69. package/dist/errors.d.ts +26 -0
  70. package/dist/errors.js +32 -0
  71. package/dist/exec.d.ts +16 -0
  72. package/dist/exec.js +43 -0
  73. package/dist/git/checkout.d.ts +11 -0
  74. package/dist/git/checkout.js +90 -0
  75. package/dist/git/git.d.ts +7 -0
  76. package/dist/git/git.js +27 -0
  77. package/dist/git/index.d.ts +2 -0
  78. package/dist/git/index.js +2 -0
  79. package/dist/git/seed.d.ts +3 -0
  80. package/dist/git/seed.js +115 -0
  81. package/dist/index.d.ts +18 -0
  82. package/dist/index.js +15 -0
  83. package/dist/kinds/all.d.ts +4 -0
  84. package/dist/kinds/all.js +4 -0
  85. package/dist/kinds/call/check.d.ts +29 -0
  86. package/dist/kinds/call/check.js +187 -0
  87. package/dist/kinds/call/definition.d.ts +16 -0
  88. package/dist/kinds/call/definition.js +33 -0
  89. package/dist/kinds/call/hurl.d.ts +65 -0
  90. package/dist/kinds/call/hurl.js +333 -0
  91. package/dist/kinds/call/kind.d.ts +8 -0
  92. package/dist/kinds/call/kind.js +122 -0
  93. package/dist/kinds/call/send.d.ts +32 -0
  94. package/dist/kinds/call/send.js +152 -0
  95. package/dist/kinds/call/words.d.ts +22 -0
  96. package/dist/kinds/call/words.js +24 -0
  97. package/dist/kinds/file/kind.d.ts +44 -0
  98. package/dist/kinds/file/kind.js +331 -0
  99. package/dist/kinds/file/layouts.d.ts +14 -0
  100. package/dist/kinds/file/layouts.js +103 -0
  101. package/dist/kinds/flow/kind.d.ts +21 -0
  102. package/dist/kinds/flow/kind.js +412 -0
  103. package/dist/kinds/flow/literal.d.ts +8 -0
  104. package/dist/kinds/flow/literal.js +148 -0
  105. package/dist/kinds/index.d.ts +10 -0
  106. package/dist/kinds/index.js +8 -0
  107. package/dist/kinds/kind.d.ts +63 -0
  108. package/dist/kinds/kind.js +21 -0
  109. package/dist/kinds/piece/canvas.d.ts +18 -0
  110. package/dist/kinds/piece/canvas.js +165 -0
  111. package/dist/kinds/piece/conventions.d.ts +12 -0
  112. package/dist/kinds/piece/conventions.js +101 -0
  113. package/dist/kinds/piece/csf.d.ts +10 -0
  114. package/dist/kinds/piece/csf.js +304 -0
  115. package/dist/kinds/piece/kind.d.ts +12 -0
  116. package/dist/kinds/piece/kind.js +297 -0
  117. package/dist/kinds/piece/server.d.ts +23 -0
  118. package/dist/kinds/piece/server.js +236 -0
  119. package/dist/manifest/fill.d.ts +4 -0
  120. package/dist/manifest/fill.js +7 -0
  121. package/dist/manifest/index.d.ts +5 -0
  122. package/dist/manifest/index.js +5 -0
  123. package/dist/manifest/init.d.ts +1 -0
  124. package/dist/manifest/init.js +47 -0
  125. package/dist/manifest/load.d.ts +7 -0
  126. package/dist/manifest/load.js +245 -0
  127. package/dist/manifest/types.d.ts +255 -0
  128. package/dist/manifest/types.js +7 -0
  129. package/dist/manifest/yaml.d.ts +5 -0
  130. package/dist/manifest/yaml.js +47 -0
  131. package/dist/people/index.d.ts +1 -0
  132. package/dist/people/index.js +1 -0
  133. package/dist/people/people.d.ts +39 -0
  134. package/dist/people/people.js +139 -0
  135. package/dist/run/cache.d.ts +20 -0
  136. package/dist/run/cache.js +98 -0
  137. package/dist/run/index.d.ts +5 -0
  138. package/dist/run/index.js +4 -0
  139. package/dist/run/observation.d.ts +27 -0
  140. package/dist/run/observation.js +1 -0
  141. package/dist/run/parallel.d.ts +28 -0
  142. package/dist/run/parallel.js +140 -0
  143. package/dist/run/session.d.ts +35 -0
  144. package/dist/run/session.js +399 -0
  145. package/dist/run/vars.d.ts +3 -0
  146. package/dist/run/vars.js +13 -0
  147. package/dist/scenarios/area.d.ts +6 -0
  148. package/dist/scenarios/area.js +37 -0
  149. package/dist/scenarios/files.d.ts +9 -0
  150. package/dist/scenarios/files.js +26 -0
  151. package/dist/scenarios/glob.d.ts +6 -0
  152. package/dist/scenarios/glob.js +106 -0
  153. package/dist/scenarios/index.d.ts +4 -0
  154. package/dist/scenarios/index.js +4 -0
  155. package/dist/scenarios/read.d.ts +18 -0
  156. package/dist/scenarios/read.js +54 -0
  157. package/dist/scenarios/scenario.d.ts +34 -0
  158. package/dist/scenarios/scenario.js +10 -0
  159. package/dist/schema.d.ts +14 -0
  160. package/dist/schema.js +122 -0
  161. package/dist/services/index.d.ts +2 -0
  162. package/dist/services/index.js +2 -0
  163. package/dist/services/registry.d.ts +23 -0
  164. package/dist/services/registry.js +49 -0
  165. package/dist/services/service.d.ts +23 -0
  166. package/dist/services/service.js +313 -0
  167. package/dist/stage/api.d.ts +30 -0
  168. package/dist/stage/api.js +206 -0
  169. package/dist/stage/client/client/api.js +11 -0
  170. package/dist/stage/client/client/index.js +1 -0
  171. package/dist/stage/client/features/canvas/call.js +65 -0
  172. package/dist/stage/client/features/canvas/context.js +1 -0
  173. package/dist/stage/client/features/canvas/file.js +36 -0
  174. package/dist/stage/client/features/canvas/flow.js +59 -0
  175. package/dist/stage/client/features/canvas/index.js +1 -0
  176. package/dist/stage/client/features/canvas/observed.js +8 -0
  177. package/dist/stage/client/features/canvas/parts.js +24 -0
  178. package/dist/stage/client/features/canvas/piece.js +31 -0
  179. package/dist/stage/client/features/canvas/reach.js +6 -0
  180. package/dist/stage/client/features/canvas/views.js +16 -0
  181. package/dist/stage/client/features/list/index.js +1 -0
  182. package/dist/stage/client/features/list/list.js +53 -0
  183. package/dist/stage/client/features/list/reach.js +10 -0
  184. package/dist/stage/client/features/scenario/heading.js +14 -0
  185. package/dist/stage/client/features/scenario/index.js +1 -0
  186. package/dist/stage/client/features/scenario/reach.js +9 -0
  187. package/dist/stage/client/features/scenario/scenario.js +145 -0
  188. package/dist/stage/client/features/try/index.js +1 -0
  189. package/dist/stage/client/features/try/reach.js +12 -0
  190. package/dist/stage/client/features/try/try.js +65 -0
  191. package/dist/stage/client/index.html +16 -0
  192. package/dist/stage/client/main.js +24 -0
  193. package/dist/stage/client/primitives/busy.js +6 -0
  194. package/dist/stage/client/primitives/focus.js +21 -0
  195. package/dist/stage/client/primitives/h.js +25 -0
  196. package/dist/stage/client/primitives/index.js +6 -0
  197. package/dist/stage/client/primitives/keyed.js +16 -0
  198. package/dist/stage/client/primitives/say.js +6 -0
  199. package/dist/stage/client/primitives/state.js +21 -0
  200. package/dist/stage/client/primitives/types.js +1 -0
  201. package/dist/stage/client/primitives/verdicts.js +8 -0
  202. package/dist/stage/client/stage.css +652 -0
  203. package/dist/stage/compared.d.ts +20 -0
  204. package/dist/stage/compared.js +58 -0
  205. package/dist/stage/files.d.ts +4 -0
  206. package/dist/stage/files.js +59 -0
  207. package/dist/stage/guard.d.ts +3 -0
  208. package/dist/stage/guard.js +20 -0
  209. package/dist/stage/http.d.ts +12 -0
  210. package/dist/stage/http.js +34 -0
  211. package/dist/stage/index.d.ts +1 -0
  212. package/dist/stage/index.js +1 -0
  213. package/dist/stage/sending.d.ts +18 -0
  214. package/dist/stage/sending.js +66 -0
  215. package/dist/stage/server.d.ts +33 -0
  216. package/dist/stage/server.js +253 -0
  217. package/dist/version.d.ts +2 -0
  218. package/dist/version.js +5 -0
  219. package/dist/worlds/define.d.ts +16 -0
  220. package/dist/worlds/define.js +45 -0
  221. package/dist/worlds/index.d.ts +2 -0
  222. package/dist/worlds/index.js +2 -0
  223. package/dist/worlds/worlds.d.ts +15 -0
  224. package/dist/worlds/worlds.js +46 -0
  225. package/llms.txt +46 -0
  226. package/package.json +84 -3
  227. package/schema/v1/announce.schema.json +28 -0
  228. package/schema/v1/check.schema.json +67 -0
  229. package/schema/v1/clean.schema.json +19 -0
  230. package/schema/v1/common.schema.json +210 -0
  231. package/schema/v1/comparison.schema.json +298 -0
  232. package/schema/v1/dependents.schema.json +30 -0
  233. package/schema/v1/drive.schema.json +112 -0
  234. package/schema/v1/error.schema.json +26 -0
  235. package/schema/v1/file-scenario.schema.json +175 -0
  236. package/schema/v1/flow.schema.json +216 -0
  237. package/schema/v1/init.schema.json +20 -0
  238. package/schema/v1/list.schema.json +70 -0
  239. package/schema/v1/manifest.schema.json +434 -0
  240. package/schema/v1/observation.schema.json +388 -0
  241. package/schema/v1/open.schema.json +14 -0
  242. package/schema/v1/people.schema.json +88 -0
  243. package/schema/v1/samples/announce.yaml +5 -0
  244. package/schema/v1/samples/check.json +13 -0
  245. package/schema/v1/samples/clean.json +1 -0
  246. package/schema/v1/samples/comparison.json +83 -0
  247. package/schema/v1/samples/dependents.json +7 -0
  248. package/schema/v1/samples/drive.json +10 -0
  249. package/schema/v1/samples/error.json +10 -0
  250. package/schema/v1/samples/file-scenario.yaml +13 -0
  251. package/schema/v1/samples/flow.yaml +13 -0
  252. package/schema/v1/samples/init.json +1 -0
  253. package/schema/v1/samples/list.json +24 -0
  254. package/schema/v1/samples/manifest.yaml +55 -0
  255. package/schema/v1/samples/observation.json +49 -0
  256. package/schema/v1/samples/open.json +6 -0
  257. package/schema/v1/samples/people.json +11 -0
  258. package/schema/v1/samples/services.json +27 -0
  259. package/schema/v1/samples/stage.json +6 -0
  260. package/schema/v1/samples/try.json +13 -0
  261. package/schema/v1/samples/up.json +16 -0
  262. package/schema/v1/samples/validate.json +7 -0
  263. package/schema/v1/samples/worlds.json +21 -0
  264. package/schema/v1/services.schema.json +72 -0
  265. package/schema/v1/stage.schema.json +14 -0
  266. package/schema/v1/try.schema.json +56 -0
  267. package/schema/v1/up.schema.json +55 -0
  268. package/schema/v1/validate.schema.json +40 -0
  269. package/schema/v1/worlds.schema.json +33 -0
  270. package/skill/rehearse/SKILL.md +148 -0
@@ -0,0 +1,434 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rehearse.kurvball.ca/schema/v1/manifest.schema.json",
4
+ "title": "rehearse.yaml",
5
+ "description": "What a repository has: the branch production runs, its services, people, worlds, stand-ins and scenarios. Every block is optional. Commands run in the checkout, with placeholders such as {{port}}, {{url}}, {{checkout}}, {{manifest}}, {{world}}, {{person}} and {{scratch}} filled in.",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": { "description": "The manifest's version. Only 1 exists.", "const": 1 },
9
+ "base": {
10
+ "description": "The branch production runs, main or dev. Comparisons use it as the base unless told otherwise.",
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "default": "main"
14
+ },
15
+ "checkout": {
16
+ "description": "The checkout to run in when none is given, relative to this file. Useful when the manifest is kept outside the product.",
17
+ "type": "string"
18
+ },
19
+ "prepare": {
20
+ "description": "Run once in a fresh checkout of a base commit, before anything else: installing dependencies, building.",
21
+ "$ref": "#/$defs/command"
22
+ },
23
+ "seed": {
24
+ "description": "Whether a new base checkout starts from the node_modules of the newest one prepared with the same lockfile, before prepare runs. Default true. Turn it off when an install script generates code from your source and prepare doesn't run it again.",
25
+ "type": "boolean"
26
+ },
27
+ "overlay": {
28
+ "description": "Files copied into each checkout after prepare, for a manifest kept outside the product. In a repository that adopts Rehearse, commit them instead.",
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["from", "to"],
33
+ "properties": {
34
+ "from": { "description": "A file or folder, relative to this file.", "type": "string" },
35
+ "to": { "description": "Where it goes, relative to the checkout.", "type": "string" }
36
+ },
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "services": {
41
+ "description": "What can come up: a server, an app, a daemon.",
42
+ "type": "object",
43
+ "propertyNames": { "$ref": "#/$defs/name" },
44
+ "additionalProperties": { "$ref": "#/$defs/service" }
45
+ },
46
+ "signIn": {
47
+ "description": "A command that prints the people you can sign in as, with their tokens, in the sign-in shape: {\"people\": {\"name\": \"token\" | {\"token\": ..., ...}}, \"variables\": {...}}.",
48
+ "oneOf": [
49
+ { "type": "string", "minLength": 1 },
50
+ {
51
+ "type": "object",
52
+ "required": ["command"],
53
+ "properties": {
54
+ "command": { "type": "string", "minLength": 1 },
55
+ "service": { "description": "The service that must be up for it to run.", "type": "string" },
56
+ "cwd": { "type": "string" }
57
+ },
58
+ "additionalProperties": false
59
+ }
60
+ ]
61
+ },
62
+ "people": {
63
+ "description": "Who you can sign in as.",
64
+ "type": "object",
65
+ "propertyNames": { "$ref": "#/$defs/name", "not": { "enum": ["you", "nobody", "api"] } },
66
+ "additionalProperties": { "$ref": "#/$defs/person" }
67
+ },
68
+ "worlds": {
69
+ "description": "Named starting states. A world extends another and adds to it.",
70
+ "type": "object",
71
+ "propertyNames": { "$ref": "#/$defs/name" },
72
+ "additionalProperties": { "$ref": "#/$defs/world" }
73
+ },
74
+ "standins": {
75
+ "description": "Fakes for what can't run locally, chosen at run time and named in every result.",
76
+ "type": "object",
77
+ "propertyNames": { "$ref": "#/$defs/name" },
78
+ "additionalProperties": { "$ref": "#/$defs/standin" }
79
+ },
80
+ "scenarios": {
81
+ "description": "Where the scenarios are, by kind. A path that starts with ./ or ../ is read beside this file, the same on both sides; any other path is read from each checkout.",
82
+ "type": "object",
83
+ "properties": {
84
+ "pieces": { "$ref": "#/$defs/pieces" },
85
+ "flows": { "$ref": "#/$defs/flows" },
86
+ "calls": { "$ref": "#/$defs/calls" },
87
+ "files": { "$ref": "#/$defs/files" }
88
+ },
89
+ "additionalProperties": false
90
+ },
91
+ "defaults": {
92
+ "description": "What a scenario runs with when it says nothing.",
93
+ "type": "object",
94
+ "properties": {
95
+ "service": { "type": "string" },
96
+ "world": { "type": "string" },
97
+ "person": { "type": "string" }
98
+ },
99
+ "additionalProperties": false
100
+ },
101
+ "setAside": { "$ref": "#/$defs/setAside" },
102
+ "affected": {
103
+ "description": "How rehearse list --affected finds what a change reaches.",
104
+ "type": "object",
105
+ "properties": {
106
+ "graph": {
107
+ "description": "A command that prints the dependents of the files appended to it, as schema/v1/dependents.schema.json says. By default, Ashlar's when Ashlar is present.",
108
+ "type": "string"
109
+ }
110
+ },
111
+ "additionalProperties": false
112
+ },
113
+ "budget": {
114
+ "description": "How much may run at once on this machine.",
115
+ "type": "object",
116
+ "properties": {
117
+ "services": {
118
+ "description": "Sets of services up at once. Default 1.",
119
+ "type": "integer",
120
+ "minimum": 1,
121
+ "maximum": 4
122
+ },
123
+ "checkouts": {
124
+ "description": "Base checkouts kept under .rehearse/checkouts. Default 3.",
125
+ "type": "integer",
126
+ "minimum": 1
127
+ }
128
+ },
129
+ "additionalProperties": false
130
+ }
131
+ },
132
+ "additionalProperties": false,
133
+ "$defs": {
134
+ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" },
135
+ "command": { "type": "string", "minLength": 1 },
136
+ "env": {
137
+ "type": "object",
138
+ "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
139
+ "additionalProperties": { "type": ["string", "number", "boolean"] }
140
+ },
141
+ "service": {
142
+ "type": "object",
143
+ "required": ["up"],
144
+ "properties": {
145
+ "describe": { "type": "string" },
146
+ "up": {
147
+ "description": "Brings it up. It may keep running, or start a daemon and exit 0.",
148
+ "$ref": "#/$defs/command"
149
+ },
150
+ "cwd": { "description": "Where up runs, relative to the checkout.", "type": "string" },
151
+ "port": {
152
+ "description": "The port it listens on; auto picks a free one and gives it as {{port}}.",
153
+ "oneOf": [{ "type": "integer", "minimum": 1, "maximum": 65535 }, { "const": "auto" }]
154
+ },
155
+ "url": {
156
+ "description": "Where it answers. Default http://127.0.0.1:{{port}} when it has a port.",
157
+ "type": "string"
158
+ },
159
+ "ready": {
160
+ "description": "How Rehearse knows it is ready: a URL that answers, a command that exits 0, or a line in its log.",
161
+ "oneOf": [
162
+ { "type": "string", "minLength": 1 },
163
+ {
164
+ "type": "object",
165
+ "properties": {
166
+ "http": { "type": "string" },
167
+ "command": { "type": "string" },
168
+ "log": {
169
+ "description": "A regular expression its output matches when ready.",
170
+ "type": "string"
171
+ }
172
+ },
173
+ "minProperties": 1,
174
+ "maxProperties": 1,
175
+ "additionalProperties": false
176
+ }
177
+ ]
178
+ },
179
+ "timeout": {
180
+ "description": "Seconds to wait until ready. Default 60.",
181
+ "type": "number",
182
+ "exclusiveMinimum": 0
183
+ },
184
+ "down": {
185
+ "description": "Stops it. By default its process group is ended.",
186
+ "$ref": "#/$defs/command"
187
+ },
188
+ "env": { "$ref": "#/$defs/env" },
189
+ "isolate": {
190
+ "description": "How two copies (base and head) keep apart: a scratch folder per copy, given through an environment variable.",
191
+ "type": "object",
192
+ "required": ["env"],
193
+ "properties": { "env": { "type": "string" } },
194
+ "additionalProperties": false
195
+ },
196
+ "drive": {
197
+ "description": "The service's own driver for flows and rehearse drive, such as 'pnpm drive'. It takes the drive steps and answers in the drive result JSON (drive.schema.json).",
198
+ "$ref": "#/$defs/command"
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ "person": {
204
+ "type": "object",
205
+ "properties": {
206
+ "describe": { "type": "string" },
207
+ "real": {
208
+ "description": "How real the person is: local (a sign-in the local services trust), stand-in (a fake identity), real (a real account).",
209
+ "enum": ["local", "stand-in", "real"],
210
+ "default": "local"
211
+ },
212
+ "default": { "type": "boolean" },
213
+ "token": {
214
+ "description": "Where this person's credential comes from when signIn doesn't give it.",
215
+ "type": "object",
216
+ "properties": {
217
+ "command": { "type": "string" },
218
+ "env": { "type": "string" }
219
+ },
220
+ "minProperties": 1,
221
+ "maxProperties": 1,
222
+ "additionalProperties": false
223
+ },
224
+ "browser": {
225
+ "description": "How a browser signs in as this person: a header on every request, values put in storage, or sign-in steps. {{token}} is the person's token.",
226
+ "type": "object",
227
+ "properties": {
228
+ "headers": { "type": "object", "additionalProperties": { "type": "string" } },
229
+ "storage": { "type": "object", "additionalProperties": { "type": "string" } },
230
+ "cookies": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "object",
234
+ "required": ["name", "value"],
235
+ "properties": {
236
+ "name": { "type": "string" },
237
+ "value": { "type": "string" },
238
+ "path": { "type": "string" }
239
+ },
240
+ "additionalProperties": false
241
+ }
242
+ },
243
+ "steps": { "$ref": "flow.schema.json#/properties/steps" }
244
+ },
245
+ "additionalProperties": false
246
+ }
247
+ },
248
+ "additionalProperties": false
249
+ },
250
+ "world": {
251
+ "type": "object",
252
+ "properties": {
253
+ "describe": { "type": "string" },
254
+ "extends": { "description": "The world this one builds on.", "type": "string" },
255
+ "add": {
256
+ "description": "Adds this world on top of the one it extends, once services are up.",
257
+ "$ref": "#/$defs/command"
258
+ },
259
+ "before": {
260
+ "description": "Adds this world before services come up, such as files the services read when they start. No service is up yet, so {{port}}, {{url}} and {{scratch}} are not filled.",
261
+ "$ref": "#/$defs/command"
262
+ },
263
+ "default": { "type": "boolean" }
264
+ },
265
+ "additionalProperties": false
266
+ },
267
+ "standin": {
268
+ "type": "object",
269
+ "required": ["replaces"],
270
+ "properties": {
271
+ "replaces": { "description": "What it stands in for.", "type": "string" },
272
+ "by": { "description": "What plays it: a file, a package, a command.", "type": "string" },
273
+ "fidelity": {
274
+ "description": "fake: written by hand. recorded: replays real answers. local: the real thing, run locally.",
275
+ "enum": ["fake", "recorded", "local"],
276
+ "default": "fake"
277
+ },
278
+ "services": {
279
+ "description": "The services it applies to. Default all.",
280
+ "type": "array",
281
+ "items": { "type": "string" }
282
+ },
283
+ "env": { "description": "Set on those services while the stand-in is used.", "$ref": "#/$defs/env" },
284
+ "real": {
285
+ "description": "How to use the real dependency instead (--real <name>). Without it, the real one can't be chosen locally.",
286
+ "type": "object",
287
+ "properties": { "env": { "$ref": "#/$defs/env" } },
288
+ "additionalProperties": false
289
+ }
290
+ },
291
+ "additionalProperties": false
292
+ },
293
+ "paths": {
294
+ "description": "Globs: * stops at /, ** crosses folders. Or entries that also say which files they cover.",
295
+ "type": "array",
296
+ "items": {
297
+ "oneOf": [
298
+ { "type": "string", "minLength": 1 },
299
+ {
300
+ "type": "object",
301
+ "required": ["path"],
302
+ "properties": {
303
+ "path": { "type": "string", "minLength": 1 },
304
+ "covers": {
305
+ "description": "Files whose change reaches these scenarios, for rehearse list --affected.",
306
+ "type": "array",
307
+ "items": { "type": "string" }
308
+ }
309
+ },
310
+ "additionalProperties": false
311
+ }
312
+ ]
313
+ }
314
+ },
315
+ "pieces": {
316
+ "oneOf": [
317
+ { "$ref": "#/$defs/paths" },
318
+ {
319
+ "type": "object",
320
+ "required": ["paths"],
321
+ "properties": {
322
+ "paths": { "$ref": "#/$defs/paths" },
323
+ "preview": {
324
+ "description": "A Storybook-style preview module (decorators, parameters, global styles), relative to the piece's package.",
325
+ "type": "string"
326
+ },
327
+ "styles": {
328
+ "description": "A stylesheet every piece loads, relative to the piece's package.",
329
+ "type": "string"
330
+ },
331
+ "config": {
332
+ "description": "The Vite config to use, relative to the piece's package.",
333
+ "type": "string"
334
+ },
335
+ "schemes": {
336
+ "description": "The colour schemes each piece is observed in. Default light.",
337
+ "type": "array",
338
+ "items": { "enum": ["light", "dark"] },
339
+ "minItems": 1,
340
+ "uniqueItems": true
341
+ },
342
+ "compare": {
343
+ "description": "What is compared. Default tree, errors and violations; screenshot only when named.",
344
+ "type": "array",
345
+ "items": { "enum": ["tree", "errors", "violations", "screenshot"] },
346
+ "minItems": 1,
347
+ "uniqueItems": true
348
+ },
349
+ "viewport": {
350
+ "type": "object",
351
+ "required": ["width", "height"],
352
+ "properties": { "width": { "type": "integer" }, "height": { "type": "integer" } },
353
+ "additionalProperties": false
354
+ }
355
+ },
356
+ "additionalProperties": false
357
+ }
358
+ ]
359
+ },
360
+ "flows": {
361
+ "oneOf": [
362
+ { "$ref": "#/$defs/paths" },
363
+ {
364
+ "type": "object",
365
+ "required": ["paths"],
366
+ "properties": {
367
+ "paths": { "$ref": "#/$defs/paths" },
368
+ "service": { "description": "The service flows open when they name none.", "type": "string" }
369
+ },
370
+ "additionalProperties": false
371
+ }
372
+ ]
373
+ },
374
+ "calls": {
375
+ "oneOf": [
376
+ { "$ref": "#/$defs/paths" },
377
+ {
378
+ "type": "object",
379
+ "required": ["paths"],
380
+ "properties": {
381
+ "paths": { "$ref": "#/$defs/paths" },
382
+ "service": {
383
+ "description": "The service whose URL is {{api}}. Default the one named api, else the first with a URL.",
384
+ "type": "string"
385
+ },
386
+ "variables": {
387
+ "description": "More variables every call file can use.",
388
+ "type": "object",
389
+ "additionalProperties": { "type": "string" }
390
+ },
391
+ "unordered": {
392
+ "description": "Compare arrays in answers without their order.",
393
+ "type": "boolean"
394
+ }
395
+ },
396
+ "additionalProperties": false
397
+ }
398
+ ]
399
+ },
400
+ "files": {
401
+ "oneOf": [
402
+ { "$ref": "#/$defs/paths" },
403
+ {
404
+ "type": "object",
405
+ "required": ["paths"],
406
+ "properties": { "paths": { "$ref": "#/$defs/paths" } },
407
+ "additionalProperties": false
408
+ }
409
+ ]
410
+ },
411
+ "setAside": {
412
+ "description": "More to set aside before comparing, and what never to set aside.",
413
+ "type": "object",
414
+ "properties": {
415
+ "keys": {
416
+ "description": "Regular expressions over JSON keys whose values are set aside.",
417
+ "type": "array",
418
+ "items": { "type": "string" }
419
+ },
420
+ "values": {
421
+ "description": "Regular expressions over values (or text) that are set aside.",
422
+ "type": "array",
423
+ "items": { "type": "string" }
424
+ },
425
+ "keep": {
426
+ "description": "JSON paths or column names never set aside, such as $.expiresAt.",
427
+ "type": "array",
428
+ "items": { "type": "string" }
429
+ }
430
+ },
431
+ "additionalProperties": false
432
+ }
433
+ }
434
+ }