pmcf 4.25.19 → 4.25.20

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": "4.25.19",
3
+ "version": "4.25.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,11 +54,11 @@
54
54
  "content-entry-transform": "^1.6.9",
55
55
  "ip-utilties": "^3.0.4",
56
56
  "npm-pkgbuild": "^20.7.2",
57
- "pacc": "^9.2.13",
57
+ "pacc": "^9.2.14",
58
58
  "package-directory": "^8.2.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/node": "^25.9.2",
61
+ "@types/node": "^25.9.3",
62
62
  "ava": "^8.0.1",
63
63
  "c8": "^11.0.0",
64
64
  "documentation": "^14.0.3",
@@ -146,7 +146,7 @@ export class InitializationContext {
146
146
  this.assign(object, name, attribute, o);
147
147
  } else {
148
148
  if (attribute.type.constructWithIdentifierOnly) {
149
- o = new attribute.type.clazz(
149
+ o = new attribute.type(
150
150
  object.ownerFor(attribute, value),
151
151
  value
152
152
  );
@@ -161,7 +161,7 @@ export class InitializationContext {
161
161
  break;
162
162
 
163
163
  case "object":
164
- if (attribute.type.clazz && value instanceof attribute.type.clazz) {
164
+ if (attribute.type && value instanceof attribute.type) {
165
165
  this.assign(object, name, attribute, value);
166
166
  } else {
167
167
  this.assign(
@@ -180,7 +180,7 @@ export class InitializationContext {
180
180
  }
181
181
 
182
182
  typeFactory(type, owner, data) {
183
- const factory = type.factoryFor?.(owner, data) || type.clazz;
183
+ const factory = type.factoryFor?.(owner, data) || type;
184
184
  const object = new factory(owner);
185
185
 
186
186
  this.read(object, data);
@@ -244,7 +244,7 @@ export class InitializationContext {
244
244
  async loadType(name, type) {
245
245
  const data = JSON.parse(
246
246
  await readFile(
247
- join(this.directory, name, type.clazz.typeFileName),
247
+ join(this.directory, name, type.typeFileName),
248
248
  "utf8"
249
249
  )
250
250
  );
@@ -262,7 +262,7 @@ export class InitializationContext {
262
262
  //console.log("LOAD", [name, owner.fullName, data.name]);
263
263
 
264
264
  const object = this.typeFactory(type, owner, data);
265
- this.root.addTypeObject(type.clazz.typeName, name, object);
265
+ this.root.addTypeObject(type.typeName, name, object);
266
266
 
267
267
  return object;
268
268
  }
@@ -279,7 +279,7 @@ export class InitializationContext {
279
279
  return this.loadType(name, options.type);
280
280
  } else {
281
281
  for (const type of Object.values(types).filter(
282
- type => type?.clazz?.typeFileName
282
+ type => type?.typeFileName
283
283
  )) {
284
284
  try {
285
285
  return await this.loadType(name, type);
@@ -295,9 +295,8 @@ export class InitializationContext {
295
295
  for (const type of Object.values(types).sort(
296
296
  (a, b) => b.priority - a.priority
297
297
  )) {
298
- //console.log("LIST","**/" + type.clazz.typeFileName);
299
- if (type.clazz?.typeFileName) {
300
- for await (const name of glob("**/" + type.clazz.typeFileName, {
298
+ if (type.typeFileName) {
299
+ for await (const name of glob("**/" + type.typeFileName, {
301
300
  cwd: this.directory
302
301
  })) {
303
302
  if (type === this.root.constructor) {
@@ -22,21 +22,21 @@ export class NetworkInterface extends SkeletonNetworkInterface {
22
22
  static extends = Base;
23
23
  static specializations = {};
24
24
  static factoryFor(owner, value) {
25
- let t = this.specializations[value.kind];
25
+ let st = this.specializations[value.kind];
26
26
 
27
27
  //console.log("factoryFor", owner, value);
28
- if (!t) {
29
- for (t of Object.values(this.specializations)) {
30
- if (t.clazz.isCommonName && t.clazz.isCommonName(value.name)) {
28
+ if (!st) {
29
+ for (st of Object.values(this.specializations)) {
30
+ if (st.isCommonName && st.isCommonName(value.name)) {
31
31
  break;
32
32
  }
33
33
  }
34
34
  }
35
35
 
36
- if (t) {
36
+ if (st) {
37
37
  delete value.type;
38
38
  delete value.kind;
39
- return t.clazz;
39
+ return st;
40
40
  }
41
41
 
42
42
  return this;
package/src/service.mjs CHANGED
@@ -56,11 +56,11 @@ export class Service extends Base {
56
56
  static specializations = {};
57
57
  static factoryFor(owner, value) {
58
58
  const type = value.type ?? value.name;
59
- const t = this.specializations[type];
59
+ const st = this.specializations[type];
60
60
 
61
- if (t) {
61
+ if (st) {
62
62
  delete value.type;
63
- return t.clazz;
63
+ return st;
64
64
  }
65
65
 
66
66
  return Service;