@cagov/ca-ds 1.0.0 → 1.2.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 (101) hide show
  1. package/README.md +43 -26
  2. package/THIRD-PARTY-LICENSES.txt +690 -0
  3. package/ca-ds.js +48390 -0
  4. package/package.json +5 -31
  5. package/bin/ca-ds.js +0 -5
  6. package/src/cli/add.js +0 -134
  7. package/src/cli/build.js +0 -15
  8. package/src/cli/diff.js +0 -39
  9. package/src/cli/eject.js +0 -112
  10. package/src/cli/exit.js +0 -22
  11. package/src/cli/format.js +0 -52
  12. package/src/cli/init.js +0 -148
  13. package/src/cli/install.js +0 -178
  14. package/src/cli/items.js +0 -10
  15. package/src/cli/login.js +0 -331
  16. package/src/cli/main.js +0 -108
  17. package/src/cli/new.js +0 -230
  18. package/src/cli/outdated.js +0 -74
  19. package/src/cli/pack.js +0 -75
  20. package/src/cli/preview.js +0 -31
  21. package/src/cli/publish.js +0 -295
  22. package/src/cli/pull.js +0 -208
  23. package/src/cli/remote.js +0 -52
  24. package/src/cli/remove.js +0 -69
  25. package/src/cli/update.js +0 -223
  26. package/src/cli/validate.js +0 -131
  27. package/src/lib/browser.js +0 -12
  28. package/src/lib/build.js +0 -249
  29. package/src/lib/bundle.js +0 -148
  30. package/src/lib/catalog.js +0 -44
  31. package/src/lib/checks.js +0 -31
  32. package/src/lib/collection.js +0 -65
  33. package/src/lib/emblem.js +0 -29
  34. package/src/lib/fixtures.js +0 -59
  35. package/src/lib/floor.js +0 -79
  36. package/src/lib/glyph.js +0 -148
  37. package/src/lib/image.js +0 -138
  38. package/src/lib/json-text.js +0 -213
  39. package/src/lib/keys.js +0 -322
  40. package/src/lib/links.js +0 -321
  41. package/src/lib/markdown.js +0 -408
  42. package/src/lib/merge.js +0 -93
  43. package/src/lib/pack.js +0 -30
  44. package/src/lib/page-schema.js +0 -368
  45. package/src/lib/page.js +0 -372
  46. package/src/lib/patch.js +0 -9
  47. package/src/lib/regions.js +0 -173
  48. package/src/lib/registry.js +0 -371
  49. package/src/lib/release.js +0 -119
  50. package/src/lib/repoints.js +0 -120
  51. package/src/lib/resolve.js +0 -32
  52. package/src/lib/schema.js +0 -28
  53. package/src/lib/serial.js +0 -4
  54. package/src/lib/serialize.js +0 -444
  55. package/src/lib/structured.js +0 -72
  56. package/src/lib/system.js +0 -13
  57. package/src/lib/targets.js +0 -85
  58. package/src/lib/terms.js +0 -11
  59. package/src/lib/token-view.js +0 -289
  60. package/src/lib/tokens.js +0 -247
  61. package/src/lib/version.js +0 -34
  62. package/src/preview/frame.js +0 -75
  63. package/src/preview/pages.js +0 -128
  64. package/src/preview/screenshots.js +0 -72
  65. package/src/preview/server.js +0 -378
  66. package/src/preview/shell.js +0 -153
  67. package/src/schema/a11y.schema.json +0 -56
  68. package/src/schema/collection.lock.schema.json +0 -58
  69. package/src/schema/collection.schema.json +0 -65
  70. package/src/schema/composition.schema.json +0 -98
  71. package/src/schema/contract.schema.json +0 -116
  72. package/src/schema/interface.schema.json +0 -257
  73. package/src/schema/item.schema.json +0 -362
  74. package/src/schema/release.schema.json +0 -39
  75. package/src/schema/system.schema.json +0 -75
  76. package/src/schema/variants.schema.json +0 -60
  77. package/src/validate/collection.js +0 -19
  78. package/src/validate/collisions.js +0 -124
  79. package/src/validate/context.js +0 -357
  80. package/src/validate/facts.js +0 -253
  81. package/src/validate/files.js +0 -103
  82. package/src/validate/findings.js +0 -19
  83. package/src/validate/glyphs.js +0 -126
  84. package/src/validate/html.js +0 -215
  85. package/src/validate/imports.js +0 -29
  86. package/src/validate/index.js +0 -75
  87. package/src/validate/item.js +0 -47
  88. package/src/validate/links.js +0 -113
  89. package/src/validate/manifest.js +0 -147
  90. package/src/validate/media.js +0 -65
  91. package/src/validate/page.js +0 -74
  92. package/src/validate/prefixes.js +0 -58
  93. package/src/validate/relations.js +0 -310
  94. package/src/validate/release.js +0 -109
  95. package/src/validate/skill.js +0 -122
  96. package/src/validate/structured.js +0 -335
  97. package/src/validate/tasc.js +0 -80
  98. package/src/validate/template.js +0 -129
  99. package/src/validate/tokens.js +0 -154
  100. package/src/validate/zip.js +0 -40
  101. /package/{src/preview/preview.css → preview.css} +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @cagov/ca-ds
2
2
 
3
- This package is the California Design System's toolbelt. Its `ca-ds` command previews, validates, builds, packs, and publishes a collection of items, and adds, updates, diffs, and ejects the items it installs from the registry. The registry and its docs site import the same library, so the validator you run is the one the registry runs.
3
+ This package is the California Design System's toolbelt. Its `ca-ds` command previews, validates, builds, packs, and publishes a collection of items, and adds, updates, diffs, and ejects the items it installs from the registry. The registry runs the same code, so the validator you run is the one the registry runs.
4
4
 
5
5
  This README owns the commands, their flags, their `--json` shapes, and their exit codes. The item model, the manifest, and the validator's rules belong to the system's own docs, which the registry serves:
6
6
 
@@ -21,30 +21,47 @@ Or add it to a project, and run `ca-ds` from its scripts:
21
21
  npm install --save-dev @cagov/ca-ds
22
22
  ```
23
23
 
24
+ The package installs the command as one file, `ca-ds.js`, which holds its JavaScript dependencies at the versions the registry runs. It installs two packages beside it, `esbuild` and `lightningcss`, each at one exact version, since each ships a binary per platform. `THIRD-PARTY-LICENSES.txt` lists the packages inside `ca-ds.js` with their licenses.
25
+
24
26
  `playwright-core` is an optional peer dependency. Only `ca-ds preview --screenshots` needs it.
25
27
 
26
- The package's version covers the `ca-ds` command: its commands, flags, `--json` shapes, and exit codes. The modules it exports serve the registry, and any release may change them.
28
+ The package's version covers the `ca-ds` command: its commands, flags, `--json` shapes, and exit codes. The package exports no module.
27
29
 
28
30
  ## Collections
29
31
 
30
- A collection is a folder of items with two root files. `ca-ds` finds it by walking up from the working folder to the nearest `collection.json`. A command that needs one exits with the usage code when there's none.
32
+ A collection is a folder of items with two root files: `ca-ds-config.json`, which you write, and `collection.lock.json`, which `ca-ds` writes. `ca-ds` finds it by walking up from the working folder to the nearest `ca-ds-config.json`. A command that needs one exits with the usage code when there's none.
31
33
 
32
- ### collection.json
34
+ ### ca-ds-config.json
33
35
 
34
- `collection.json` says what the collection asks for. `./src/schema/collection.schema.json` owns its shape. Its fields, each optional:
36
+ `ca-ds-config.json` says what the collection asks for. `./src/schema/ca-ds-config.schema.json` owns its shape. Its fields, each optional:
35
37
 
36
38
  - **`registry`**: the registry's base URL
37
39
  - **`namespaces`**: the namespaces the collection authors
38
40
  - **`release`**: a system release, such as `v0.1.0`, that `add` and `update` take their pins from
39
41
  - **`items`**: the items asked for, each with a semver range, such as `{ "standard/button": "^0.3.1" }`
40
- - **`presets`**: named subsets, each `{ "items": [...] }`, for `build --preset`
42
+ - **`presets`**: named subsets, each `{ "description": "...", "items": [...] }`, for `build --preset`
41
43
  - **`pages`**: globs of your own HTML pages, which `preview` serves
42
44
  - **`install`**: the folder `add` writes to, `items` by default. A skill installs to `skills` instead
43
45
  - **`skills`**: the folders an installed skill goes in, each relative to the collection, `[".agents/skills", ".claude/skills"]` by default. The first holds the skill's files, and each later one a link to them (§ *Skills*, under *add*)
44
46
  - **`dist`**: the folder `build` writes to, `dist` by default
47
+ - **`system`**: the system's own definition, which only the collection that authors `standard` holds (§ *The system*)
45
48
 
46
49
  `ca-ds init` writes one. A command that changes it rewrites it as two-space JSON.
47
50
 
51
+ ### The system
52
+
53
+ The collection that authors `standard` defines the system in `system`. No other collection sets it, since an installed set takes its foundation from the lock. Its fields:
54
+
55
+ - **`foundation`**: the items every component depends on without naming them, in load order. Required
56
+ - **`fixtures`**: the media collection whose members answer `/media/<slug>/<file>`
57
+ - **`release`**: the pinned set for a tag being cut, `{ "tag": "v0.2.0", "items": { "standard/button": "0.3.1" } }`. Without it no tag is pinned, and `pack --release` and `publish --release` take the tag from the command line
58
+
59
+ A collection with `system` also names three `presets`, `everything`, `foundation`, and `starter`, the sets a release builds as bundles. A preset leaves the foundation out, since every set starts with it.
60
+
61
+ ### The legacy files
62
+
63
+ `ca-ds` still reads a collection whose config is `collection.json`, and a system defined in a `system.json` beside it, and warns on each run. To move, rename `collection.json` to `ca-ds-config.json`. Then move `system.json`'s `foundation`, `fixtures`, and `release` under `system` and its `presets` to `presets`, and delete it. A folder that holds both config files reads `ca-ds-config.json` alone.
64
+
48
65
  ### collection.lock.json
49
66
 
50
67
  `collection.lock.json` records what resolved. `./src/schema/collection.lock.schema.json` owns its shape:
@@ -66,7 +83,7 @@ A collection is a folder of items with two root files. `ca-ds` finds it by walki
66
83
 
67
84
  - **`release`**: the release the items resolved against, or `null`
68
85
  - **`foundation`**: the items every build and validation loads first, in order. Absent, the collection has none
69
- - **`items`**: each installed item by scoped name, sorted by name. `requested` is true for an item `collection.json` asks for, and false for a dependency. `files` holds the SHA-256 of each file as installed, the baseline `diff` and `update` compare against. `path` is the item's folder, which for a skill sits in the first skills folder. `links`, on a skill alone, lists the links and copies the install made in the later skills folders
86
+ - **`items`**: each installed item by scoped name, sorted by name. `requested` is true for an item `ca-ds-config.json` asks for, and false for a dependency. `files` holds the SHA-256 of each file as installed, the baseline `diff` and `update` compare against. `path` is the item's folder, which for a skill sits in the first skills folder. `links`, on a skill alone, lists the links and copies the install made in the later skills folders
70
87
 
71
88
  A collection that installs nothing holds `{ "release": null, "items": {} }`.
72
89
 
@@ -83,14 +100,14 @@ An authored skill stays where you keep it. No command places it in the skills fo
83
100
 
84
101
  ### A bundle
85
102
 
86
- A bundle ZIP from the registry's `/bundles` page or `POST /api/bundles` is a collection. It unzips to `collection.json`, `collection.lock.json`, `items/<scope>/<name>/`, `dist/`, and a `README.md`, so every command runs in its folder.
103
+ A bundle ZIP from the registry's `/bundles` page or `POST /api/bundles` is a collection. It unzips to `ca-ds-config.json`, `collection.lock.json`, `items/<scope>/<name>/`, `dist/`, and a `README.md`, so every command runs in its folder.
87
104
 
88
105
  ## The registry and your token
89
106
 
90
107
  The commands that read the registry find it in this order:
91
108
 
92
109
  1. `CA_DS_URL`
93
- 2. `collection.json`'s `registry`
110
+ 2. `ca-ds-config.json`'s `registry`
94
111
  3. `https://v0.ds.innovation.ca.gov`
95
112
 
96
113
  They take a token in this order:
@@ -139,7 +156,7 @@ These commands run offline:
139
156
 
140
157
  | Command | Does |
141
158
  |---|---|
142
- | `init` | writes an empty `collection.json`, and with `--ci github` a workflow |
159
+ | `init` | writes an empty `ca-ds-config.json`, and with `--ci github` a workflow |
143
160
  | `new <kind> <scope>/<name>` | scaffolds an item folder that passes `validate` |
144
161
  | `add <name>[@range]...` | installs items and their dependencies |
145
162
  | `remove <name>...` | removes installed items, with `--prune` |
@@ -167,7 +184,7 @@ Every command takes `--json` and `--help`. An item argument names an item by its
167
184
  ca-ds init [--registry <url>] [--namespace <namespace> ...] [--ci github] [--branch <branch>]
168
185
  ```
169
186
 
170
- Writes `collection.json` in the working folder. Its `registry` is `--registry`, then `CA_DS_URL`, then the production host. Each `--namespace` adds one namespace the collection authors.
187
+ Writes `ca-ds-config.json` in the working folder. Its `registry` is `--registry`, then `CA_DS_URL`, then the production host. Each `--namespace` adds one namespace the collection authors.
171
188
 
172
189
  `--ci github` also writes `.github/workflows/ca-ds.yml`:
173
190
 
@@ -175,10 +192,10 @@ Writes `collection.json` in the working folder. Its `registry` is `--registry`,
175
192
  - on a push to `<branch>`, `ca-ds publish --summary` with the commit's subject, with the token from `CA_DS_TOKEN`
176
193
  - hourly on weekdays and by hand, `ca-ds pull`, committing what it writes straight to `<branch>`, which a protected branch refuses
177
194
 
178
- `--branch` names the branch, `main` by default. In a folder that already holds a `collection.json`, `--ci github` alone writes the workflow and keeps the file.
195
+ `--branch` names the branch, `main` by default. In a folder that already holds a `ca-ds-config.json`, `--ci github` alone writes the workflow and keeps the file.
179
196
 
180
197
  - **`--json`**: `{ collection, workflow }`, each a path, or `null` when it wasn't written
181
- - **Exit 3**: `collection.json` exists and `--ci` wasn't given alone, or the workflow file exists
198
+ - **Exit 3**: `ca-ds-config.json` exists and `--ci` wasn't given alone, or the workflow file exists
182
199
 
183
200
  ### new
184
201
 
@@ -198,7 +215,7 @@ Scaffolds an item folder that `validate` passes with zero rejections, its `item.
198
215
  Its answer and its refusals:
199
216
 
200
217
  - **`--json`**: `{ name, kind, dir, files }`, `files` the paths written inside `dir`
201
- - **Exit 2**: a scope `collection.json` doesn't author, a name the collection holds, a doc named `notes.md`, a folder that holds files, a skill name the frontmatter's rules refuse, or `--skill-name` with a kind other than `skill`
218
+ - **Exit 2**: a scope `ca-ds-config.json` doesn't author, a name the collection holds, a doc named `notes.md`, a folder that holds files, a skill name the frontmatter's rules refuse, or `--skill-name` with a kind other than `skill`
202
219
 
203
220
  ### add
204
221
 
@@ -208,11 +225,11 @@ ca-ds add <scope>/<name>[@<range>]... [--token <token>]
208
225
 
209
226
  Installs items and their dependencies, resolved through the registry's `POST /api/resolve`. Each item lands in `<install>/<scope>/<name>/` and in the lock. Each version comes from these rules:
210
227
 
211
- - with `collection.json`'s `release`, a `standard` item takes the release's pin
228
+ - with `ca-ds-config.json`'s `release`, a `standard` item takes the release's pin
212
229
  - any other item takes the highest version in its range, or its latest
213
230
  - an item already installed stays at its version. `update` moves it
214
231
 
215
- An item asked for joins `collection.json`'s `items`, with the range given, or with a caret range of its version, such as `^0.3.1`. A dependency is recorded as not asked for. The foundation installs with the first item. A skill installs as § *Skills* describes.
232
+ An item asked for joins `ca-ds-config.json`'s `items`, with the range given, or with a caret range of its version, such as `^0.3.1`. A dependency is recorded as not asked for. The foundation installs with the first item. A skill installs as § *Skills* describes.
216
233
 
217
234
  - **`--json`**: `{ release, added, requested, warnings }`, `added` as `[{ name, version, path, requested, links? }]`, `links` on a skill alone, `requested` as `[{ name, range, version }]`, and `warnings` as `[{ rule, name, message }]`
218
235
  - **Exit 1**: no live version satisfies a range, or a range misses the release's pin or the installed version
@@ -242,7 +259,7 @@ ca-ds remove <scope>/<name>... [--prune]
242
259
  ca-ds remove --prune
243
260
  ```
244
261
 
245
- Deletes installed items, their folders, and their lock entries, and drops them from `collection.json`'s `items`. A skill's recorded links and copies go too, even when its own folder was already deleted, and so does each folder they leave empty. `--prune` also deletes every dependency nothing asked for or authored still reaches. The foundation stays while anything else remains.
262
+ Deletes installed items, their folders, and their lock entries, and drops them from `ca-ds-config.json`'s `items`. A skill's recorded links and copies go too, even when its own folder was already deleted, and so does each folder they leave empty. `--prune` also deletes every dependency nothing asked for or authored still reaches. The foundation stays while anything else remains.
246
263
 
247
264
  - **`--json`**: `{ removed, warnings }`, `removed` as `[{ name, version, path, requested }]`, and `warnings` as `add`'s
248
265
  - **Exit 2**: a name that isn't installed, or a range
@@ -256,9 +273,9 @@ ca-ds update [<scope>/<name>...] [--dry-run] [--latest] [--token <token>]
256
273
 
257
274
  Moves installed items to newer versions. It merges each file three ways: the installed version is the base, your file is ours, and the new version is theirs. Where the items move:
258
275
 
259
- - **with `collection.json`'s `release`**: to the latest release, which `collection.json` then names. A `standard` item takes its pin. Names are refused, since a release moves the set together
276
+ - **with `ca-ds-config.json`'s `release`**: to the latest release, which `ca-ds-config.json` then names. A `standard` item takes its pin. Names are refused, since a release moves the set together
260
277
  - **with no release**: each item asked for to the highest version in its range, and each dependency to its latest
261
- - **with `--latest`**: every item to its latest version, and `collection.json` drops its `release`
278
+ - **with `--latest`**: every item to its latest version, and `ca-ds-config.json` drops its `release`
262
279
 
263
280
  With names, only the named items and their dependencies move. Under a release or `--latest`, a range the new version leaves becomes a caret range of the new version.
264
281
 
@@ -323,8 +340,8 @@ Turns an installed item into an authored one. `standard/card` becomes `<namespac
323
340
  - its manifest takes the new name, the version `0.1.0`, `forkedFrom: "standard/card@<version>"`, and a `source` naming its new folder
324
341
  - its folder moves to `<install>/<namespace>/card/`. A skill moves there too, out of the skills folders, and its links and copies go, since an authored skill is never placed in them
325
342
  - every dependency and related load of `standard/card` in the collection names the fork
326
- - it leaves the lock and `collection.json`'s `items`, so `update` never touches it again
327
- - `collection.json`'s `namespaces` gains the namespace
343
+ - it leaves the lock and `ca-ds-config.json`'s `items`, so `update` never touches it again
344
+ - `ca-ds-config.json`'s `namespaces` gains the namespace
328
345
 
329
346
  A collection that holds both the original and its fork fails `validate`.
330
347
 
@@ -346,7 +363,7 @@ Builds the collection into its `dist` folder:
346
363
  - `tokens.css`: the tokens alone
347
364
  - each file the CSS links, such as the fonts, at its path inside its item
348
365
 
349
- With no preset, it builds the `everything` preset when the collection defines one, and otherwise every item, the ones `collection.json` asks for first. `--preset` names a preset of `collection.json`, or else of `system.json`. A set with no tokens item builds with a warning. `build` doesn't clear the folder first.
366
+ With no preset, it builds the `everything` preset when the collection defines one, and otherwise every item, the ones `ca-ds-config.json` asks for first. `--preset` names a preset of `ca-ds-config.json`. A set with no tokens item builds with a warning. `build` doesn't clear the folder first.
350
367
 
351
368
  - **`--json`**: `{ dist, from, order, files, warnings }`. `dist` is the folder, `from` names the set, `order` is the load order, `files` lists every path written, and `warnings` is `[{ rule, message }]`
352
369
 
@@ -381,7 +398,7 @@ The run is offline first. Two checks need a `standard` item, and skip with a war
381
398
 
382
399
  The links check skips a link the same way when its target's item sits in a namespace the collection doesn't author and the collection lacks it, and its warning names the item in `needs`.
383
400
 
384
- When one skips and the collection names a registry, in `collection.json`'s `registry` or `CA_DS_URL`, the run goes online. It reads the registry's version for the handshake, fetches the latest copy of each missing item, and validates again. A link whose target's item the registry lacks too resolves to nothing then. A registry that refuses or doesn't answer within 20 seconds leaves the offline result, with a warning. `--offline` never reads the registry.
401
+ When one skips and the collection names a registry, in `ca-ds-config.json`'s `registry` or `CA_DS_URL`, the run goes online. It reads the registry's version for the handshake, fetches the latest copy of each missing item, and validates again. A link whose target's item the registry lacks too resolves to nothing then. A registry that refuses or doesn't answer within 20 seconds leaves the offline result, with a warning. `--offline` never reads the registry.
385
402
 
386
403
  When the collection names a registry, the run also reads the items the registry purged, through `GET /api/purges`, with the same timeout, before it validates. A page or a template that still links a purged media leaf, or still names it in `dependencies`, then warns `purged-media`, naming the leaf, as a publish's checks do. Without the read, once `pull` removes the leaf's folder, the link and the dependency each reject as ones to an item the registry never held. Remove the image and the dependency, then publish the page. A registry that refuses the read, or doesn't answer, skips it with a warning.
387
404
 
@@ -497,7 +514,7 @@ An item stops on any of these:
497
514
  A stopped item stops itself alone, and the run writes every other item. `--dry-run` reports the same and writes nothing.
498
515
 
499
516
  - **`--json`**: `{ registry, dryRun, current, items }`. `current` counts the current items, and `items` is `[{ name, from, to, versions, path, status, written, removed, files, reason? }]`, one for each item not current, sorted by name. `from` is `null` for an added item, `to` is `null` for a removed one, `versions` the registry's live versions past `from` up to `to`, or a removed item's purged versions, `path` the folder written, `written` the files whose bytes changed, `removed` the files deleted, and `files` each file a merge changed, as `{ path, outcome, conflicts?, reason?, keys? }`
500
- - **Exit 2**: a name, or a `collection.json` with no `namespaces`
517
+ - **Exit 2**: a name, or a `ca-ds-config.json` with no `namespaces`
501
518
  - **Exit 3**: a conflict or a stopped item
502
519
 
503
520
  ### login
@@ -556,7 +573,7 @@ Text output is for people, and `--json` is the contract. With `--json`:
556
573
  |---|---|---|
557
574
  | 0 | `ok` | the command did its work |
558
575
  | 1 | `rejected` | the collection fails a check, such as a validator rejection or a build its content breaks, and any failure no other code names |
559
- | 2 | `usage` | the command line is wrong, such as an unknown command or flag, a missing argument, or no `collection.json` at or above the folder |
576
+ | 2 | `usage` | the command line is wrong, such as an unknown command or flag, a missing argument, or no `ca-ds-config.json` at or above the folder |
560
577
  | 3 | `conflict` | a merge conflict, which leaves markers, or a hard stop, which leaves the files untouched |
561
578
  | 4 | `auth` | the registry refused the token, or there is none, or a browser sign-in was denied, failed its checks, or timed out |
562
579
  | 5 | `registry` | the registry can't be reached, answers with an error, or lacks an item asked for. A file whose hash doesn't match ends here too |
@@ -581,7 +598,7 @@ The previewer's routes:
581
598
  | `/` | the index: your pages first, then the templates, then every other item |
582
599
  | `/preview/item/<scope>/<name>/<file>` | an example or a check page in the preview shell |
583
600
  | `/frame/item/<scope>/<name>/<file>` | the same page's bare frame |
584
- | `/preview/page/<path>` and `/frame/page/<path>` | a page `collection.json`'s `pages` globs match |
601
+ | `/preview/page/<path>` and `/frame/page/<path>` | a page `ca-ds-config.json`'s `pages` globs match |
585
602
  | `/assets/tokens.css`, `/assets/bundle.css`, and `/assets/bundle.js` | the in-memory build, with source maps beside each |
586
603
  | `/media/<slug>/<file>` | a file of the media item in folder `<slug>` |
587
604
  | `/__preview__` | the previewer's identity: its name, collection, PID, port, and version |