pmcf 4.4.2 → 4.5.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/bin/pmcf-package +0 -1
- package/package.json +3 -2
- package/src/base.mjs +9 -2
- package/src/services/openldap.mjs +30 -13
- package/types/base.d.mts +1 -0
package/bin/pmcf-package
CHANGED
|
@@ -47,7 +47,6 @@ for (const object of root.find(args)) {
|
|
|
47
47
|
}
|
|
48
48
|
const stagingDir = join(options.output, object.fullName);
|
|
49
49
|
|
|
50
|
-
//console.log(`packages for ${object.fullName}`);
|
|
51
50
|
for await (const { sources, outputs, properties } of object.preparePackages(
|
|
52
51
|
stagingDir
|
|
53
52
|
)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,8 +53,9 @@
|
|
|
53
53
|
"lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
+
"content-entry-transform": "^1.5.17",
|
|
56
57
|
"ip-utilties": "^2.0.2",
|
|
57
|
-
"npm-pkgbuild": "^19.2.
|
|
58
|
+
"npm-pkgbuild": "^19.2.1",
|
|
58
59
|
"pacc": "^8.0.2",
|
|
59
60
|
"package-directory": "^8.1.0"
|
|
60
61
|
},
|
package/src/base.mjs
CHANGED
|
@@ -306,6 +306,13 @@ export class Base {
|
|
|
306
306
|
return this.owner.addObject(object);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
+
*allExtends() {
|
|
310
|
+
for (const e of this.extends) {
|
|
311
|
+
yield e;
|
|
312
|
+
yield* e.allExtends();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
309
316
|
*owners() {
|
|
310
317
|
if (this.owner) {
|
|
311
318
|
yield* this.owner.thisAndOwners();
|
|
@@ -352,7 +359,7 @@ export class Base {
|
|
|
352
359
|
yield value;
|
|
353
360
|
}
|
|
354
361
|
|
|
355
|
-
for (const e of this.
|
|
362
|
+
for (const e of this.allExtends()) {
|
|
356
363
|
yield* e._extendedPropertyIterator(propertyName, seen);
|
|
357
364
|
}
|
|
358
365
|
}
|
|
@@ -361,7 +368,7 @@ export class Base {
|
|
|
361
368
|
_extendedProperty(propertyName, seen) {
|
|
362
369
|
if (!seen.has(this)) {
|
|
363
370
|
seen.add(this);
|
|
364
|
-
for (const e of this.
|
|
371
|
+
for (const e of this.allExtends()) {
|
|
365
372
|
const value =
|
|
366
373
|
getAttribute(e, propertyName) ??
|
|
367
374
|
e._extendedProperty(propertyName, seen);
|
|
@@ -10,6 +10,7 @@ import { addServiceType } from "pmcf";
|
|
|
10
10
|
import { ServiceTypeDefinition, Service } from "../service.mjs";
|
|
11
11
|
import { writeLines, filterConfigurable } from "../utils.mjs";
|
|
12
12
|
import { addHook } from "../hooks.mjs";
|
|
13
|
+
import { createExpressionTransformer } from "content-entry-transform";
|
|
13
14
|
|
|
14
15
|
const OpenLDAPServiceTypeDefinition = {
|
|
15
16
|
name: "openldap",
|
|
@@ -102,22 +103,38 @@ export class OpenLDAPService extends Service {
|
|
|
102
103
|
const owner = "ldap";
|
|
103
104
|
const group = "ldap";
|
|
104
105
|
|
|
106
|
+
const entryProperties = {
|
|
107
|
+
mode: 0o644,
|
|
108
|
+
owner,
|
|
109
|
+
group
|
|
110
|
+
};
|
|
111
|
+
const directoryProperties = {
|
|
112
|
+
mode: 0o755,
|
|
113
|
+
owner,
|
|
114
|
+
group
|
|
115
|
+
};
|
|
116
|
+
const transformers = [
|
|
117
|
+
createExpressionTransformer(e => true, { base: "ABC123" })
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
const templateDirs = [];
|
|
121
|
+
for (const e of [...this.allExtends(), this]) {
|
|
122
|
+
const base = join(e.directory, "content") + "/";
|
|
123
|
+
console.log("TEMPLATE", e.fullName, base);
|
|
124
|
+
templateDirs.push(
|
|
125
|
+
new FileContentProvider(
|
|
126
|
+
{ transformers, base },
|
|
127
|
+
entryProperties,
|
|
128
|
+
directoryProperties
|
|
129
|
+
)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
105
133
|
const packageData = {
|
|
106
134
|
dir,
|
|
107
135
|
sources: [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
mode: 0o644,
|
|
112
|
-
owner,
|
|
113
|
-
group
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
mode: 0o755,
|
|
117
|
-
owner,
|
|
118
|
-
group
|
|
119
|
-
}
|
|
120
|
-
)
|
|
136
|
+
...templateDirs,
|
|
137
|
+
new FileContentProvider(dir + "/", entryProperties, directoryProperties)
|
|
121
138
|
],
|
|
122
139
|
outputs: this.outputs,
|
|
123
140
|
properties: {
|
package/types/base.d.mts
CHANGED