pmcf 6.39.5 → 6.39.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.39.5",
3
+ "version": "6.39.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -31,6 +31,11 @@ export class base extends core {
31
31
  static key = "name";
32
32
  static priority = 0;
33
33
  static attributes = {
34
+ template: {
35
+ ...boolean_attribute_writable,
36
+ name: "template",
37
+ private: true
38
+ },
34
39
  owner: owner_attribute,
35
40
  name: name_attribute_writable,
36
41
  aliases: aliases_attribute,
@@ -39,11 +44,6 @@ export class base extends core {
39
44
  directory: { ...string_attribute_writable, name: "directory" },
40
45
  enabled: { ...boolean_attribute_writable, name: "enabled" },
41
46
  tags: { ...string_set_attribute_writable, name: "tags" },
42
- template: {
43
- ...boolean_attribute_writable,
44
- name: "template",
45
- private: true
46
- },
47
47
  content: { ...default_attribute_writable, type: "content", name: "content" }
48
48
  };
49
49
 
package/src/content.mjs CHANGED
@@ -42,7 +42,8 @@ export class content extends core {
42
42
  access: {
43
43
  ...string_attribute_writable,
44
44
  name: "access",
45
- default: "private"
45
+ default: "private",
46
+ packagingProperty: true
46
47
  },
47
48
  depends: {
48
49
  ...string_set_attribute_writable,
package/src/core.mjs CHANGED
@@ -317,8 +317,11 @@ export class core {
317
317
  });
318
318
  }
319
319
 
320
+ /**
321
+ * @return {boolean}
322
+ */
320
323
  get isTemplate() {
321
- return false;
324
+ return this.owner?.isTemplate || false;
322
325
  }
323
326
 
324
327
  get root() {
@@ -113,7 +113,7 @@ export class InitializationContext {
113
113
  attribute => attribute.writable
114
114
  )) {
115
115
  const name = path.join(".");
116
- const value = object.expand(data[name]);
116
+ const value = object.isTemplate ? data[name] : object.expand(data[name]);
117
117
 
118
118
  if (attribute.collection) {
119
119
  if (typeof value === "object") {