pmcf 2.70.12 → 2.71.1
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
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
3
3
|
import { addType } from "../types.mjs";
|
|
4
|
-
import {
|
|
5
|
-
ServiceTypeDefinition,
|
|
6
|
-
Service
|
|
7
|
-
} from "../service.mjs";
|
|
4
|
+
import { ServiceTypeDefinition, Service } from "../service.mjs";
|
|
8
5
|
import { writeLines } from "../utils.mjs";
|
|
9
6
|
|
|
10
7
|
const OpenLDAPServiceTypeDefinition = {
|
|
@@ -13,7 +10,23 @@ const OpenLDAPServiceTypeDefinition = {
|
|
|
13
10
|
owners: ServiceTypeDefinition.owners,
|
|
14
11
|
extends: ServiceTypeDefinition,
|
|
15
12
|
priority: 0.1,
|
|
16
|
-
properties: {
|
|
13
|
+
properties: {
|
|
14
|
+
baseDN: {
|
|
15
|
+
type: "string",
|
|
16
|
+
collection: false,
|
|
17
|
+
writeable: true
|
|
18
|
+
},
|
|
19
|
+
rootDN: {
|
|
20
|
+
type: "string",
|
|
21
|
+
collection: false,
|
|
22
|
+
writeable: true
|
|
23
|
+
},
|
|
24
|
+
uri: {
|
|
25
|
+
type: "string",
|
|
26
|
+
collection: false,
|
|
27
|
+
writeable: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
17
30
|
service: {}
|
|
18
31
|
};
|
|
19
32
|
|
|
@@ -26,6 +39,9 @@ export class OpenLDAPService extends Service {
|
|
|
26
39
|
return OpenLDAPServiceTypeDefinition;
|
|
27
40
|
}
|
|
28
41
|
|
|
42
|
+
_baseDN;
|
|
43
|
+
_rootDN;
|
|
44
|
+
|
|
29
45
|
constructor(owner, data) {
|
|
30
46
|
super(owner, data);
|
|
31
47
|
this.read(data, OpenLDAPServiceTypeDefinition);
|
|
@@ -35,6 +51,30 @@ export class OpenLDAPService extends Service {
|
|
|
35
51
|
return OpenLDAPServiceTypeDefinition.name;
|
|
36
52
|
}
|
|
37
53
|
|
|
54
|
+
get baseDN() {
|
|
55
|
+
return this.expand(this._baseDN);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
set baseDN(value) {
|
|
59
|
+
this._baseDN = value;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get rootDN() {
|
|
63
|
+
return this.expand(this._rootDN);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
set rootDN(value) {
|
|
67
|
+
this._rootDN = value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
get uri() {
|
|
71
|
+
return this._uri;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
set uri(value) {
|
|
75
|
+
this._uri = value;
|
|
76
|
+
}
|
|
77
|
+
|
|
38
78
|
async *preparePackages(dir) {
|
|
39
79
|
const network = this.network;
|
|
40
80
|
const host = this.host;
|
|
@@ -59,6 +99,11 @@ export class OpenLDAPService extends Service {
|
|
|
59
99
|
"SLAPD_URLS=ldap:/// ldaps:///"
|
|
60
100
|
]);
|
|
61
101
|
|
|
102
|
+
await writeLines(join(packageData.dir, "etc/openldap"), "ldap.conf", [
|
|
103
|
+
`BASE=${this.baseDN}`,
|
|
104
|
+
`URI=${this.uri}`
|
|
105
|
+
]);
|
|
106
|
+
|
|
62
107
|
yield packageData;
|
|
63
108
|
}
|
|
64
109
|
}
|
|
@@ -251,10 +251,35 @@ export class OpenLDAPService extends Service {
|
|
|
251
251
|
};
|
|
252
252
|
};
|
|
253
253
|
priority: number;
|
|
254
|
-
properties: {
|
|
254
|
+
properties: {
|
|
255
|
+
baseDN: {
|
|
256
|
+
type: string;
|
|
257
|
+
collection: boolean;
|
|
258
|
+
writeable: boolean;
|
|
259
|
+
};
|
|
260
|
+
rootDN: {
|
|
261
|
+
type: string;
|
|
262
|
+
collection: boolean;
|
|
263
|
+
writeable: boolean;
|
|
264
|
+
};
|
|
265
|
+
uri: {
|
|
266
|
+
type: string;
|
|
267
|
+
collection: boolean;
|
|
268
|
+
writeable: boolean;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
255
271
|
service: {};
|
|
256
272
|
};
|
|
273
|
+
_baseDN: any;
|
|
274
|
+
_rootDN: any;
|
|
257
275
|
get type(): string;
|
|
276
|
+
set baseDN(value: any);
|
|
277
|
+
get baseDN(): any;
|
|
278
|
+
set rootDN(value: any);
|
|
279
|
+
get rootDN(): any;
|
|
280
|
+
set uri(value: any);
|
|
281
|
+
get uri(): any;
|
|
282
|
+
_uri: any;
|
|
258
283
|
preparePackages(dir: any): AsyncGenerator<{
|
|
259
284
|
dir: any;
|
|
260
285
|
sources: FileContentProvider[];
|