pmcf 6.25.0 → 6.26.0
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 +1 -1
- package/src/initialization-context.mjs +1 -1
- package/src/services/bind.mjs +4 -16
- package/src/type.mjs +5 -3
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export class InitializationContext {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
instantiateAndAssign(object, attribute, value) {
|
|
51
|
-
if (attribute.type.primitive || attribute.
|
|
51
|
+
if (attribute.type.primitive || attribute.deferredExpression) {
|
|
52
52
|
return assign(attribute, object, value);
|
|
53
53
|
}
|
|
54
54
|
if (value !== undefined) {
|
package/src/services/bind.mjs
CHANGED
|
@@ -205,7 +205,7 @@ class bind_group extends Base {
|
|
|
205
205
|
...default_collection_attribute_writable,
|
|
206
206
|
type: NetworkAddress,
|
|
207
207
|
name: "entries",
|
|
208
|
-
|
|
208
|
+
deferredExpression: true
|
|
209
209
|
},
|
|
210
210
|
domains: {
|
|
211
211
|
...string_set_attribute,
|
|
@@ -245,10 +245,6 @@ class bind_group extends Base {
|
|
|
245
245
|
...boolean_attribute_writable_false,
|
|
246
246
|
name: "hasSVRRecords"
|
|
247
247
|
},
|
|
248
|
-
hasLinkLocalAdresses: {
|
|
249
|
-
...boolean_attribute_writable_false,
|
|
250
|
-
name: "hasLinkLocalAdresses"
|
|
251
|
-
},
|
|
252
248
|
hasLocationRecord: {
|
|
253
249
|
...boolean_attribute_writable_true,
|
|
254
250
|
name: "hasLocationRecord"
|
|
@@ -283,23 +279,14 @@ class bind_group extends Base {
|
|
|
283
279
|
notify = true;
|
|
284
280
|
hasCatalog = true;
|
|
285
281
|
hasSVRRecords = true;
|
|
286
|
-
hasLinkLocalAdresses = bind_group.attributes.hasLinkLocalAdresses.default;
|
|
287
282
|
recordTTL = "1W";
|
|
288
283
|
|
|
289
|
-
set entries(value) {
|
|
290
|
-
this._entries = value;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
get entries() {
|
|
294
|
-
return this._entries ? this.expression(this._entries) : [];
|
|
295
|
-
}
|
|
296
|
-
|
|
297
284
|
/**
|
|
298
285
|
* Type of the group.
|
|
299
286
|
* @return {string} view | unknown
|
|
300
287
|
*/
|
|
301
288
|
get type() {
|
|
302
|
-
if (this.sharedWith || this.
|
|
289
|
+
if (this.sharedWith || this.entries) {
|
|
303
290
|
return "view";
|
|
304
291
|
}
|
|
305
292
|
|
|
@@ -367,7 +354,8 @@ class bind_group extends Base {
|
|
|
367
354
|
}
|
|
368
355
|
|
|
369
356
|
get zones() {
|
|
370
|
-
const
|
|
357
|
+
const e = this.entries;
|
|
358
|
+
const entries = e === undefined ? [] : [...e];
|
|
371
359
|
|
|
372
360
|
if (!this._zones && entries.length > 0) {
|
|
373
361
|
this._zoneConfigs = new Map();
|
package/src/type.mjs
CHANGED
|
@@ -33,13 +33,15 @@ export function assign(attribute, object, value) {
|
|
|
33
33
|
value ??= attribute.default;
|
|
34
34
|
|
|
35
35
|
if (value !== undefined) {
|
|
36
|
-
// set
|
|
36
|
+
// set backpointer early so that parent properties can be found during load
|
|
37
37
|
if (attribute.backpointer) {
|
|
38
38
|
assign(attribute.backpointer, value, object);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (attribute.
|
|
42
|
-
object
|
|
41
|
+
if (attribute.deferredExpression) {
|
|
42
|
+
Object.defineProperty(object, attribute.name, {
|
|
43
|
+
get: () => object.expression(value)
|
|
44
|
+
});
|
|
43
45
|
return value;
|
|
44
46
|
}
|
|
45
47
|
|