@uniweb/build 1.20.8 → 1.20.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "1.20.8",
3
+ "version": "1.20.10",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -58,14 +58,14 @@
58
58
  "sharp": "^0.35.5",
59
59
  "yaml": "^2.5.0",
60
60
  "@uniweb/content-reader": "~1.5.9",
61
- "@uniweb/content-writer": "~1.3.1",
62
- "@uniweb/theming": "~1.3.2",
63
61
  "@uniweb/projections": "~1.2.16",
64
62
  "@uniweb/schemas": "~1.7.1",
65
- "@uniweb/semantic-parser": "~1.13.2"
63
+ "@uniweb/semantic-parser": "~1.13.3",
64
+ "@uniweb/content-writer": "~1.3.1",
65
+ "@uniweb/theming": "~1.3.2"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@uniweb/runtime": "~1.5.6"
68
+ "@uniweb/runtime": "~1.5.9"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -74,8 +74,8 @@
74
74
  "@tailwindcss/vite": "^4.0.0",
75
75
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
76
76
  "vite-plugin-svgr": "^4.0.0",
77
- "@uniweb/runtime": "~1.5.6",
78
- "@uniweb/core": "~1.6.11"
77
+ "@uniweb/core": "~1.6.12",
78
+ "@uniweb/runtime": "~1.5.9"
79
79
  },
80
80
  "peerDependenciesMeta": {
81
81
  "vite": {
@@ -92,6 +92,20 @@ export function blueprintForWire(blueprint, scope) {
92
92
  return out
93
93
  }
94
94
 
95
+ /**
96
+ * Whether two blueprints, each as a `backend` row holds it (`blueprintForWire`), say the same: keys in
97
+ * any order, lists in theirs. `undefined` and `null` are no blueprint, the same as each other and
98
+ * never the same as one. A pull asks it before it writes the file (`writePulledBlueprint`), and the
99
+ * CLI before it says that a change reaches no backend already started from the site.
100
+ *
101
+ * @param {object|null|undefined} a
102
+ * @param {object|null|undefined} b
103
+ * @returns {boolean}
104
+ */
105
+ export function sameBlueprint(a, b) {
106
+ return stable(a) === stable(b)
107
+ }
108
+
95
109
  /** A map of types with each key in full. ⛔ Two keys for one type cannot both go: refused by name. */
96
110
  function qualifiedTypes(key, map, scope) {
97
111
  const out = {}
@@ -210,7 +224,7 @@ export function writePulledBlueprint({ siteRoot, rows, scope = null, own = null
210
224
  /** Whether the file, as a push would send it, is what the row holds. */
211
225
  function saysTheSame(local, wire, scope) {
212
226
  try {
213
- return stable(blueprintForWire(local, scope)) === stable(wire)
227
+ return sameBlueprint(blueprintForWire(local, scope), wire)
214
228
  } catch {
215
229
  return false
216
230
  }
package/src/uwx/index.js CHANGED
@@ -151,6 +151,11 @@ export {
151
151
  blueprintWarnings,
152
152
  siteBlueprintWarnings,
153
153
  siteDeclaredTypes,
154
+ // What a push sends and a site holds, compared as a pull compares them: the CLI says from these
155
+ // when a changed file reaches no backend already started from the site.
156
+ blueprintForWire,
157
+ liftBlueprint,
158
+ sameBlueprint,
154
159
  } from './blueprint.js'
155
160
  export {
156
161
  diffSiteUnits,
@@ -47,8 +47,10 @@ const VERSION = 1
47
47
  * uuid too, each entry the data schema the backend holds it as, written whole from each folder the
48
48
  * backend hands back (`setBackendMap`), so it names what the folder places. `retired` is the same
49
49
  * shape: the records a push took out of the folder, which the backend keeps until they are deleted.
50
+ * `deleting` too: retired records this copy chose to delete that the backend kept, because another
51
+ * site's folder still placed them; a later push deletes them once none does (`retired-records.js`).
50
52
  */
51
- const MAP_SECTIONS = new Set(['records', 'items', 'queries', 'folders', 'assets', 'recordItems', 'files', 'types', 'retired'])
53
+ const MAP_SECTIONS = new Set(['records', 'items', 'queries', 'folders', 'assets', 'recordItems', 'files', 'types', 'retired', 'deleting'])
52
54
 
53
55
  const storePath = (siteDir) => join(siteDir, SYNC_STORE_FILE)
54
56