@uniweb/build 1.20.9 → 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.9",
3
+ "version": "1.20.10",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -57,15 +57,15 @@
57
57
  "js-yaml": "^4.3.2",
58
58
  "sharp": "^0.35.5",
59
59
  "yaml": "^2.5.0",
60
- "@uniweb/content-writer": "~1.3.1",
61
- "@uniweb/schemas": "~1.7.1",
62
60
  "@uniweb/content-reader": "~1.5.9",
63
- "@uniweb/semantic-parser": "~1.13.2",
64
- "@uniweb/theming": "~1.3.2",
65
- "@uniweb/projections": "~1.2.16"
61
+ "@uniweb/projections": "~1.2.16",
62
+ "@uniweb/schemas": "~1.7.1",
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.8"
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.8",
78
- "@uniweb/core": "~1.6.12"
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,