pmcf 4.3.0 → 4.4.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/README.md +3 -3
- package/package.json +2 -2
- package/src/base.mjs +1 -1
- package/src/cluster.mjs +3 -2
- package/src/dns-utils.mjs +1 -1
- package/src/endpoint.mjs +8 -0
- package/src/service-types.mjs +3 -0
- package/src/services/openldap.mjs +6 -11
- package/types/cluster.d.mts +42 -2
- package/types/endpoint.d.mts +2 -0
- package/types/service-types.d.mts +7 -0
- package/types/services/openldap.d.mts +23 -8
package/README.md
CHANGED
|
@@ -181,9 +181,9 @@ Endpoint based on http
|
|
|
181
181
|
|
|
182
182
|
### Parameters
|
|
183
183
|
|
|
184
|
-
* `service`
|
|
185
|
-
* `address`
|
|
186
|
-
* `data`
|
|
184
|
+
* `service` **Service** 
|
|
185
|
+
* `address` **any** 
|
|
186
|
+
* `data` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
187
187
|
|
|
188
188
|
### port
|
|
189
189
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"package-directory": "^8.1.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/node": "^25.0.
|
|
62
|
+
"@types/node": "^25.0.7",
|
|
63
63
|
"ava": "^6.4.1",
|
|
64
64
|
"c8": "^10.1.3",
|
|
65
65
|
"documentation": "^14.0.3",
|
package/src/base.mjs
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
default_attribute_writable,
|
|
5
5
|
default_attribute,
|
|
6
6
|
number_attribute_writable,
|
|
7
|
+
duration_attribute_writable,
|
|
7
8
|
addType
|
|
8
9
|
} from "pacc";
|
|
9
10
|
import { Owner } from "./owner.mjs";
|
|
@@ -17,7 +18,7 @@ const ClusterTypeDefinition = {
|
|
|
17
18
|
extends: Host.typeDefinition,
|
|
18
19
|
key: "name",
|
|
19
20
|
attributes: {
|
|
20
|
-
routerId: number_attribute_writable,
|
|
21
|
+
routerId: { ...number_attribute_writable, default: 100 },
|
|
21
22
|
masters: {
|
|
22
23
|
...default_attribute_writable,
|
|
23
24
|
type: "network_interface",
|
|
@@ -33,7 +34,7 @@ const ClusterTypeDefinition = {
|
|
|
33
34
|
type: "network_interface",
|
|
34
35
|
collection: true
|
|
35
36
|
},
|
|
36
|
-
checkInterval:
|
|
37
|
+
checkInterval: { ...duration_attribute_writable, default: 60 }
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
|
package/src/dns-utils.mjs
CHANGED
package/src/endpoint.mjs
CHANGED
|
@@ -182,6 +182,7 @@ export class UnixEndpoint extends BaseEndpoint {
|
|
|
182
182
|
constructor(service, path, data) {
|
|
183
183
|
super(service, data);
|
|
184
184
|
this.path = path;
|
|
185
|
+
this.scheme = data.scheme;
|
|
185
186
|
}
|
|
186
187
|
|
|
187
188
|
get family() {
|
|
@@ -196,6 +197,13 @@ export class UnixEndpoint extends BaseEndpoint {
|
|
|
196
197
|
return this.path;
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
get url()
|
|
201
|
+
{
|
|
202
|
+
if(this.scheme) {
|
|
203
|
+
return `${this.scheme}://${this.path}`;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
199
207
|
toString() {
|
|
200
208
|
return `${this.type}:${this.family}:${this.path}`;
|
|
201
209
|
}
|
package/src/service-types.mjs
CHANGED
|
@@ -68,6 +68,9 @@ export const ServiceTypes = {
|
|
|
68
68
|
{ family: "IPv6", protocol: "tcp", port: 636, tls: true }
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
|
+
ldapi: {
|
|
72
|
+
endpoints: [{ family: "unix", scheme: "ldapi", path: "/run/ldapi" }]
|
|
73
|
+
},
|
|
71
74
|
http: {
|
|
72
75
|
endpoints: [
|
|
73
76
|
{ family: "IPv4", protocol: "tcp", port: 80, tls: false },
|
|
@@ -39,23 +39,18 @@ const OpenLDAPServiceTypeDefinition = {
|
|
|
39
39
|
...number_attribute_writable,
|
|
40
40
|
configurable: true,
|
|
41
41
|
default: 524288
|
|
42
|
+
},
|
|
43
|
+
txn_checkpoint: {
|
|
44
|
+
...string_attribute_writable,
|
|
45
|
+
configurable: true
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
},
|
|
46
50
|
service: {
|
|
47
51
|
systemdService: "slapd.service",
|
|
48
|
-
extends: ["ldap"],
|
|
49
|
-
services: {
|
|
50
|
-
ldap: {
|
|
51
|
-
endpoints: [
|
|
52
|
-
{
|
|
53
|
-
family: "unix",
|
|
54
|
-
path: "/run/ldapi"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
52
|
+
extends: ["ldap", "ldapi"],
|
|
53
|
+
services: {}
|
|
59
54
|
}
|
|
60
55
|
};
|
|
61
56
|
|
package/types/cluster.d.mts
CHANGED
|
@@ -366,7 +366,27 @@ export class Cluster extends Host {
|
|
|
366
366
|
};
|
|
367
367
|
key: string;
|
|
368
368
|
attributes: {
|
|
369
|
-
routerId:
|
|
369
|
+
routerId: {
|
|
370
|
+
default: number;
|
|
371
|
+
type: object;
|
|
372
|
+
isKey: boolean;
|
|
373
|
+
writable: boolean;
|
|
374
|
+
mandatory: boolean;
|
|
375
|
+
collection: boolean;
|
|
376
|
+
private?: boolean;
|
|
377
|
+
credential?: boolean;
|
|
378
|
+
persistent?: boolean;
|
|
379
|
+
depends?: string;
|
|
380
|
+
description?: string;
|
|
381
|
+
set?: Function;
|
|
382
|
+
get?: Function;
|
|
383
|
+
toInternal?: Function;
|
|
384
|
+
toExternal?: Function;
|
|
385
|
+
values?: Set<any>;
|
|
386
|
+
externalName?: string;
|
|
387
|
+
env?: string[] | string;
|
|
388
|
+
additionalValues?: object;
|
|
389
|
+
};
|
|
370
390
|
masters: {
|
|
371
391
|
type: string;
|
|
372
392
|
collection: boolean;
|
|
@@ -430,7 +450,27 @@ export class Cluster extends Host {
|
|
|
430
450
|
env?: string[] | string;
|
|
431
451
|
additionalValues?: object;
|
|
432
452
|
};
|
|
433
|
-
checkInterval:
|
|
453
|
+
checkInterval: {
|
|
454
|
+
default: number;
|
|
455
|
+
type: object;
|
|
456
|
+
isKey: boolean;
|
|
457
|
+
writable: boolean;
|
|
458
|
+
mandatory: boolean;
|
|
459
|
+
collection: boolean;
|
|
460
|
+
private?: boolean;
|
|
461
|
+
credential?: boolean;
|
|
462
|
+
persistent?: boolean;
|
|
463
|
+
depends?: string;
|
|
464
|
+
description?: string;
|
|
465
|
+
set?: Function;
|
|
466
|
+
get?: Function;
|
|
467
|
+
toInternal?: Function;
|
|
468
|
+
toExternal?: Function;
|
|
469
|
+
values?: Set<any>;
|
|
470
|
+
externalName?: string;
|
|
471
|
+
env?: string[] | string;
|
|
472
|
+
additionalValues?: object;
|
|
473
|
+
};
|
|
434
474
|
};
|
|
435
475
|
};
|
|
436
476
|
_masters: any[];
|
package/types/endpoint.d.mts
CHANGED
|
@@ -46,9 +46,11 @@ export class HTTPEndpoint extends BaseEndpoint {
|
|
|
46
46
|
export class UnixEndpoint extends BaseEndpoint {
|
|
47
47
|
constructor(service: any, path: any, data: any);
|
|
48
48
|
path: any;
|
|
49
|
+
scheme: any;
|
|
49
50
|
get family(): string;
|
|
50
51
|
get host(): any;
|
|
51
52
|
get address(): any;
|
|
53
|
+
get url(): string;
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
56
|
* Endpoint with an ip port
|
|
@@ -814,6 +814,28 @@ export class OpenLDAPService extends Service {
|
|
|
814
814
|
env?: string[] | string;
|
|
815
815
|
additionalValues?: object;
|
|
816
816
|
};
|
|
817
|
+
txn_checkpoint: {
|
|
818
|
+
configurable: boolean;
|
|
819
|
+
type: object;
|
|
820
|
+
isKey: boolean;
|
|
821
|
+
writable: boolean;
|
|
822
|
+
mandatory: boolean;
|
|
823
|
+
collection: boolean;
|
|
824
|
+
private?: boolean;
|
|
825
|
+
credential?: boolean;
|
|
826
|
+
persistent?: boolean;
|
|
827
|
+
depends?: string;
|
|
828
|
+
description?: string;
|
|
829
|
+
default?: any;
|
|
830
|
+
set?: Function;
|
|
831
|
+
get?: Function;
|
|
832
|
+
toInternal?: Function;
|
|
833
|
+
toExternal?: Function;
|
|
834
|
+
values?: Set<any>;
|
|
835
|
+
externalName?: string;
|
|
836
|
+
env?: string[] | string;
|
|
837
|
+
additionalValues?: object;
|
|
838
|
+
};
|
|
817
839
|
};
|
|
818
840
|
type: object;
|
|
819
841
|
isKey: boolean;
|
|
@@ -839,14 +861,7 @@ export class OpenLDAPService extends Service {
|
|
|
839
861
|
service: {
|
|
840
862
|
systemdService: string;
|
|
841
863
|
extends: string[];
|
|
842
|
-
services: {
|
|
843
|
-
ldap: {
|
|
844
|
-
endpoints: {
|
|
845
|
-
family: string;
|
|
846
|
-
path: string;
|
|
847
|
-
}[];
|
|
848
|
-
};
|
|
849
|
-
};
|
|
864
|
+
services: {};
|
|
850
865
|
};
|
|
851
866
|
};
|
|
852
867
|
DB_CONFIG: {};
|