pmcf 4.17.1 → 4.17.3
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 +2 -2
- package/src/base.mjs +17 -2
- package/src/cluster.mjs +12 -12
- package/src/host.mjs +0 -1
- package/src/service.mjs +5 -11
- package/src/services/bind.mjs +5 -11
- package/types/base.d.mts +9 -0
- package/types/cluster.d.mts +1 -12
- package/types/host.d.mts +0 -1
- package/types/service.d.mts +0 -13
- package/types/services/bind.d.mts +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.3",
|
|
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.
|
|
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
|
@@ -142,8 +142,11 @@ export class Base {
|
|
|
142
142
|
}
|
|
143
143
|
} else {
|
|
144
144
|
if (current instanceof Set) {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
if (value instanceof Set) {
|
|
146
|
+
this[name] = current.union(value);
|
|
147
|
+
} else {
|
|
148
|
+
this[name].add(value);
|
|
149
|
+
}
|
|
147
150
|
} else if (current instanceof Map) {
|
|
148
151
|
// TODO
|
|
149
152
|
this[name] = value;
|
|
@@ -558,6 +561,18 @@ export class Base {
|
|
|
558
561
|
return new Set(allOutputs.filter(o => this.packaging.has(o.name)));
|
|
559
562
|
}
|
|
560
563
|
|
|
564
|
+
get packageData() {
|
|
565
|
+
return {
|
|
566
|
+
sources: [],
|
|
567
|
+
outputs: this.outputs,
|
|
568
|
+
properties: {
|
|
569
|
+
access: "private",
|
|
570
|
+
dependencies: this.depends,
|
|
571
|
+
groups: [this.type]
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
|
|
561
576
|
async *preparePackages(stagingDir) {}
|
|
562
577
|
|
|
563
578
|
get templateTransformers() {
|
package/src/cluster.mjs
CHANGED
|
@@ -84,17 +84,17 @@ 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
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
98
|
|
|
99
99
|
const extra = [];
|
|
100
100
|
|
|
@@ -251,7 +251,7 @@ export class Cluster extends Host {
|
|
|
251
251
|
cfg
|
|
252
252
|
);
|
|
253
253
|
|
|
254
|
-
yield
|
|
254
|
+
yield packageData;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
}
|
package/src/host.mjs
CHANGED
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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/src/services/bind.mjs
CHANGED
|
@@ -6,10 +6,11 @@ import {
|
|
|
6
6
|
addType,
|
|
7
7
|
default_attribute_writable,
|
|
8
8
|
string_attribute_writable,
|
|
9
|
+
string_collection_attribute_writable,
|
|
10
|
+
string_set_attribute_writable,
|
|
9
11
|
boolean_attribute_writable_true,
|
|
10
12
|
boolean_attribute_writable_false,
|
|
11
13
|
number_attribute_writable,
|
|
12
|
-
string_collection_attribute_writable,
|
|
13
14
|
name_attribute_writable
|
|
14
15
|
} from "pacc";
|
|
15
16
|
import {
|
|
@@ -79,7 +80,7 @@ const BindServiceTypeDefinition = {
|
|
|
79
80
|
hasCatalog: boolean_attribute_writable_true,
|
|
80
81
|
hasLinkLocalAdresses: boolean_attribute_writable_false,
|
|
81
82
|
hasLocationRecord: boolean_attribute_writable_true,
|
|
82
|
-
excludeInterfaceKinds:
|
|
83
|
+
excludeInterfaceKinds: string_set_attribute_writable,
|
|
83
84
|
exclude: {
|
|
84
85
|
...default_attribute_writable,
|
|
85
86
|
type: networkAddressType,
|
|
@@ -160,7 +161,8 @@ export class BindService extends ExtraSourceService {
|
|
|
160
161
|
_zones = [];
|
|
161
162
|
_trusted = [];
|
|
162
163
|
_exclude = new Set([]);
|
|
163
|
-
|
|
164
|
+
|
|
165
|
+
excludeInterfaceKinds = new Set();
|
|
164
166
|
|
|
165
167
|
serial = Math.ceil(Date.now() / 1000);
|
|
166
168
|
refresh = 36000;
|
|
@@ -245,14 +247,6 @@ export class BindService extends ExtraSourceService {
|
|
|
245
247
|
return this._exclude;
|
|
246
248
|
}
|
|
247
249
|
|
|
248
|
-
set excludeInterfaceKinds(value) {
|
|
249
|
-
this._excludeInterfaceKinds.add(value);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
get excludeInterfaceKinds() {
|
|
253
|
-
return this._excludeInterfaceKinds;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
250
|
async *preparePackages(dir) {
|
|
257
251
|
const sources = this.zones.length ? this.zones : [this.owner];
|
|
258
252
|
const names = sources.map(a => a.fullName).join(" ");
|
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
|
/**
|
package/types/cluster.d.mts
CHANGED
|
@@ -502,17 +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: FileContentProvider[];
|
|
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";
|
|
518
|
-
import { FileContentProvider } from "npm-pkgbuild";
|
package/types/host.d.mts
CHANGED
package/types/service.d.mts
CHANGED
|
@@ -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[];
|
|
@@ -1539,7 +1539,7 @@ export class BindService extends ExtraSourceService {
|
|
|
1539
1539
|
_zones: any[];
|
|
1540
1540
|
_trusted: any[];
|
|
1541
1541
|
_exclude: Set<any>;
|
|
1542
|
-
|
|
1542
|
+
excludeInterfaceKinds: Set<any>;
|
|
1543
1543
|
serial: number;
|
|
1544
1544
|
refresh: number;
|
|
1545
1545
|
retry: number;
|
|
@@ -1558,8 +1558,6 @@ export class BindService extends ExtraSourceService {
|
|
|
1558
1558
|
get trusted(): any[];
|
|
1559
1559
|
set exclude(value: Set<any>);
|
|
1560
1560
|
get exclude(): Set<any>;
|
|
1561
|
-
set excludeInterfaceKinds(value: Set<any>);
|
|
1562
|
-
get excludeInterfaceKinds(): Set<any>;
|
|
1563
1561
|
preparePackages(dir: any): AsyncGenerator<any, void, unknown>;
|
|
1564
1562
|
generateOutfacingDefs(outputControl: any, sources: any): AsyncGenerator<any, void, unknown>;
|
|
1565
1563
|
generateZoneDefs(outputControl: any, sources: any): Promise<any>;
|