@uniflowed/config 0.0.0-alpha.18 → 0.0.0-alpha.20

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 (2) hide show
  1. package/internal/schema.js +34 -2
  2. package/package.json +3 -2
@@ -74,7 +74,17 @@ export type PackageManagerPreference =
74
74
  | "bun";
75
75
  // uf-lint-enable uniflowed/no-npm-script-invocation
76
76
 
77
- export type RuntimeEngine = "uf" | "node" | "deno" | "bun" | "edge" | "serverless" | "container";
77
+ // The runtimes a project may say it is written for, which are the runtimes uf
78
+ // has a host for. It read `"uf" | ... | "edge" | "serverless" | "container"`,
79
+ // and those four are rows `uf_runtime::HOSTS` grades planned with no Flow
80
+ // loader — so a project that named one could not import its own first file
81
+ // there, and every command went on running on Node anyway. uf refuses them at
82
+ // the key that named them now; this type is where a reader finds that out
83
+ // before `uf check` does. See docs/hosts.md and ubugeeei-prod/uf#246.
84
+ //
85
+ // A deployment target is `DeployAdapter`, on `app.runtime.deploy`, and is a
86
+ // different question with a longer list.
87
+ export type RuntimeEngine = "node" | "deno" | "bun";
78
88
 
79
89
  export type DeployAdapter =
80
90
  | "node"
@@ -359,12 +369,34 @@ export type UniflowedConfig = {
359
369
  readonly enabled?: boolean,
360
370
  },
361
371
  readonly rendering?: {
362
- readonly modes?: $ReadOnlyArray<"ppr" | "ssr" | "ssg" | "isr">,
372
+ // `"csr"` is the one value that cannot share the list: it renders every
373
+ // route in the browser from one shell, where the others write a document
374
+ // per route, so there is no per-route choice left for the list to hold.
375
+ // `["csr"]` is a single-page application; see docs/app/guide/rendering.
376
+ readonly modes?: $ReadOnlyArray<"ppr" | "ssr" | "ssg" | "isr" | "csr">,
377
+ // What the browser does when a visitor follows a link, which is a
378
+ // different question from `modes` rather than a fifth value in it:
379
+ // `modes` says where a document comes from, per route, and this says
380
+ // what happens once the browser has one. `"document"` is a full document
381
+ // request — the client router is not installed and `Link` renders an
382
+ // ordinary anchor. See docs/app/guide/routing/navigation.
383
+ readonly navigation?: "client" | "document",
363
384
  readonly cache?: {
364
385
  readonly actions?: boolean,
365
386
  readonly data?: boolean,
366
387
  readonly fetch?: boolean,
367
388
  readonly route?: boolean,
389
+ // Where cache entries live, and the only thing here that is a *name*
390
+ // rather than a switch: `"memory"` (the default) is one process,
391
+ // `"filesystem"` is uf's built-in durable provider, and anything else
392
+ // is a module specifier exporting `createCacheProvider` — the same
393
+ // shape `builder.module` has, and for the same red line. Turning this
394
+ // on caches nothing new: a route still has to state a lifetime.
395
+ readonly store?: string,
396
+ // Where `"filesystem"` keeps them. Defaults to `.uf/cache/route` under
397
+ // the project. A deployment that has one writable directory — `/tmp` on
398
+ // a Lambda, a mounted volume in a container — names it here.
399
+ readonly storeDir?: string,
368
400
  },
369
401
  },
370
402
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/config",
3
- "version": "0.0.0-alpha.18",
3
+ "version": "0.0.0-alpha.20",
4
4
  "description": "Flow declarations for @uniflowed/config, part of the Unified Toolchain for Flow.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "files": [
17
17
  "index.js",
18
- "internal"
18
+ "internal",
19
+ "!*.test.js"
19
20
  ]
20
21
  }