pmcf 6.66.3 → 6.66.4

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.66.3",
3
+ "version": "6.66.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -242,7 +242,9 @@ export class base extends core {
242
242
  if (!this._content) {
243
243
  for (const e of this.walkDirections(["extends"])) {
244
244
  if (e._content) {
245
+ const dir = e._content.directory;
245
246
  this._content = e._content.forOwner(this);
247
+ this._content.directory = dir;
246
248
  break;
247
249
  }
248
250
  }
package/src/content.mjs CHANGED
@@ -151,6 +151,14 @@ export class content extends core {
151
151
  this._description = value;
152
152
  }
153
153
 
154
+ set directory(directory) {
155
+ this._directory = directory;
156
+ }
157
+
158
+ get directory() {
159
+ return this._directory ?? this.owner.directory;
160
+ }
161
+
154
162
  /**
155
163
  * @return {string}
156
164
  */
@@ -270,10 +278,9 @@ export class content extends core {
270
278
  * @param {object} packageData
271
279
  */
272
280
  async loadHooks(packageData) {
273
- for (const node of this.walkDirections(["this", "extends"])) {
274
- for (const hook of node._hooks) {
275
- console.log("load hook",node.fullName,node.directory,node.owner.directory);
276
- await loadHooks(packageData, join(node.owner.directory, hook));
281
+ for (const content of this.walkDirections(["this", "extends"])) {
282
+ for (const hook of content._hooks) {
283
+ await loadHooks(packageData, join(content.directory, hook));
277
284
  }
278
285
  }
279
286
  }