pmcf 6.38.3 → 6.38.5
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 +2 -2
- package/src/content.mjs +3 -3
- package/src/core.mjs +5 -6
- package/src/host.mjs +5 -1
- package/src/subnet.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.38.
|
|
3
|
+
"version": "6.38.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"yaml": "^2.9.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/node": "^26.
|
|
62
|
+
"@types/node": "^26.4.0",
|
|
63
63
|
"ava": "^8.0.1",
|
|
64
64
|
"c8": "^12.0.0",
|
|
65
65
|
"documentation": "^14.0.3",
|
package/src/base.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
default_attribute_writable
|
|
20
20
|
} from "pacc";
|
|
21
21
|
import { union } from "./utils.mjs";
|
|
22
|
-
import { addType,
|
|
22
|
+
import { addType, core } from "pmcf";
|
|
23
23
|
import { owner_attribute, aliases_attribute } from "./common-attributes.mjs";
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ import { owner_attribute, aliases_attribute } from "./common-attributes.mjs";
|
|
|
27
27
|
* attributes: as declared in the types
|
|
28
28
|
* properties: use defined values to support attribute value definitions
|
|
29
29
|
*/
|
|
30
|
-
export class Base extends
|
|
30
|
+
export class Base extends core {
|
|
31
31
|
static name = "base";
|
|
32
32
|
static key = "name";
|
|
33
33
|
static priority = 0;
|
package/src/content.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
default_collection_attribute_writable
|
|
5
5
|
} from "pacc";
|
|
6
6
|
import { allOutputs } from "npm-pkgbuild";
|
|
7
|
-
import {
|
|
7
|
+
import { core, addType } from "pmcf";
|
|
8
8
|
import { union } from "./utils.mjs";
|
|
9
9
|
|
|
10
|
-
export class permission extends
|
|
10
|
+
export class permission extends core {
|
|
11
11
|
static priority = 1.9;
|
|
12
12
|
static attributes = {
|
|
13
13
|
pattern: { ...string_attribute_writable, key: true, name: "pattern" },
|
|
@@ -25,7 +25,7 @@ export class permission extends Core {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export class content extends
|
|
28
|
+
export class content extends core {
|
|
29
29
|
static priority = 1.9;
|
|
30
30
|
static attributes = {
|
|
31
31
|
permissions: {
|
package/src/core.mjs
CHANGED
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
} from "pacc";
|
|
12
12
|
import { addType } from "pmcf";
|
|
13
13
|
|
|
14
|
-
export class
|
|
15
|
-
static name = "core";
|
|
14
|
+
export class core {
|
|
16
15
|
static priority = 1;
|
|
17
16
|
|
|
18
17
|
static {
|
|
@@ -179,7 +178,7 @@ export class Core {
|
|
|
179
178
|
/**
|
|
180
179
|
* Walk the object graph in some directions and deliver seen nodes.
|
|
181
180
|
* @param {string[]} directions
|
|
182
|
-
* @return {Iterable<
|
|
181
|
+
* @return {Iterable<core>}
|
|
183
182
|
*/
|
|
184
183
|
*walkDirections(directions = ["this", "extends", "owner"]) {
|
|
185
184
|
if (directions.indexOf("this") >= 0) {
|
|
@@ -264,7 +263,7 @@ export class Core {
|
|
|
264
263
|
if (value instanceof Iterator) {
|
|
265
264
|
all.push(...value);
|
|
266
265
|
} else {
|
|
267
|
-
if (value instanceof
|
|
266
|
+
if (value instanceof core) {
|
|
268
267
|
this.error(
|
|
269
268
|
`Unexpected scalar value for "${attribute.name}"`,
|
|
270
269
|
value.fullName
|
|
@@ -290,12 +289,12 @@ export class Core {
|
|
|
290
289
|
* @returns {any}
|
|
291
290
|
*/
|
|
292
291
|
expand(object) {
|
|
293
|
-
if (this.isTemplate || object instanceof
|
|
292
|
+
if (this.isTemplate || object instanceof core) {
|
|
294
293
|
return object;
|
|
295
294
|
}
|
|
296
295
|
|
|
297
296
|
return expand(object, {
|
|
298
|
-
stopClass:
|
|
297
|
+
stopClass: core,
|
|
299
298
|
root: this.root,
|
|
300
299
|
current: this,
|
|
301
300
|
valueFor: (name, at) =>
|
package/src/host.mjs
CHANGED
|
@@ -316,7 +316,11 @@ export class Host extends ServiceOwner {
|
|
|
316
316
|
|
|
317
317
|
packageData.sources.push(
|
|
318
318
|
await Array.fromAsync(this.templateContent()),
|
|
319
|
-
new FileContentProvider({
|
|
319
|
+
new FileContentProvider({
|
|
320
|
+
dir,
|
|
321
|
+
pattern: ["**/*", "**/.ssh/*"],
|
|
322
|
+
permissions: this.content.permissions
|
|
323
|
+
})
|
|
320
324
|
);
|
|
321
325
|
|
|
322
326
|
await loadHooks(
|
package/src/subnet.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
} from "ip-utilties";
|
|
8
8
|
import { string_attribute, name_attribute, integer_attribute } from "pacc";
|
|
9
9
|
import { networks_attribute } from "./common-attributes.mjs";
|
|
10
|
-
import { addType, Network,
|
|
10
|
+
import { addType, Network, core } from "pmcf";
|
|
11
11
|
|
|
12
|
-
export class Subnet extends
|
|
12
|
+
export class Subnet extends core {
|
|
13
13
|
static name = "subnet";
|
|
14
14
|
static priority = 1;
|
|
15
15
|
static owners = ["owner", "network", "network_interface", "root"];
|