pmcf 4.17.0 → 4.17.2

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.17.0",
3
+ "version": "4.17.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -60,7 +60,7 @@
60
60
  "package-directory": "^8.2.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@types/node": "^25.2.2",
63
+ "@types/node": "^25.2.3",
64
64
  "ava": "^6.4.1",
65
65
  "c8": "^10.1.3",
66
66
  "documentation": "^14.0.3",
package/src/base.mjs CHANGED
@@ -558,6 +558,18 @@ export class Base {
558
558
  return new Set(allOutputs.filter(o => this.packaging.has(o.name)));
559
559
  }
560
560
 
561
+ get packageData() {
562
+ return {
563
+ sources: [],
564
+ outputs: this.outputs,
565
+ properties: {
566
+ access: "private",
567
+ dependencies: this.depends,
568
+ groups: [this.type]
569
+ }
570
+ };
571
+ }
572
+
561
573
  async *preparePackages(stagingDir) {}
562
574
 
563
575
  get templateTransformers() {
package/src/cluster.mjs CHANGED
@@ -84,28 +84,31 @@ export class Cluster extends Host {
84
84
  const packageStagingDir = join(stagingDir, host.name);
85
85
  const location = `${this.location.name}-${host.name}`;
86
86
 
87
- const result = {
88
- sources: [
89
- new FileContentProvider(packageStagingDir + "/")[
90
- Symbol.asyncIterator
91
- ]()
92
- ],
93
- outputs: host.outputs,
94
- properties: {
95
- name: `keepalived-${location}`,
96
- description: `${this.typeName} definitions for ${this.fullName}`,
97
- access: "private",
98
- dependencies: ["keepalived>=2.3.4"],
99
- groups: ["service-config", location, "keepalived"]
100
- }
101
- };
87
+ const packageData = host.packageData;
88
+ packageData.sources.push(
89
+ new FileContentProvider(packageStagingDir + "/")
90
+ );
91
+ packageData.properties.name = `keepalived-${location}`;
92
+ packageData.properties.description = `${this.typeName} definitions for ${this.fullName}`;
93
+ packageData.properties.groups.push(
94
+ "service-config",
95
+ location,
96
+ "keepalived"
97
+ );
98
+
99
+ const extra = [];
100
+
101
+ const smtp = this.smtp;
102
+ if (smtp) {
103
+ extra.push(` smtp_server ${smtp.address()}`);
104
+ }
102
105
 
103
106
  const cfg = [
104
107
  "global_defs {",
105
108
  " notification_email {",
106
109
  " " + this.administratorEmail,
107
110
  " }",
108
- ` smtp_server ${this.smtp.address()}`,
111
+ ...extra,
109
112
  ` notification_email_from keepalived@${host.domainName}`,
110
113
  " enable_script_security",
111
114
  " script_user root",
@@ -248,7 +251,7 @@ export class Cluster extends Host {
248
251
  cfg
249
252
  );
250
253
 
251
- yield result;
254
+ yield packageData;
252
255
  }
253
256
  }
254
257
  }
package/src/host.mjs CHANGED
@@ -434,7 +434,6 @@ export class Host extends ServiceOwner {
434
434
  ],
435
435
  provides: [...this.provides],
436
436
  replaces: [...this.replaces],
437
- requires: [],
438
437
  backup: "root/.ssh/known_hosts"
439
438
  }
440
439
  };
package/src/service.mjs CHANGED
@@ -256,18 +256,12 @@ export class Service extends Base {
256
256
  }
257
257
 
258
258
  get packageData() {
259
+ const packageData = super.packageData;
259
260
  const location = `${this.location.name}-${this.host.name}`;
260
- return {
261
- sources: [],
262
- outputs: this.outputs,
263
- properties: {
264
- name: `${this.type}-${location}`,
265
- description: `${this.type} service definitions for ${this.fullName}`,
266
- access: "private",
267
- dependencies: this.depends,
268
- groups: ["service-config", location, this.type]
269
- }
270
- };
261
+ packageData.properties.name = `${this.type}-${location}`;
262
+ packageData.properties.description =`${this.type} service definitions for ${this.fullName}`;
263
+ packageData.properties.groups.push("service-config", location);
264
+ return packageData;
271
265
  }
272
266
 
273
267
  async *preparePackages(dir) {
package/types/base.d.mts CHANGED
@@ -131,6 +131,15 @@ export class Base {
131
131
  set packaging(value: any);
132
132
  get packaging(): any;
133
133
  get outputs(): Set<typeof import("npm-pkgbuild").DEBIAN | typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
134
+ get packageData(): {
135
+ sources: any[];
136
+ outputs: Set<typeof import("npm-pkgbuild").DEBIAN | typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
137
+ properties: {
138
+ access: string;
139
+ dependencies: any;
140
+ groups: any[];
141
+ };
142
+ };
134
143
  preparePackages(stagingDir: any): AsyncGenerator<never, void, unknown>;
135
144
  get templateTransformers(): any[];
136
145
  /**
@@ -502,16 +502,6 @@ export class Cluster extends Host {
502
502
  set backups(value: any[]);
503
503
  get backups(): any[];
504
504
  get members(): Set<any>;
505
- preparePackages(stagingDir: any): AsyncGenerator<{
506
- sources: AsyncIterable<import("content-entry").ContentEntry | import("content-entry").CollectionEntry>[];
507
- outputs: any;
508
- properties: {
509
- name: string;
510
- description: string;
511
- access: string;
512
- dependencies: string[];
513
- groups: string[];
514
- };
515
- }, void, unknown>;
505
+ preparePackages(stagingDir: any): AsyncGenerator<any, void, unknown>;
516
506
  }
517
507
  import { Host } from "./host.mjs";
package/types/host.d.mts CHANGED
@@ -270,7 +270,6 @@ export class Host extends ServiceOwner {
270
270
  dependencies: any[];
271
271
  provides: any[];
272
272
  replaces: any[];
273
- requires: any[];
274
273
  backup: string;
275
274
  };
276
275
  } | {
@@ -658,23 +658,10 @@ export class Service extends Base {
658
658
  get type(): any;
659
659
  get types(): Set<any>;
660
660
  get systemdService(): any;
661
- get packageData(): {
662
- sources: any[];
663
- outputs: Set<typeof import("npm-pkgbuild").DEBIAN | typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
664
- properties: {
665
- name: string;
666
- description: string;
667
- access: string;
668
- dependencies: any;
669
- groups: any[];
670
- };
671
- };
672
661
  preparePackages(dir: any): AsyncGenerator<{
673
662
  sources: any[];
674
663
  outputs: Set<typeof import("npm-pkgbuild").DEBIAN | typeof import("npm-pkgbuild").ARCH | typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
675
664
  properties: {
676
- name: string;
677
- description: string;
678
665
  access: string;
679
666
  dependencies: any;
680
667
  groups: any[];