edockit 0.3.0 → 0.4.0-dev.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/CHANGELOG.md +17 -0
- package/README.md +81 -198
- package/TRUSTED-LIST.md +308 -0
- package/dist/certificate-3c9dcdac.js +549 -0
- package/dist/certificate-3c9dcdac.js.map +1 -0
- package/dist/certificate-c7123a37.js +581 -0
- package/dist/certificate-c7123a37.js.map +1 -0
- package/dist/core/canonicalization/XMLCanonicalizer.d.ts +9 -3
- package/dist/core/trustedlist/build.d.ts +41 -0
- package/dist/core/trustedlist/bundled-provider.d.ts +2 -0
- package/dist/core/trustedlist/contract.d.ts +19 -0
- package/dist/core/trustedlist/dom.d.ts +12 -0
- package/dist/core/trustedlist/extract.d.ts +6 -0
- package/dist/core/trustedlist/http.d.ts +8 -0
- package/dist/core/trustedlist/identity.d.ts +7 -0
- package/dist/core/trustedlist/index.d.ts +18 -0
- package/dist/core/trustedlist/loader.d.ts +5 -0
- package/dist/core/trustedlist/matcher.d.ts +11 -0
- package/dist/core/trustedlist/normalize.d.ts +14 -0
- package/dist/core/trustedlist/reference-provider.d.ts +12 -0
- package/dist/core/trustedlist/types.d.ts +114 -0
- package/dist/core/unzip.d.ts +0 -0
- package/dist/core/verification.d.ts +22 -0
- package/dist/data/trusted-list.d.ts +3 -0
- package/dist/identity-c9e5052e.js +410 -0
- package/dist/identity-c9e5052e.js.map +1 -0
- package/dist/identity-fca881b1.js +406 -0
- package/dist/identity-fca881b1.js.map +1 -0
- package/dist/index.cjs.js +540 -8838
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.esm.js +498 -8795
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +23 -17
- package/dist/index.umd.js.map +1 -1
- package/dist/loader-7a0f771f.js +222 -0
- package/dist/loader-7a0f771f.js.map +1 -0
- package/dist/loader-ad1a5051.js +217 -0
- package/dist/loader-ad1a5051.js.map +1 -0
- package/dist/normalize-50862581.js +456 -0
- package/dist/normalize-50862581.js.map +1 -0
- package/dist/normalize-9626be7c.js +479 -0
- package/dist/normalize-9626be7c.js.map +1 -0
- package/dist/reference-provider-3838ebfb.js +217 -0
- package/dist/reference-provider-3838ebfb.js.map +1 -0
- package/dist/reference-provider-9bbbaab8.js +211 -0
- package/dist/reference-provider-9bbbaab8.js.map +1 -0
- package/dist/trusted-list-build.cjs.js +580 -0
- package/dist/trusted-list-build.cjs.js.map +1 -0
- package/dist/trusted-list-build.d.ts +4 -0
- package/dist/trusted-list-build.esm.js +569 -0
- package/dist/trusted-list-build.esm.js.map +1 -0
- package/dist/trusted-list-bundled.cjs.js +30439 -0
- package/dist/trusted-list-bundled.cjs.js.map +1 -0
- package/dist/trusted-list-bundled.d.ts +1 -0
- package/dist/trusted-list-bundled.esm.js +30435 -0
- package/dist/trusted-list-bundled.esm.js.map +1 -0
- package/dist/trusted-list-http.cjs.js +85 -0
- package/dist/trusted-list-http.cjs.js.map +1 -0
- package/dist/trusted-list-http.d.ts +1 -0
- package/dist/trusted-list-http.esm.js +81 -0
- package/dist/trusted-list-http.esm.js.map +1 -0
- package/dist/trusted-list.cjs.js +38 -0
- package/dist/trusted-list.cjs.js.map +1 -0
- package/dist/trusted-list.d.ts +9 -0
- package/dist/trusted-list.esm.js +13 -0
- package/dist/trusted-list.esm.js.map +1 -0
- package/package.json +32 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* MIT License
|
|
3
|
+
* Copyright (c) 2025 Edgars Jēkabsons, ZenomyTech SIA
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
function normalizeRequestHeaders(headersInit) {
|
|
10
|
+
const headers = {};
|
|
11
|
+
if (!headersInit) {
|
|
12
|
+
return headers;
|
|
13
|
+
}
|
|
14
|
+
if (Array.isArray(headersInit)) {
|
|
15
|
+
for (const [key, value] of headersInit) {
|
|
16
|
+
headers[key.toLowerCase()] = value;
|
|
17
|
+
}
|
|
18
|
+
return headers;
|
|
19
|
+
}
|
|
20
|
+
if (typeof Headers !== "undefined" && headersInit instanceof Headers) {
|
|
21
|
+
headersInit.forEach((value, key) => {
|
|
22
|
+
headers[key.toLowerCase()] = value;
|
|
23
|
+
});
|
|
24
|
+
return headers;
|
|
25
|
+
}
|
|
26
|
+
if (typeof headersInit.forEach === "function") {
|
|
27
|
+
headersInit.forEach((value, key) => {
|
|
28
|
+
headers[key.toLowerCase()] = value;
|
|
29
|
+
});
|
|
30
|
+
return headers;
|
|
31
|
+
}
|
|
32
|
+
for (const [key, value] of Object.entries(headersInit)) {
|
|
33
|
+
headers[key.toLowerCase()] = value;
|
|
34
|
+
}
|
|
35
|
+
return headers;
|
|
36
|
+
}
|
|
37
|
+
function createRemoteTrustListProvider(options) {
|
|
38
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
39
|
+
if (!fetchImpl) {
|
|
40
|
+
throw new Error("No fetch implementation available to create remote trust-list provider");
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
async match(query) {
|
|
44
|
+
const timeoutMs = typeof options.timeout === "number" && options.timeout > 0 ? options.timeout : undefined;
|
|
45
|
+
const controller = timeoutMs ? new AbortController() : null;
|
|
46
|
+
const timeoutId = controller
|
|
47
|
+
? setTimeout(() => {
|
|
48
|
+
controller.abort();
|
|
49
|
+
}, timeoutMs)
|
|
50
|
+
: null;
|
|
51
|
+
try {
|
|
52
|
+
const response = await fetchImpl(options.url, {
|
|
53
|
+
method: "POST",
|
|
54
|
+
headers: {
|
|
55
|
+
...normalizeRequestHeaders(options.headers),
|
|
56
|
+
"content-type": "application/json",
|
|
57
|
+
},
|
|
58
|
+
body: JSON.stringify(query),
|
|
59
|
+
signal: controller?.signal,
|
|
60
|
+
});
|
|
61
|
+
if (!response.ok) {
|
|
62
|
+
throw new Error(`Trust-list API failed: HTTP ${response.status}`);
|
|
63
|
+
}
|
|
64
|
+
return response.json();
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (timeoutMs &&
|
|
68
|
+
controller?.signal.aborted &&
|
|
69
|
+
error instanceof Error &&
|
|
70
|
+
error.name === "AbortError") {
|
|
71
|
+
throw new Error(`Trust-list API timed out after ${timeoutMs} ms`);
|
|
72
|
+
}
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
if (timeoutId) {
|
|
77
|
+
clearTimeout(timeoutId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
exports.createRemoteTrustListProvider = createRemoteTrustListProvider;
|
|
85
|
+
//# sourceMappingURL=trusted-list-http.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-list-http.cjs.js","sources":["../src/core/trustedlist/http.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AASA,SAAS,uBAAuB,CAAC,WAAyB,EAAA;IACxD,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,IAAI,CAAC,WAAW,EAAE;AAChB,QAAA,OAAO,OAAO,CAAC;KAChB;AAED,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE;YACtC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;SACpC;AACD,QAAA,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,WAAW,YAAY,OAAO,EAAE;QACpE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,KAAI;YACjC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;AACrC,SAAC,CA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,MAAM;AACd,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,uBAAuB,CAAC,OAAO,CAAC,OAAO,CAAC;AAC3C,wBAAA,cAAc,EAAE,kBAAkB;AACnC,qBAAA;AACD,oBAAA,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;oBAC3B,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,iBAAA,CAAC,CAAC;AAEH,gBAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChB,MAAM,IAAI,KAAK,CAAC,CAAA,4BAAA,EAA+B,QAAQ,CAAC,MAAM,CAAE,CAAA,CAAC,CAAC;iBACnE;AAED,gBAAA,OAAO,QAAQ,CAAC,IAAI,EAA6B,CAAC;aACnD;YAAC,OAAO,KAAK,EAAE;AACd,gBAAA,IACE,SAAS;oBACT,UAAU,EAAE,MAAM,CAAC,OAAO;AAC1B,oBAAA,KAAK,YAAY,KAAK;AACtB,oBAAA,KAAK,CAAC,IAAI,KAAK,YAAY,EAC3B;AACA,oBAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,SAAS,CAAA,GAAA,CAAK,CAAC,CAAC;iBACnE;AAED,gBAAA,MAAM,KAAK,CAAC;aACb;oBAAS;gBACR,IAAI,SAAS,EAAE;oBACb,YAAY,CAAC,SAAS,CAAC,CAAC;iBACzB;aACF;SACF;KACF,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./core/trustedlist/http";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* MIT License
|
|
3
|
+
* Copyright (c) 2025 Edgars Jēkabsons, ZenomyTech SIA
|
|
4
|
+
*/
|
|
5
|
+
function normalizeRequestHeaders(headersInit) {
|
|
6
|
+
const headers = {};
|
|
7
|
+
if (!headersInit) {
|
|
8
|
+
return headers;
|
|
9
|
+
}
|
|
10
|
+
if (Array.isArray(headersInit)) {
|
|
11
|
+
for (const [key, value] of headersInit) {
|
|
12
|
+
headers[key.toLowerCase()] = value;
|
|
13
|
+
}
|
|
14
|
+
return headers;
|
|
15
|
+
}
|
|
16
|
+
if (typeof Headers !== "undefined" && headersInit instanceof Headers) {
|
|
17
|
+
headersInit.forEach((value, key) => {
|
|
18
|
+
headers[key.toLowerCase()] = value;
|
|
19
|
+
});
|
|
20
|
+
return headers;
|
|
21
|
+
}
|
|
22
|
+
if (typeof headersInit.forEach === "function") {
|
|
23
|
+
headersInit.forEach((value, key) => {
|
|
24
|
+
headers[key.toLowerCase()] = value;
|
|
25
|
+
});
|
|
26
|
+
return headers;
|
|
27
|
+
}
|
|
28
|
+
for (const [key, value] of Object.entries(headersInit)) {
|
|
29
|
+
headers[key.toLowerCase()] = value;
|
|
30
|
+
}
|
|
31
|
+
return headers;
|
|
32
|
+
}
|
|
33
|
+
function createRemoteTrustListProvider(options) {
|
|
34
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
35
|
+
if (!fetchImpl) {
|
|
36
|
+
throw new Error("No fetch implementation available to create remote trust-list provider");
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
async match(query) {
|
|
40
|
+
const timeoutMs = typeof options.timeout === "number" && options.timeout > 0 ? options.timeout : undefined;
|
|
41
|
+
const controller = timeoutMs ? new AbortController() : null;
|
|
42
|
+
const timeoutId = controller
|
|
43
|
+
? setTimeout(() => {
|
|
44
|
+
controller.abort();
|
|
45
|
+
}, timeoutMs)
|
|
46
|
+
: null;
|
|
47
|
+
try {
|
|
48
|
+
const response = await fetchImpl(options.url, {
|
|
49
|
+
method: "POST",
|
|
50
|
+
headers: {
|
|
51
|
+
...normalizeRequestHeaders(options.headers),
|
|
52
|
+
"content-type": "application/json",
|
|
53
|
+
},
|
|
54
|
+
body: JSON.stringify(query),
|
|
55
|
+
signal: controller?.signal,
|
|
56
|
+
});
|
|
57
|
+
if (!response.ok) {
|
|
58
|
+
throw new Error(`Trust-list API failed: HTTP ${response.status}`);
|
|
59
|
+
}
|
|
60
|
+
return response.json();
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (timeoutMs &&
|
|
64
|
+
controller?.signal.aborted &&
|
|
65
|
+
error instanceof Error &&
|
|
66
|
+
error.name === "AbortError") {
|
|
67
|
+
throw new Error(`Trust-list API timed out after ${timeoutMs} ms`);
|
|
68
|
+
}
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
if (timeoutId) {
|
|
73
|
+
clearTimeout(timeoutId);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { createRemoteTrustListProvider };
|
|
81
|
+
//# sourceMappingURL=trusted-list-http.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-list-http.esm.js","sources":["../src/core/trustedlist/http.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AASA,SAAS,uBAAuB,CAAC,WAAyB,EAAA;IACxD,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,IAAI,CAAC,WAAW,EAAE;AAChB,QAAA,OAAO,OAAO,CAAC;KAChB;AAED,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE;YACtC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;SACpC;AACD,QAAA,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,WAAW,YAAY,OAAO,EAAE;QACpE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,KAAI;YACjC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;AACrC,SAAC,CAAC,CAAC;AACH,QAAA,OAAO,OAAO,CAAC;KAChB;AAED,IAA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AuB,CAAC,OAAO,CAAC,OAAO,CAAC;AAC3C,wBAAA,cAAc,EAAE,kBAAkB;AACnC,qBAAA;AACD,oBAAA,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;oBAC3B,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,iBAAA,CAAC,CAAC;AAEH,gBAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChB,MAAM,IAAI,KAAK,CAAC,CAAA,4BAAA,EAA+B,QAAQ,CAAC,MAAM,CAAE,CAAA,CAAC,CAAC;iBACnE;AAED,gBAAA,OAAO,QAAQ,CAAC,IAAI,EAA6B,CAAC;aACnD;YAAC,OAAO,KAAK,EAAE;AACd,gBAAA,IACE,SAAS;oBACT,UAAU,EAAE,MAAM,CAAC,OAAO;AAC1B,oBAAA,KAAK,YAAY,KAAK;AACtB,oBAAA,KAAK,CAAC,IAAI,KAAK,YAAY,EAC3B;AACA,oBAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,SAAS,CAAA,GAAA,CAAK,CAAC,CAAC;iBACnE;AAED,gBAAA,MAAM,KAAK,CAAC;aACb;oBAAS;gBACR,IAAI,SAAS,EAAE;oBACb,YAAY,CAAC,SAAS,CAAC,CAAC;iBACzB;aACF;SACF;KACF,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* MIT License
|
|
3
|
+
* Copyright (c) 2025 Edgars Jēkabsons, ZenomyTech SIA
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
var normalize = require('./normalize-9626be7c.js');
|
|
10
|
+
var identity = require('./identity-c9e5052e.js');
|
|
11
|
+
var loader = require('./loader-7a0f771f.js');
|
|
12
|
+
var referenceProvider = require('./reference-provider-3838ebfb.js');
|
|
13
|
+
require('@peculiar/x509');
|
|
14
|
+
require('@peculiar/asn1-schema');
|
|
15
|
+
require('@peculiar/asn1-ocsp');
|
|
16
|
+
require('@peculiar/asn1-x509');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.base64UrlToHex = normalize.base64UrlToHex;
|
|
21
|
+
exports.getTrustListPurposeMaskForQueryPurpose = normalize.getTrustListPurposeMaskForQueryPurpose;
|
|
22
|
+
exports.getTrustListPurposeMaskForServiceType = normalize.getTrustListPurposeMaskForServiceType;
|
|
23
|
+
exports.hexToBase64Url = normalize.hexToBase64Url;
|
|
24
|
+
exports.isTrustedServiceStatus = normalize.isTrustedServiceStatus;
|
|
25
|
+
exports.normalizeDistinguishedName = normalize.normalizeDistinguishedName;
|
|
26
|
+
exports.normalizeHex = normalize.normalizeHex;
|
|
27
|
+
exports.normalizeKeyIdentifier = normalize.normalizeKeyIdentifier;
|
|
28
|
+
exports.trustListPurposeMatchesMask = normalize.trustListPurposeMatchesMask;
|
|
29
|
+
exports.extractCertificateIdentityFromCertificate = identity.extractCertificateIdentityFromCertificate;
|
|
30
|
+
exports.extractIssuerIdentityFromCertificate = identity.extractIssuerIdentityFromCertificate;
|
|
31
|
+
exports.buildTrustedListData = loader.buildTrustedListData;
|
|
32
|
+
exports.createEmptyTrustedListBundle = loader.createEmptyTrustedListBundle;
|
|
33
|
+
exports.createTrustListProvider = referenceProvider.createTrustListProvider;
|
|
34
|
+
exports.matchCertificateIssuerToTrustedList = referenceProvider.matchCertificateIssuerToTrustedList;
|
|
35
|
+
exports.matchCertificateToTrustedList = referenceProvider.matchCertificateToTrustedList;
|
|
36
|
+
exports.matchIssuerIdentityToTrustedList = referenceProvider.matchIssuerIdentityToTrustedList;
|
|
37
|
+
exports.matchTrustListQuery = referenceProvider.matchTrustListQuery;
|
|
38
|
+
//# sourceMappingURL=trusted-list.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-list.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { TrustListMatch, TrustListProvider, TrustListQuery, TrustListQueryPurpose, TrustMatchConfidence, } from "./core/trustedlist/contract";
|
|
2
|
+
export { base64UrlToHex, getTrustListPurposeMaskForQueryPurpose, getTrustListPurposeMaskForServiceType, hexToBase64Url, isTrustedServiceStatus, normalizeDistinguishedName, normalizeHex, normalizeKeyIdentifier, trustListPurposeMatchesMask, } from "./core/trustedlist/normalize";
|
|
3
|
+
export { extractCertificateIdentityFromCertificate, extractIssuerIdentityFromCertificate, } from "./core/trustedlist/identity";
|
|
4
|
+
export { buildTrustedListData, createEmptyTrustedListBundle } from "./core/trustedlist/loader";
|
|
5
|
+
export { matchCertificateIssuerToTrustedList, matchCertificateToTrustedList, matchIssuerIdentityToTrustedList, matchTrustListQuery, } from "./core/trustedlist/matcher";
|
|
6
|
+
export type { MatchCertificateIssuerToTrustedListOptions } from "./core/trustedlist/matcher";
|
|
7
|
+
export { createTrustListProvider } from "./core/trustedlist/reference-provider";
|
|
8
|
+
export type { CreateTrustListProviderFromDataOptions, CreateTrustListProviderFromUrlOptions, CreateTrustListProviderOptions, } from "./core/trustedlist/reference-provider";
|
|
9
|
+
export type { CertificateIdentity, CompactTrustedInterval, CompactTrustedListBundle, CompactTrustedListSource, CompactTrustedService, IssuerIdentity, MatchCertificateToTrustedListOptions, MatchIssuerOptions, TrustListPurposeMask, TrustedListData, TrustedListEntry, TrustedListIndexes, TrustedListSource, TrustedTrustInterval, } from "./core/trustedlist/types";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* MIT License
|
|
3
|
+
* Copyright (c) 2025 Edgars Jēkabsons, ZenomyTech SIA
|
|
4
|
+
*/
|
|
5
|
+
export { k as base64UrlToHex, l as getTrustListPurposeMaskForQueryPurpose, m as getTrustListPurposeMaskForServiceType, o as hexToBase64Url, p as isTrustedServiceStatus, n as normalizeDistinguishedName, q as normalizeHex, j as normalizeKeyIdentifier, t as trustListPurposeMatchesMask } from './normalize-50862581.js';
|
|
6
|
+
export { a as extractCertificateIdentityFromCertificate, e as extractIssuerIdentityFromCertificate } from './identity-fca881b1.js';
|
|
7
|
+
export { b as buildTrustedListData, c as createEmptyTrustedListBundle } from './loader-ad1a5051.js';
|
|
8
|
+
export { d as createTrustListProvider, m as matchCertificateIssuerToTrustedList, a as matchCertificateToTrustedList, b as matchIssuerIdentityToTrustedList, c as matchTrustListQuery } from './reference-provider-9bbbaab8.js';
|
|
9
|
+
import '@peculiar/x509';
|
|
10
|
+
import '@peculiar/asn1-schema';
|
|
11
|
+
import '@peculiar/asn1-ocsp';
|
|
12
|
+
import '@peculiar/asn1-x509';
|
|
13
|
+
//# sourceMappingURL=trusted-list.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-list.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edockit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-dev.1",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest --silent",
|
|
7
7
|
"test:verbose": "jest",
|
|
8
8
|
"test:watch": "jest --watch",
|
|
9
|
-
"build": "
|
|
9
|
+
"build": "node scripts/build-dist.mjs && tsc --emitDeclarationOnly",
|
|
10
10
|
"dev": "rollup -c -w",
|
|
11
11
|
"start": "node dist/index.js",
|
|
12
12
|
"clean": "rimraf dist",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"test:integration:verbose": "jest tests/integration",
|
|
18
18
|
"test:browser": "web-test-runner",
|
|
19
19
|
"test:browser:all": "ALL_BROWSERS=true web-test-runner",
|
|
20
|
+
"update-trusted-list": "tsx scripts/update-trusted-list.ts",
|
|
20
21
|
"format": "prettier --write '**/*.{ts,js}'",
|
|
21
22
|
"format:check": "prettier --check '**/*.{ts,js}'"
|
|
22
23
|
},
|
|
@@ -63,16 +64,45 @@
|
|
|
63
64
|
"rollup": "^2.79.2",
|
|
64
65
|
"rollup-plugin-esbuild": "^6.2.1",
|
|
65
66
|
"simple-git-hooks": "^2.13.1",
|
|
67
|
+
"tsx": "^4.20.6",
|
|
66
68
|
"ts-jest": "^29.2.6",
|
|
67
69
|
"typescript": "^5.8.2"
|
|
68
70
|
},
|
|
69
71
|
"module": "dist/index.esm.js",
|
|
70
72
|
"browser": "dist/index.umd.js",
|
|
71
73
|
"types": "dist/index.d.ts",
|
|
74
|
+
"exports": {
|
|
75
|
+
".": {
|
|
76
|
+
"types": "./dist/index.d.ts",
|
|
77
|
+
"import": "./dist/index.esm.js",
|
|
78
|
+
"require": "./dist/index.cjs.js"
|
|
79
|
+
},
|
|
80
|
+
"./trusted-list": {
|
|
81
|
+
"types": "./dist/trusted-list.d.ts",
|
|
82
|
+
"import": "./dist/trusted-list.esm.js",
|
|
83
|
+
"require": "./dist/trusted-list.cjs.js"
|
|
84
|
+
},
|
|
85
|
+
"./trusted-list/build": {
|
|
86
|
+
"types": "./dist/trusted-list-build.d.ts",
|
|
87
|
+
"import": "./dist/trusted-list-build.esm.js",
|
|
88
|
+
"require": "./dist/trusted-list-build.cjs.js"
|
|
89
|
+
},
|
|
90
|
+
"./trusted-list/bundled": {
|
|
91
|
+
"types": "./dist/trusted-list-bundled.d.ts",
|
|
92
|
+
"import": "./dist/trusted-list-bundled.esm.js",
|
|
93
|
+
"require": "./dist/trusted-list-bundled.cjs.js"
|
|
94
|
+
},
|
|
95
|
+
"./trusted-list/http": {
|
|
96
|
+
"types": "./dist/trusted-list-http.d.ts",
|
|
97
|
+
"import": "./dist/trusted-list-http.esm.js",
|
|
98
|
+
"require": "./dist/trusted-list-http.cjs.js"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
72
101
|
"files": [
|
|
73
102
|
"dist",
|
|
74
103
|
"LICENSE",
|
|
75
104
|
"README.md",
|
|
105
|
+
"TRUSTED-LIST.md",
|
|
76
106
|
"CHANGELOG.md"
|
|
77
107
|
],
|
|
78
108
|
"repository": {
|