pmcf 6.36.4 → 6.37.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 +2 -2
- package/src/content.mjs +80 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.37.0",
|
|
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.2",
|
|
55
55
|
"ip-utilties": "^3.13.0",
|
|
56
|
-
"npm-pkgbuild": "^20.9.
|
|
56
|
+
"npm-pkgbuild": "^20.9.5",
|
|
57
57
|
"pacc": "^11.5.4",
|
|
58
58
|
"package-directory": "^8.2.0",
|
|
59
59
|
"yaml": "^2.9.0"
|
package/src/content.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
string_attribute_writable,
|
|
3
|
+
string_set_attribute_writable,
|
|
4
|
+
default_collection_attribute_writable
|
|
5
|
+
} from "pacc";
|
|
6
|
+
import { Base, addType } from "pmcf";
|
|
7
|
+
|
|
8
|
+
export class permission extends Base {
|
|
9
|
+
static attributes = {
|
|
10
|
+
pattern: { ...string_attribute_writable, key: true, name: "pattern" },
|
|
11
|
+
user: { ...string_attribute_writable, name: "user" },
|
|
12
|
+
group: { ...string_attribute_writable, name: "group" },
|
|
13
|
+
mode: { ...string_attribute_writable, name: "mode" }
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class content extends Base {
|
|
18
|
+
static priority = 1.9;
|
|
19
|
+
static attributes = {
|
|
20
|
+
permissions: {
|
|
21
|
+
...default_collection_attribute_writable,
|
|
22
|
+
type: permission,
|
|
23
|
+
name: "permissions"
|
|
24
|
+
},
|
|
25
|
+
replaces: { ...string_set_attribute_writable, name: "replaces" },
|
|
26
|
+
depends: { ...string_set_attribute_writable, name: "depends" },
|
|
27
|
+
provides: { ...string_set_attribute_writable, name: "provides" },
|
|
28
|
+
optional: { ...string_set_attribute_writable, name: "optional" }
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
static {
|
|
32
|
+
addType(this);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
permissions = new Map();
|
|
36
|
+
_provides = new Set();
|
|
37
|
+
_replaces = new Set();
|
|
38
|
+
_depends = new Set();
|
|
39
|
+
_optional = new Set();
|
|
40
|
+
|
|
41
|
+
set provides(value) {
|
|
42
|
+
this._provides = union(value, this._provides);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get provides() {
|
|
46
|
+
return this.expand(
|
|
47
|
+
this.unionFromDirections(["this", "extends"], "_provides")
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
set replaces(value) {
|
|
52
|
+
this._replaces = union(value, this._replaces);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
get replaces() {
|
|
56
|
+
return this.expand(
|
|
57
|
+
this.unionFromDirections(["this", "extends"], "_replaces")
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
set depends(value) {
|
|
62
|
+
this._depends = union(value, this._depends);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
get depends() {
|
|
66
|
+
return this.expand(
|
|
67
|
+
this.unionFromDirections(["this", "extends"], "_depends")
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
set optional(value) {
|
|
72
|
+
this._optional = union(value, this._optional);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get optional() {
|
|
76
|
+
return this.expand(
|
|
77
|
+
this.unionFromDirections(["this", "extends"], "_optional")
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|