pmcf 1.48.2 → 1.50.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.48.2",
3
+ "version": "1.50.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -240,10 +240,26 @@ export class Base {
240
240
  return this.owner?.network;
241
241
  }
242
242
 
243
+ get domain() {
244
+ return this.owner?.domain;
245
+ }
246
+
243
247
  get administratorEmail() {
244
248
  return this.owner?.administratorEmail;
245
249
  }
246
250
 
251
+ get locales() {
252
+ return this.owner?.locales;
253
+ }
254
+
255
+ get country() {
256
+ return this.owner?.country;
257
+ }
258
+
259
+ get timezone() {
260
+ return this.owner?.timezone;
261
+ }
262
+
247
263
  #directory;
248
264
  set directory(directory) {
249
265
  this.#directory = directory;
package/src/owner.mjs CHANGED
@@ -20,7 +20,10 @@ const OwnerTypeDefinition = {
20
20
  writeable: true
21
21
  },
22
22
  ntp: { type: "string", collection: false, writeable: true },
23
+ country: { type: "string", collection: false, writeable: true },
23
24
  domain: { type: "string", collection: false, writeable: true },
25
+ timezone: { type: "string", collection: false, writeable: true },
26
+ locales: { type: "string", collection: true, writeable: true },
24
27
  administratorEmail: { type: "string", collection: false, writeable: true }
25
28
  }
26
29
  };
@@ -30,8 +33,6 @@ const EMPTY = new Map();
30
33
  export class Owner extends Base {
31
34
  #membersByType = new Map();
32
35
  #bridges = new Set();
33
- #administratorEmail;
34
- domain;
35
36
  ntp;
36
37
 
37
38
  static {
@@ -272,6 +273,45 @@ export class Owner extends Base {
272
273
  }
273
274
  }
274
275
 
276
+ #country;
277
+
278
+ set country(value) {
279
+ this.#country = value;
280
+ }
281
+
282
+ get country() {
283
+ return this.#country || this.owner?.country;
284
+ }
285
+
286
+ #locales = new Set();
287
+
288
+ set locales(value) {
289
+ if (value instanceof Set) {
290
+ this.#locales = this.#locales.union(value);
291
+ } else {
292
+ this.#locales.add(value);
293
+ }
294
+ }
295
+
296
+ get locales() {
297
+ if(this.owner) {
298
+ return this.owner.locales.union(this.#locales);
299
+ }
300
+ return this.#locales;
301
+ }
302
+
303
+ #timezone;
304
+
305
+ set timezone(value) {
306
+ this.#timezone = value;
307
+ }
308
+
309
+ get timezone() {
310
+ return this.#timezone || this.owner?.timezone;
311
+ }
312
+
313
+ #administratorEmail;
314
+
275
315
  set administratorEmail(value) {
276
316
  this.#administratorEmail = value;
277
317
  }
@@ -285,9 +325,20 @@ export class Owner extends Base {
285
325
  return this.owner.administratorEmail;
286
326
  }
287
327
 
328
+ //console.log("administratorEmail", this.domain, this.toString());
288
329
  return "admin@" + this.domain;
289
330
  }
290
331
 
332
+ #domain;
333
+
334
+ set domain(value) {
335
+ this.#domain = value;
336
+ }
337
+
338
+ get domain() {
339
+ return this.#domain || this.owner?.domain;
340
+ }
341
+
291
342
  *domains() {
292
343
  for (const location of this.locations()) {
293
344
  yield location.domain;
package/types/base.d.mts CHANGED
@@ -51,7 +51,11 @@ export class Base {
51
51
  get location(): any;
52
52
  get host(): any;
53
53
  get network(): any;
54
+ get domain(): any;
54
55
  get administratorEmail(): any;
56
+ get locales(): any;
57
+ get country(): any;
58
+ get timezone(): any;
55
59
  set directory(directory: any);
56
60
  get directory(): any;
57
61
  get fullName(): any;
@@ -127,11 +127,26 @@ export class Cluster extends Owner {
127
127
  collection: boolean;
128
128
  writeable: boolean;
129
129
  };
130
+ country: {
131
+ type: string;
132
+ collection: boolean;
133
+ writeable: boolean;
134
+ };
130
135
  domain: {
131
136
  type: string;
132
137
  collection: boolean;
133
138
  writeable: boolean;
134
139
  };
140
+ timezone: {
141
+ type: string;
142
+ collection: boolean;
143
+ writeable: boolean;
144
+ };
145
+ locales: {
146
+ type: string;
147
+ collection: boolean;
148
+ writeable: boolean;
149
+ };
135
150
  administratorEmail: {
136
151
  type: string;
137
152
  collection: boolean;
@@ -266,11 +281,26 @@ export class Cluster extends Owner {
266
281
  collection: boolean;
267
282
  writeable: boolean;
268
283
  };
284
+ country: {
285
+ type: string;
286
+ collection: boolean;
287
+ writeable: boolean;
288
+ };
269
289
  domain: {
270
290
  type: string;
271
291
  collection: boolean;
272
292
  writeable: boolean;
273
293
  };
294
+ timezone: {
295
+ type: string;
296
+ collection: boolean;
297
+ writeable: boolean;
298
+ };
299
+ locales: {
300
+ type: string;
301
+ collection: boolean;
302
+ writeable: boolean;
303
+ };
274
304
  administratorEmail: {
275
305
  type: string;
276
306
  collection: boolean;
package/types/host.d.mts CHANGED
@@ -165,7 +165,6 @@ export class Host extends Base {
165
165
  get os(): any;
166
166
  set distribution(value: any);
167
167
  get distribution(): any;
168
- get domain(): any;
169
168
  get modelName(): any;
170
169
  get hostName(): string;
171
170
  get domainName(): string;
@@ -127,11 +127,26 @@ export class Location extends Owner {
127
127
  collection: boolean;
128
128
  writeable: boolean;
129
129
  };
130
+ country: {
131
+ type: string;
132
+ collection: boolean;
133
+ writeable: boolean;
134
+ };
130
135
  domain: {
131
136
  type: string;
132
137
  collection: boolean;
133
138
  writeable: boolean;
134
139
  };
140
+ timezone: {
141
+ type: string;
142
+ collection: boolean;
143
+ writeable: boolean;
144
+ };
145
+ locales: {
146
+ type: string;
147
+ collection: boolean;
148
+ writeable: boolean;
149
+ };
135
150
  administratorEmail: {
136
151
  type: string;
137
152
  collection: boolean;
@@ -266,11 +281,26 @@ export class Location extends Owner {
266
281
  collection: boolean;
267
282
  writeable: boolean;
268
283
  };
284
+ country: {
285
+ type: string;
286
+ collection: boolean;
287
+ writeable: boolean;
288
+ };
269
289
  domain: {
270
290
  type: string;
271
291
  collection: boolean;
272
292
  writeable: boolean;
273
293
  };
294
+ timezone: {
295
+ type: string;
296
+ collection: boolean;
297
+ writeable: boolean;
298
+ };
299
+ locales: {
300
+ type: string;
301
+ collection: boolean;
302
+ writeable: boolean;
303
+ };
274
304
  administratorEmail: {
275
305
  type: string;
276
306
  collection: boolean;
@@ -129,11 +129,26 @@ export class Network extends Owner {
129
129
  collection: boolean;
130
130
  writeable: boolean;
131
131
  };
132
+ country: {
133
+ type: string;
134
+ collection: boolean;
135
+ writeable: boolean;
136
+ };
132
137
  domain: {
133
138
  type: string;
134
139
  collection: boolean;
135
140
  writeable: boolean;
136
141
  };
142
+ timezone: {
143
+ type: string;
144
+ collection: boolean;
145
+ writeable: boolean;
146
+ };
147
+ locales: {
148
+ type: string;
149
+ collection: boolean;
150
+ writeable: boolean;
151
+ };
137
152
  administratorEmail: {
138
153
  type: string;
139
154
  collection: boolean;
package/types/owner.d.mts CHANGED
@@ -125,11 +125,26 @@ export class Owner extends Base {
125
125
  collection: boolean;
126
126
  writeable: boolean;
127
127
  };
128
+ country: {
129
+ type: string;
130
+ collection: boolean;
131
+ writeable: boolean;
132
+ };
128
133
  domain: {
129
134
  type: string;
130
135
  collection: boolean;
131
136
  writeable: boolean;
132
137
  };
138
+ timezone: {
139
+ type: string;
140
+ collection: boolean;
141
+ writeable: boolean;
142
+ };
143
+ locales: {
144
+ type: string;
145
+ collection: boolean;
146
+ writeable: boolean;
147
+ };
133
148
  administratorEmail: {
134
149
  type: string;
135
150
  collection: boolean;
@@ -137,7 +152,6 @@ export class Owner extends Base {
137
152
  };
138
153
  };
139
154
  };
140
- domain: any;
141
155
  ntp: any;
142
156
  _traverse(...args: any[]): boolean;
143
157
  named(name: any): any;
@@ -162,8 +176,16 @@ export class Owner extends Base {
162
176
  addBridge(network: any, destinationNetworks: any): any;
163
177
  _resolveBridges(): void;
164
178
  networkAddresses(): Generator<any, void, any>;
179
+ set country(value: any);
180
+ get country(): any;
181
+ set locales(value: any);
182
+ get locales(): any;
183
+ set timezone(value: any);
184
+ get timezone(): any;
165
185
  set administratorEmail(value: any);
166
186
  get administratorEmail(): any;
187
+ set domain(value: any);
188
+ get domain(): any;
167
189
  domains(): Generator<any, void, unknown>;
168
190
  #private;
169
191
  }
package/types/root.d.mts CHANGED
@@ -131,11 +131,26 @@ export class Root extends Location {
131
131
  collection: boolean;
132
132
  writeable: boolean;
133
133
  };
134
+ country: {
135
+ type: string;
136
+ collection: boolean;
137
+ writeable: boolean;
138
+ };
134
139
  domain: {
135
140
  type: string;
136
141
  collection: boolean;
137
142
  writeable: boolean;
138
143
  };
144
+ timezone: {
145
+ type: string;
146
+ collection: boolean;
147
+ writeable: boolean;
148
+ };
149
+ locales: {
150
+ type: string;
151
+ collection: boolean;
152
+ writeable: boolean;
153
+ };
139
154
  administratorEmail: {
140
155
  type: string;
141
156
  collection: boolean;
@@ -270,11 +285,26 @@ export class Root extends Location {
270
285
  collection: boolean;
271
286
  writeable: boolean;
272
287
  };
288
+ country: {
289
+ type: string;
290
+ collection: boolean;
291
+ writeable: boolean;
292
+ };
273
293
  domain: {
274
294
  type: string;
275
295
  collection: boolean;
276
296
  writeable: boolean;
277
297
  };
298
+ timezone: {
299
+ type: string;
300
+ collection: boolean;
301
+ writeable: boolean;
302
+ };
303
+ locales: {
304
+ type: string;
305
+ collection: boolean;
306
+ writeable: boolean;
307
+ };
278
308
  administratorEmail: {
279
309
  type: string;
280
310
  collection: boolean;