@glasshome/widget-sdk 1.14.0 → 1.14.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.
- package/dist/index.js +1 -1
- package/dist/vite/index.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1479,7 +1479,7 @@ function or() {
|
|
|
1479
1479
|
//#region src/version.ts
|
|
1480
1480
|
var sr = {
|
|
1481
1481
|
name: "@glasshome/widget-sdk",
|
|
1482
|
-
version: "1.14.
|
|
1482
|
+
version: "1.14.1",
|
|
1483
1483
|
description: "SDK for building GlassHome dashboard widgets with SolidJS",
|
|
1484
1484
|
keywords: [
|
|
1485
1485
|
"glasshome",
|
package/dist/vite/index.js
CHANGED
|
@@ -247,9 +247,9 @@ async function j(e) {
|
|
|
247
247
|
let i = n.jsonSchema;
|
|
248
248
|
if (!i) return;
|
|
249
249
|
e.manifestPath && o(e.manifestPath) && A(e.manifestPath, n, i);
|
|
250
|
-
let a = T(i), s = n.manifest?.configVersion ?? null, l = n.manifest?.name ?? e.widgetName;
|
|
251
|
-
if (
|
|
252
|
-
let t =
|
|
250
|
+
let a = T(i), s = n.manifest?.configVersion ?? null, l = n.manifest?.name ?? e.widgetName, u = o(e.hashFile) ? c(e.hashFile, "utf-8") : null;
|
|
251
|
+
if (u !== null) {
|
|
252
|
+
let t = u.trim(), n = null;
|
|
253
253
|
if (t.startsWith("{")) try {
|
|
254
254
|
n = JSON.parse(t);
|
|
255
255
|
} catch {
|
|
@@ -259,10 +259,11 @@ async function j(e) {
|
|
|
259
259
|
if (n.hash !== a && n.configVersion === s) throw Error(`[widget-sdk] Config schema shape changed for "${l}" without a configVersion bump. Bump configVersion in defineWidget (currently ${s ?? "unset"}) or revert the schema change, then rebuild. Recorded in ${e.hashFile}`);
|
|
260
260
|
} else t !== a && console.warn(`[widget-sdk] Schema shape changed for "${l}" — verify configVersion was bumped`);
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
let d = `${JSON.stringify({
|
|
263
263
|
hash: a,
|
|
264
264
|
configVersion: s
|
|
265
|
-
})}\n
|
|
265
|
+
})}\n`;
|
|
266
|
+
d !== u && f(e.hashFile, d);
|
|
266
267
|
}
|
|
267
268
|
var ae = "virtual:glasshome-widget", M = "\0virtual:glasshome-widget", N = "/@glasshome/preview";
|
|
268
269
|
function P(e) {
|