pmcf 6.34.1 → 6.34.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/README.md +2 -0
- package/package.json +2 -2
- package/src/base.mjs +21 -7
- package/src/host.mjs +1 -1
- package/src/initialization-context.mjs +1 -1
- package/src/services/bind.mjs +16 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.34.
|
|
3
|
+
"version": "6.34.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"aggregated-map": "^1.0.10",
|
|
54
54
|
"content-entry-transform": "^1.7.1",
|
|
55
55
|
"ip-utilties": "^3.13.0",
|
|
56
|
-
"npm-pkgbuild": "^20.
|
|
56
|
+
"npm-pkgbuild": "^20.9.0",
|
|
57
57
|
"pacc": "^11.2.3",
|
|
58
58
|
"package-directory": "^8.2.0",
|
|
59
59
|
"yaml": "^2.9.0"
|
package/src/base.mjs
CHANGED
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
string_attribute_writable,
|
|
22
22
|
string_set_attribute_writable,
|
|
23
23
|
description_attribute_writable,
|
|
24
|
-
boolean_attribute_writable
|
|
24
|
+
boolean_attribute_writable,
|
|
25
|
+
object_attribute
|
|
25
26
|
} from "pacc";
|
|
26
27
|
import { union } from "./utils.mjs";
|
|
27
28
|
import { addType } from "pmcf";
|
|
@@ -43,14 +44,18 @@ export class Base {
|
|
|
43
44
|
description: description_attribute_writable,
|
|
44
45
|
type: type_attribute_writable,
|
|
45
46
|
directory: { ...string_attribute_writable, name: "directory" },
|
|
46
|
-
packaging: { ...string_set_attribute_writable, name: "packaging" },
|
|
47
47
|
enabled: { ...boolean_attribute_writable, name: "enabled" },
|
|
48
48
|
tags: { ...string_set_attribute_writable, name: "tags" },
|
|
49
|
-
template: {
|
|
49
|
+
template: {
|
|
50
|
+
...boolean_attribute_writable,
|
|
51
|
+
name: "template",
|
|
52
|
+
private: true
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
packaging: { ...string_set_attribute_writable, name: "packaging" },
|
|
56
|
+
// packageContentProperties: { ...object_attribute, writable: true, name: "packageContentProperties"}
|
|
50
57
|
};
|
|
51
|
-
|
|
52
|
-
console.log("asMapEntry",attribute?.name,value);
|
|
53
|
-
return [value.name, value]; };*/
|
|
58
|
+
|
|
54
59
|
static {
|
|
55
60
|
addType(this);
|
|
56
61
|
}
|
|
@@ -553,6 +558,15 @@ export class Base {
|
|
|
553
558
|
];
|
|
554
559
|
}
|
|
555
560
|
|
|
561
|
+
/**
|
|
562
|
+
*
|
|
563
|
+
* @param {string} dir
|
|
564
|
+
* @returns {Object}
|
|
565
|
+
*/
|
|
566
|
+
templateContentAttributes(dir) {
|
|
567
|
+
return { dir, pattern: "**/*" };
|
|
568
|
+
}
|
|
569
|
+
|
|
556
570
|
/**
|
|
557
571
|
*
|
|
558
572
|
* @param {*} entryProperties
|
|
@@ -567,7 +581,7 @@ export class Base {
|
|
|
567
581
|
if ((await stat(dir)).isDirectory) {
|
|
568
582
|
yield transform(
|
|
569
583
|
new FileContentProvider(
|
|
570
|
-
|
|
584
|
+
this.templateContentAttributes(dir),
|
|
571
585
|
entryProperties,
|
|
572
586
|
directoryProperties
|
|
573
587
|
),
|
package/src/host.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { join } from "node:path";
|
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
4
|
import { AggregatedMap } from "aggregated-map";
|
|
5
5
|
import {
|
|
6
|
-
default_collection_attribute_writable,
|
|
7
6
|
string_attribute,
|
|
8
7
|
string_attribute_writable,
|
|
9
8
|
string_set_attribute_writable,
|
|
@@ -79,6 +78,7 @@ export class Host extends ServiceOwner {
|
|
|
79
78
|
replaces: { ...string_set_attribute_writable, name: "replaces" },
|
|
80
79
|
depends: { ...string_set_attribute_writable, name: "depends" },
|
|
81
80
|
provides: { ...string_set_attribute_writable, name: "provides" },
|
|
81
|
+
optional: { ...string_set_attribute_writable, name: "optional" },
|
|
82
82
|
extends: {
|
|
83
83
|
...extends_attribute,
|
|
84
84
|
type: Host
|
|
@@ -71,7 +71,7 @@ export class InitializationContext {
|
|
|
71
71
|
}
|
|
72
72
|
if (value !== undefined) {
|
|
73
73
|
if (typeof value === "object") {
|
|
74
|
-
if (attribute.type && value instanceof attribute.type) {
|
|
74
|
+
if (typeof attribute.type === 'function' && value instanceof attribute.type) {
|
|
75
75
|
return assign(attribute, object, value);
|
|
76
76
|
}
|
|
77
77
|
} else {
|
package/src/services/bind.mjs
CHANGED
|
@@ -792,6 +792,22 @@ export class bind extends CoreService {
|
|
|
792
792
|
return false;
|
|
793
793
|
}
|
|
794
794
|
|
|
795
|
+
templateContentAttributes(dir) {
|
|
796
|
+
const attr = super.templateContentAttributes(dir);
|
|
797
|
+
|
|
798
|
+
// attr.properties = this.packageContentProperties;
|
|
799
|
+
|
|
800
|
+
attr.properties = {
|
|
801
|
+
"usr/share/libalpm/scripts/*": { mode: "0777" },
|
|
802
|
+
"etc/named/**/*": { user: "named", group: "named" },
|
|
803
|
+
"var/lib/named": { user: "named", group: "named" }
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
console.log("templateContentAttributes", this.fullName, attr);
|
|
807
|
+
|
|
808
|
+
return attr;
|
|
809
|
+
}
|
|
810
|
+
|
|
795
811
|
async *preparePackages(dir) {
|
|
796
812
|
const permissions = this.packageContentPermissions;
|
|
797
813
|
const packageData = this.packageData;
|