pmcf 4.5.0 → 4.5.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/package.json
CHANGED
|
@@ -8,9 +8,8 @@ import {
|
|
|
8
8
|
} from "pacc";
|
|
9
9
|
import { addServiceType } from "pmcf";
|
|
10
10
|
import { ServiceTypeDefinition, Service } from "../service.mjs";
|
|
11
|
-
import { writeLines, filterConfigurable } from "../utils.mjs";
|
|
12
11
|
import { addHook } from "../hooks.mjs";
|
|
13
|
-
import { createExpressionTransformer } from "content-entry-transform";
|
|
12
|
+
import { createExpressionTransformer, transform } from "content-entry-transform";
|
|
14
13
|
|
|
15
14
|
const OpenLDAPServiceTypeDefinition = {
|
|
16
15
|
name: "openldap",
|
|
@@ -65,7 +64,6 @@ export class OpenLDAPService extends Service {
|
|
|
65
64
|
return OpenLDAPServiceTypeDefinition;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
DB_CONFIG = {};
|
|
69
67
|
_baseDN;
|
|
70
68
|
_rootDN;
|
|
71
69
|
|
|
@@ -114,19 +112,18 @@ export class OpenLDAPService extends Service {
|
|
|
114
112
|
group
|
|
115
113
|
};
|
|
116
114
|
const transformers = [
|
|
117
|
-
createExpressionTransformer(e => true, { base:
|
|
115
|
+
createExpressionTransformer(e => true, { base: this.baseDN, uri: this.uri })
|
|
118
116
|
];
|
|
119
117
|
|
|
120
118
|
const templateDirs = [];
|
|
121
119
|
for (const e of [...this.allExtends(), this]) {
|
|
122
120
|
const base = join(e.directory, "content") + "/";
|
|
123
|
-
console.log("TEMPLATE", e.fullName, base);
|
|
124
121
|
templateDirs.push(
|
|
125
|
-
new FileContentProvider(
|
|
122
|
+
transform(new FileContentProvider(
|
|
126
123
|
{ transformers, base },
|
|
127
124
|
entryProperties,
|
|
128
125
|
directoryProperties
|
|
129
|
-
)
|
|
126
|
+
), transformers)
|
|
130
127
|
);
|
|
131
128
|
}
|
|
132
129
|
|
|
@@ -158,38 +155,6 @@ export class OpenLDAPService extends Service {
|
|
|
158
155
|
`setfacl -m u:${owner}:r /etc/letsencrypt/archive/*/privkey*.pem`
|
|
159
156
|
);
|
|
160
157
|
|
|
161
|
-
await writeLines(
|
|
162
|
-
join(packageData.dir, "etc/conf.d"),
|
|
163
|
-
"slapd",
|
|
164
|
-
this.expand([
|
|
165
|
-
"SLAPD_OPTIONS=",
|
|
166
|
-
"SLAPD_URLS=ldap:/// ldaps:/// ldapi://%2Frun%2Fldapi"
|
|
167
|
-
])
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
await writeLines(
|
|
171
|
-
join(packageData.dir, "/var/lib/openldap/openldap-data"),
|
|
172
|
-
"DB_CONFIG",
|
|
173
|
-
|
|
174
|
-
/*
|
|
175
|
-
...[...this.propertyIterator(filterConfigurable)].map(
|
|
176
|
-
([name, value]) => `${name} ${value}`
|
|
177
|
-
)
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
this.expand([
|
|
181
|
-
"set_cachesize 0 16777216 1",
|
|
182
|
-
"set_lg_regionmax 65536",
|
|
183
|
-
"set_lg_bsize 524288"
|
|
184
|
-
])
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
await writeLines(
|
|
188
|
-
join(packageData.dir, "etc/openldap"),
|
|
189
|
-
"ldap.conf",
|
|
190
|
-
this.expand([`BASE ${this.baseDN}`, `URI ${this.uri}`])
|
|
191
|
-
);
|
|
192
|
-
|
|
193
158
|
yield packageData;
|
|
194
159
|
}
|
|
195
160
|
}
|
|
@@ -864,7 +864,6 @@ export class OpenLDAPService extends Service {
|
|
|
864
864
|
services: {};
|
|
865
865
|
};
|
|
866
866
|
};
|
|
867
|
-
DB_CONFIG: {};
|
|
868
867
|
_baseDN: any;
|
|
869
868
|
_rootDN: any;
|
|
870
869
|
get type(): string;
|
|
@@ -877,7 +876,7 @@ export class OpenLDAPService extends Service {
|
|
|
877
876
|
_uri: any;
|
|
878
877
|
preparePackages(dir: any): AsyncGenerator<{
|
|
879
878
|
dir: any;
|
|
880
|
-
sources:
|
|
879
|
+
sources: any[];
|
|
881
880
|
outputs: Set<typeof import("npm-pkgbuild").OCI | typeof import("npm-pkgbuild").DOCKER>;
|
|
882
881
|
properties: {
|
|
883
882
|
name: string;
|
|
@@ -889,4 +888,3 @@ export class OpenLDAPService extends Service {
|
|
|
889
888
|
}, void, unknown>;
|
|
890
889
|
}
|
|
891
890
|
import { Service } from "../service.mjs";
|
|
892
|
-
import { FileContentProvider } from "npm-pkgbuild";
|