@aws-sdk/util-dns 3.714.0 → 3.731.0

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.
@@ -14,6 +14,12 @@ const DNS_LOOKUP_OPTIONS = {
14
14
  verbatim: true,
15
15
  };
16
16
  class NodeDnsLookupHostResolver {
17
+ static DEFAULT_TTL_MS = 30000;
18
+ static createDefaultCacheProvider = () => new HostEntryTable_1.HostEntryTable();
19
+ static DEFAULT_NODE_DNS_LOOKUP = dns_1.promises.lookup;
20
+ ttlMs;
21
+ cache;
22
+ nodeDnsLookup;
17
23
  constructor({ ttlMs = NodeDnsLookupHostResolver.DEFAULT_TTL_MS, cache = NodeDnsLookupHostResolver.createDefaultCacheProvider(), nodeDnsLookup = NodeDnsLookupHostResolver.DEFAULT_NODE_DNS_LOOKUP, } = {}) {
18
24
  this.ttlMs = ttlMs;
19
25
  this.cache = cache;
@@ -83,6 +89,3 @@ class NodeDnsLookupHostResolver {
83
89
  }
84
90
  }
85
91
  exports.NodeDnsLookupHostResolver = NodeDnsLookupHostResolver;
86
- NodeDnsLookupHostResolver.DEFAULT_TTL_MS = 30000;
87
- NodeDnsLookupHostResolver.createDefaultCacheProvider = () => new HostEntryTable_1.HostEntryTable();
88
- NodeDnsLookupHostResolver.DEFAULT_NODE_DNS_LOOKUP = dns_1.promises.lookup;
@@ -2,9 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HostAddressEntryCollection = void 0;
4
4
  class HostAddressEntryCollection {
5
- constructor() {
6
- this.data = [];
7
- }
5
+ data = [];
8
6
  get length() {
9
7
  return this.data.length;
10
8
  }
@@ -4,6 +4,11 @@ exports.HostEntry = void 0;
4
4
  const types_1 = require("@aws-sdk/types");
5
5
  const HostAddressEntryCollection_1 = require("./HostAddressEntryCollection");
6
6
  class HostEntry {
7
+ aaaaRecords;
8
+ aRecords;
9
+ failedAaaaRecords;
10
+ failedARecords;
11
+ nextTimestampToUpdateMs;
7
12
  constructor(nextTimestampToProcessMs) {
8
13
  this.aaaaRecords = new HostAddressEntryCollection_1.HostAddressEntryCollection();
9
14
  this.aRecords = new HostAddressEntryCollection_1.HostAddressEntryCollection();
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HostEntryTable = void 0;
4
4
  const HostEntry_1 = require("./HostEntry");
5
5
  class HostEntryTable {
6
+ map;
6
7
  constructor() {
7
8
  this.map = new Map();
8
9
  }
@@ -11,6 +11,12 @@ const DNS_LOOKUP_OPTIONS = {
11
11
  verbatim: true,
12
12
  };
13
13
  export class NodeDnsLookupHostResolver {
14
+ static DEFAULT_TTL_MS = 30000;
15
+ static createDefaultCacheProvider = () => new HostEntryTable();
16
+ static DEFAULT_NODE_DNS_LOOKUP = dnsPromises.lookup;
17
+ ttlMs;
18
+ cache;
19
+ nodeDnsLookup;
14
20
  constructor({ ttlMs = NodeDnsLookupHostResolver.DEFAULT_TTL_MS, cache = NodeDnsLookupHostResolver.createDefaultCacheProvider(), nodeDnsLookup = NodeDnsLookupHostResolver.DEFAULT_NODE_DNS_LOOKUP, } = {}) {
15
21
  this.ttlMs = ttlMs;
16
22
  this.cache = cache;
@@ -79,6 +85,3 @@ export class NodeDnsLookupHostResolver {
79
85
  return addresses;
80
86
  }
81
87
  }
82
- NodeDnsLookupHostResolver.DEFAULT_TTL_MS = 30000;
83
- NodeDnsLookupHostResolver.createDefaultCacheProvider = () => new HostEntryTable();
84
- NodeDnsLookupHostResolver.DEFAULT_NODE_DNS_LOOKUP = dnsPromises.lookup;
@@ -1,7 +1,5 @@
1
1
  export class HostAddressEntryCollection {
2
- constructor() {
3
- this.data = [];
4
- }
2
+ data = [];
5
3
  get length() {
6
4
  return this.data.length;
7
5
  }
@@ -1,6 +1,11 @@
1
1
  import { HostAddressType } from "@aws-sdk/types";
2
2
  import { HostAddressEntryCollection } from "./HostAddressEntryCollection";
3
3
  export class HostEntry {
4
+ aaaaRecords;
5
+ aRecords;
6
+ failedAaaaRecords;
7
+ failedARecords;
8
+ nextTimestampToUpdateMs;
4
9
  constructor(nextTimestampToProcessMs) {
5
10
  this.aaaaRecords = new HostAddressEntryCollection();
6
11
  this.aRecords = new HostAddressEntryCollection();
@@ -1,5 +1,6 @@
1
1
  import { HostEntry } from "./HostEntry";
2
2
  export class HostEntryTable {
3
+ map;
3
4
  constructor() {
4
5
  this.map = new Map();
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-dns",
3
- "version": "3.714.0",
3
+ "version": "3.731.0",
4
4
  "description": "Implementations of DNS host resolvers.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,16 +26,16 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/types": "3.714.0",
29
+ "@aws-sdk/types": "3.731.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@tsconfig/recommended": "1.0.1",
34
- "@types/node": "^16.18.96",
34
+ "@types/node": "^18.19.69",
35
35
  "concurrently": "7.0.0",
36
36
  "downlevel-dts": "0.10.1",
37
37
  "rimraf": "3.0.2",
38
- "typescript": "~4.9.5"
38
+ "typescript": "~5.2.2"
39
39
  },
40
40
  "types": "./dist-types/index.d.ts",
41
41
  "engines": {