@uniweb/build 1.20.0 → 1.20.1

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/package.json +7 -7
  2. package/src/uwx/records.js +15 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -57,11 +57,11 @@
57
57
  "sharp": "^0.35.5",
58
58
  "yaml": "^2.5.0",
59
59
  "@uniweb/content-reader": "~1.5.9",
60
- "@uniweb/schemas": "~1.7.0",
61
- "@uniweb/semantic-parser": "~1.13.2",
62
- "@uniweb/content-writer": "~1.3.1",
60
+ "@uniweb/projections": "~1.2.13",
63
61
  "@uniweb/theming": "~1.3.2",
64
- "@uniweb/projections": "~1.2.13"
62
+ "@uniweb/semantic-parser": "~1.13.2",
63
+ "@uniweb/schemas": "~1.7.0",
64
+ "@uniweb/content-writer": "~1.3.1"
65
65
  },
66
66
  "optionalDependencies": {
67
67
  "@uniweb/runtime": "~1.5.4"
@@ -73,8 +73,8 @@
73
73
  "@tailwindcss/vite": "^4.0.0",
74
74
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
75
75
  "vite-plugin-svgr": "^4.0.0",
76
- "@uniweb/core": "~1.6.9",
77
- "@uniweb/runtime": "~1.5.4"
76
+ "@uniweb/runtime": "~1.5.4",
77
+ "@uniweb/core": "~1.6.9"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "vite": {
@@ -1010,16 +1010,26 @@ export async function buildRecordEntities(siteRoot, opts = {}) {
1010
1010
  // resolves as `@person/2024` — the rule is total, so it is not ambiguous — but an
1011
1011
  // author who meant "records organised by year inside the `person` schema" needs to
1012
1012
  // be told what the build actually read, not only that something failed to resolve.
1013
+ //
1014
+ // ⛔ A resolver that never asks the backend says so (`resolveModel.offline`, set by the
1015
+ // CLI for `-o`, `--dry-run` and `status`), and then the message must not say the backend
1016
+ // has no such Model: it was never asked. Until 2026-11-09 it did, so an offline run that
1017
+ // could not resolve a Model (a query naming a type the site's foundation does not declare,
1018
+ // or `status` in a clone whose kept Models were deleted) said the backend had none.
1013
1019
  const unresolvedExplicit = (modelName, queryName) => {
1014
1020
  const dirs = poolDirsForSchema(modelName)
1015
1021
  const { alternative } = dirs ? poolPathReadings(dirs) : { alternative: null }
1016
1022
  return new Error(
1017
1023
  `uwx/records: Model "${modelName}" (query "${queryName}") could not be ` +
1018
- 'resolved — not defined by a local foundation' +
1019
- (resolveModel
1020
- ? ', and the backend has no such Model (register it first).'
1021
- : '. Run via `uniweb sync` (which fetches non-local Models from the ' +
1022
- 'registry), or provide a local foundation that defines it.') +
1024
+ "resolved — the site's foundation does not define it" +
1025
+ (resolveModel?.offline === true
1026
+ ? '. This run does not ask the backend: `-o`, `--dry-run` and `status` know only ' +
1027
+ 'the Models a push or a pull of this copy read. A push reads it from the backend, ' +
1028
+ 'and stops if the backend has none.'
1029
+ : resolveModel
1030
+ ? ', and the backend has no such Model (register the foundation that defines it first).'
1031
+ : '. Run via `uniweb sync` (which fetches non-local Models from the ' +
1032
+ 'registry), or provide a local foundation that defines it.') +
1023
1033
  (alternative
1024
1034
  ? ` If you meant \`${pool.dir}/${dirs[0]}/\` (${alternative}) organised by ` +
1025
1035
  `\`${dirs[1]}\`, note that a folder inside a schema folder is read as an ` +