spice-js 2.7.5 → 2.7.7
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.
|
@@ -244,6 +244,16 @@ class SpiceModel {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
get props() {
|
|
247
|
+
// Dynamically look up schema from spice.schemas for zero-downtime updates
|
|
248
|
+
// Fall back to stored props for backward compatibility
|
|
249
|
+
if (this.type && typeof spice !== 'undefined' && spice.schemas) {
|
|
250
|
+
var dynamicSchema = spice.schemas[this.type] || spice.schemas[this.type.toLowerCase()];
|
|
251
|
+
|
|
252
|
+
if (dynamicSchema) {
|
|
253
|
+
return dynamicSchema;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
247
257
|
return this[_props];
|
|
248
258
|
}
|
|
249
259
|
|
package/package.json
CHANGED
package/src/models/SpiceModel.js
CHANGED
|
@@ -229,6 +229,14 @@ export default class SpiceModel {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
get props() {
|
|
232
|
+
// Dynamically look up schema from spice.schemas for zero-downtime updates
|
|
233
|
+
// Fall back to stored props for backward compatibility
|
|
234
|
+
if (this.type && typeof spice !== 'undefined' && spice.schemas) {
|
|
235
|
+
const dynamicSchema = spice.schemas[this.type] || spice.schemas[this.type.toLowerCase()];
|
|
236
|
+
if (dynamicSchema) {
|
|
237
|
+
return dynamicSchema;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
232
240
|
return this[_props];
|
|
233
241
|
}
|
|
234
242
|
|