pmcf 1.82.0 → 1.83.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.82.0",
3
+ "version": "1.83.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,7 +38,7 @@
38
38
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
39
39
  },
40
40
  "dependencies": {
41
- "npm-pkgbuild": "^17.4.0",
41
+ "npm-pkgbuild": "^17.5.1",
42
42
  "pacc": "^3.3.0",
43
43
  "pkg-dir": "^8.0.0"
44
44
  },
package/src/dns.mjs CHANGED
@@ -168,11 +168,19 @@ export class DNSService extends Base {
168
168
  };
169
169
 
170
170
  result.sources = [
171
- new FileContentProvider(p2 + "/", {
172
- mode: 0o644,
173
- owner: "named",
174
- group: "named"
175
- })[Symbol.asyncIterator]()
171
+ new FileContentProvider(
172
+ p2 + "/",
173
+ {
174
+ mode: 0o644,
175
+ owner: "named",
176
+ group: "named"
177
+ },
178
+ {
179
+ mode: 0o755,
180
+ owner: "named",
181
+ group: "named"
182
+ }
183
+ )[Symbol.asyncIterator]()
176
184
  ];
177
185
 
178
186
  await generateZoneDefs(this, p2);
package/src/host.mjs CHANGED
@@ -47,6 +47,7 @@ const HostTypeDefinition = {
47
47
  serial: { type: "string", collection: false, writeable: true },
48
48
  vendor: { type: "string", collection: false, writeable: true },
49
49
  chassis: { type: "string", collection: false, writeable: true },
50
+ architecture: { type: "string", collection: false, writeable: true },
50
51
  priority: { type: "number", collection: false, writeable: true },
51
52
  replaces: { type: "string", collection: true, writeable: true },
52
53
  depends: { type: "string", collection: true, writeable: true },
@@ -73,6 +74,7 @@ export class Host extends Base {
73
74
  #deployment;
74
75
  #chassis;
75
76
  #vendor;
77
+ #architecture;
76
78
 
77
79
  static {
78
80
  addType(this);
@@ -149,6 +151,14 @@ export class Host extends Base {
149
151
  return this.#vendor || this.extends.find(e => e.vendor)?.vendor;
150
152
  }
151
153
 
154
+ set architecture(value) {
155
+ this.#architecture = value;
156
+ }
157
+
158
+ get architecture() {
159
+ return this.#architecture || this.extends.find(e => e.architecture)?.architecture;
160
+ }
161
+
152
162
  get derivedPackaging() {
153
163
  return this.extends.reduce((a, c) => a.union(c.packaging), new Set());
154
164
  }
package/src/owner.mjs CHANGED
@@ -30,6 +30,7 @@ const OwnerTypeDefinition = {
30
30
  domain: { type: "string", collection: false, writeable: true },
31
31
  domains: { type: "string", collection: true, writeable: true },
32
32
  timezone: { type: "string", collection: false, writeable: true },
33
+ architectures: { type: "string", collection: true, writeable: true },
33
34
  locales: { type: "string", collection: true, writeable: true },
34
35
  administratorEmail: { type: "string", collection: false, writeable: true }
35
36
  }
@@ -396,25 +397,38 @@ export class Owner extends Base {
396
397
  return this.domain ? new Set([this.domain]) : new Set();
397
398
  }
398
399
 
399
- /*
400
- get localDomains() {
401
- let domains = new Set();
400
+ get domainNames() {
401
+ let names = new Set();
402
402
 
403
- for (const object of this.hosts()) {
404
- domains = domains.union(object.localDomains);
403
+ for (const host of this.hosts()) {
404
+ names = names.union(new Set(host.domainNames));
405
405
  }
406
406
 
407
- return domains;
407
+ return names;
408
408
  }
409
- */
410
409
 
411
- get domainNames() {
412
- let names = new Set();
410
+ #architectures;
411
+
412
+ set architectures(value)
413
+ {
414
+ if (value instanceof Set) {
415
+ this.#architectures = this.#architectures ? this.#architectures.union(value) : value;
416
+ } else {
417
+ this.#architectures = new Set(value);
418
+ }
419
+ }
420
+
421
+ get architectures() {
422
+ if(this.#architectures) {
423
+ return this.#architectures;
424
+ }
425
+
426
+ const architectures = new Set();
413
427
 
414
428
  for (const host of this.hosts()) {
415
- names = names.union(new Set(host.domainNames));
429
+ architectures.add(host.architecture);
416
430
  }
417
431
 
418
- return names;
432
+ return architectures;
419
433
  }
420
434
  }
@@ -193,6 +193,11 @@ export class Cluster extends Host {
193
193
  collection: boolean;
194
194
  writeable: boolean;
195
195
  };
196
+ architectures: {
197
+ type: string;
198
+ collection: boolean;
199
+ writeable: boolean;
200
+ };
196
201
  locales: {
197
202
  type: string;
198
203
  collection: boolean;
@@ -303,6 +308,11 @@ export class Cluster extends Host {
303
308
  collection: boolean;
304
309
  writeable: boolean;
305
310
  };
311
+ architecture: {
312
+ type: string;
313
+ collection: boolean;
314
+ writeable: boolean;
315
+ };
306
316
  priority: {
307
317
  type: string;
308
318
  collection: boolean;
@@ -390,7 +400,7 @@ export class Cluster extends Host {
390
400
  get backups(): Set<any>;
391
401
  get members(): Set<any>;
392
402
  preparePackages(stagingDir: any): AsyncGenerator<{
393
- sources: AsyncGenerator<any, void, unknown>[];
403
+ sources: AsyncIterable<import("content-entry").ContentEntry>[];
394
404
  outputs: any;
395
405
  properties: {
396
406
  name: string;
package/types/dns.d.mts CHANGED
@@ -92,7 +92,7 @@ export class DNSService extends Base {
92
92
  LLMNR: string;
93
93
  })[];
94
94
  preparePackages(stagingDir: any): AsyncGenerator<{
95
- sources: AsyncGenerator<any, void, unknown>[];
95
+ sources: AsyncIterable<import("content-entry").ContentEntry>[];
96
96
  outputs: Set<typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").DOCKER>;
97
97
  properties: {
98
98
  name: string;
package/types/host.d.mts CHANGED
@@ -96,6 +96,11 @@ export class Host extends Base {
96
96
  collection: boolean;
97
97
  writeable: boolean;
98
98
  };
99
+ architecture: {
100
+ type: string;
101
+ collection: boolean;
102
+ writeable: boolean;
103
+ };
99
104
  priority: {
100
105
  type: string;
101
106
  collection: boolean;
@@ -170,6 +175,8 @@ export class Host extends Base {
170
175
  get chassis(): any;
171
176
  set vendor(value: any);
172
177
  get vendor(): any;
178
+ set architecture(value: any);
179
+ get architecture(): any;
173
180
  get isTemplate(): true | RegExpMatchArray;
174
181
  get isModel(): boolean;
175
182
  get model(): any;
@@ -193,6 +193,11 @@ export class Location extends Owner {
193
193
  collection: boolean;
194
194
  writeable: boolean;
195
195
  };
196
+ architectures: {
197
+ type: string;
198
+ collection: boolean;
199
+ writeable: boolean;
200
+ };
196
201
  locales: {
197
202
  type: string;
198
203
  collection: boolean;
@@ -398,6 +403,11 @@ export class Location extends Owner {
398
403
  collection: boolean;
399
404
  writeable: boolean;
400
405
  };
406
+ architectures: {
407
+ type: string;
408
+ collection: boolean;
409
+ writeable: boolean;
410
+ };
401
411
  locales: {
402
412
  type: string;
403
413
  collection: boolean;
@@ -195,6 +195,11 @@ export class Network extends Owner {
195
195
  collection: boolean;
196
196
  writeable: boolean;
197
197
  };
198
+ architectures: {
199
+ type: string;
200
+ collection: boolean;
201
+ writeable: boolean;
202
+ };
198
203
  locales: {
199
204
  type: string;
200
205
  collection: boolean;
package/types/owner.d.mts CHANGED
@@ -191,6 +191,11 @@ export class Owner extends Base {
191
191
  collection: boolean;
192
192
  writeable: boolean;
193
193
  };
194
+ architectures: {
195
+ type: string;
196
+ collection: boolean;
197
+ writeable: boolean;
198
+ };
194
199
  locales: {
195
200
  type: string;
196
201
  collection: boolean;
@@ -238,6 +243,8 @@ export class Owner extends Base {
238
243
  get domains(): Set<any>;
239
244
  get localDomains(): Set<any>;
240
245
  get domainNames(): Set<any>;
246
+ set architectures(value: any);
247
+ get architectures(): any;
241
248
  #private;
242
249
  }
243
250
  import { Base } from "./base.mjs";
package/types/root.d.mts CHANGED
@@ -197,6 +197,11 @@ export class Root extends Location {
197
197
  collection: boolean;
198
198
  writeable: boolean;
199
199
  };
200
+ architectures: {
201
+ type: string;
202
+ collection: boolean;
203
+ writeable: boolean;
204
+ };
200
205
  locales: {
201
206
  type: string;
202
207
  collection: boolean;
@@ -402,6 +407,11 @@ export class Root extends Location {
402
407
  collection: boolean;
403
408
  writeable: boolean;
404
409
  };
410
+ architectures: {
411
+ type: string;
412
+ collection: boolean;
413
+ writeable: boolean;
414
+ };
405
415
  locales: {
406
416
  type: string;
407
417
  collection: boolean;