caa 11.0.1 → 11.0.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/dist/index.d.ts +4 -5
- package/dist/index.js +3 -3
- package/package.json +17 -14
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,12 @@ type CaaOpts = {
|
|
|
7
7
|
servers?: Array<string>;
|
|
8
8
|
dnsSocket?: any;
|
|
9
9
|
};
|
|
10
|
-
type CaaRecord = {
|
|
10
|
+
export type CaaRecord = {
|
|
11
11
|
flags: number;
|
|
12
12
|
tag: string;
|
|
13
13
|
value: string;
|
|
14
14
|
issuerCritical: boolean;
|
|
15
15
|
};
|
|
16
|
-
declare function caa(name: string, opts?: CaaOpts): Promise<Array<CaaRecord>>;
|
|
17
|
-
declare function caaMatches(name: string, ca: string, opts?: CaaOpts): Promise<boolean>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { CaaRecord, caa, caaMatches };
|
|
16
|
+
export declare function caa(name: string, opts?: CaaOpts): Promise<Array<CaaRecord>>;
|
|
17
|
+
export declare function caaMatches(name: string, ca: string, opts?: CaaOpts): Promise<boolean>;
|
|
18
|
+
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1455,7 +1455,7 @@ const defaults = {
|
|
|
1455
1455
|
servers: ["8.8.8.8", "8.8.4.4"]
|
|
1456
1456
|
};
|
|
1457
1457
|
const tldSet = new Set(tlds_default);
|
|
1458
|
-
const knownTags = new Set([
|
|
1458
|
+
const knownTags = /* @__PURE__ */ new Set([
|
|
1459
1459
|
"issue",
|
|
1460
1460
|
"issuewild",
|
|
1461
1461
|
"iodef",
|
|
@@ -1464,7 +1464,7 @@ const knownTags = new Set([
|
|
|
1464
1464
|
"accounturi",
|
|
1465
1465
|
"validationmethods"
|
|
1466
1466
|
]);
|
|
1467
|
-
const okRcodes = new Set(["NXDOMAIN", "NOERROR"]);
|
|
1467
|
+
const okRcodes = /* @__PURE__ */ new Set(["NXDOMAIN", "NOERROR"]);
|
|
1468
1468
|
const isTLD = (name) => tldSet.has(name);
|
|
1469
1469
|
const isWildcard = (name) => name.startsWith("*.");
|
|
1470
1470
|
const parent = (name) => name.split(".").slice(1).join(".");
|
|
@@ -1523,7 +1523,7 @@ async function caaMatches(name, ca, opts = {}) {
|
|
|
1523
1523
|
const issueWildNames = [];
|
|
1524
1524
|
for (const r of records) if (r.tag === "issue") issueNames.push(normalizeName(r.value.split(";")[0].trim()));
|
|
1525
1525
|
else if (r.tag === "issuewild") issueWildNames.push(normalizeName(r.value.split(";")[0].trim()));
|
|
1526
|
-
const names = wildcard
|
|
1526
|
+
const names = wildcard && issueWildNames.length ? issueWildNames : issueNames;
|
|
1527
1527
|
return !names.length || names.includes(ca);
|
|
1528
1528
|
}
|
|
1529
1529
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caa",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "rfc8659-conform CAA record lookup and validation",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/silverwind/caa.git"
|
|
9
|
+
},
|
|
7
10
|
"license": "BSD-2-Clause",
|
|
8
11
|
"type": "module",
|
|
9
12
|
"sideEffects": false,
|
|
@@ -20,20 +23,20 @@
|
|
|
20
23
|
"dns-socket": "^4.2.2"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
|
-
"@types/node": "
|
|
24
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
25
|
-
"eslint": "10.
|
|
26
|
-
"eslint-config-silverwind": "
|
|
26
|
+
"@types/node": "26.6.2",
|
|
27
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
28
|
+
"eslint": "10.11.0",
|
|
29
|
+
"eslint-config-silverwind": "151.0.0",
|
|
27
30
|
"jest-extended": "7.0.0",
|
|
28
31
|
"tlds": "1.261.0",
|
|
29
|
-
"tsdown": "0.
|
|
30
|
-
"tsdown-config-silverwind": "
|
|
32
|
+
"tsdown": "0.23.0",
|
|
33
|
+
"tsdown-config-silverwind": "4.1.1",
|
|
31
34
|
"typescript": "6.0.3",
|
|
32
|
-
"typescript-config-silverwind": "
|
|
33
|
-
"updates": "
|
|
34
|
-
"updates-config-silverwind": "
|
|
35
|
-
"versions": "15.0
|
|
36
|
-
"vitest": "
|
|
37
|
-
"vitest-config-silverwind": "
|
|
35
|
+
"typescript-config-silverwind": "21.0.0",
|
|
36
|
+
"updates": "19.0.0",
|
|
37
|
+
"updates-config-silverwind": "4.0.6",
|
|
38
|
+
"versions": "15.5.0",
|
|
39
|
+
"vitest": "5.0.2",
|
|
40
|
+
"vitest-config-silverwind": "12.0.4"
|
|
38
41
|
}
|
|
39
42
|
}
|