mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
fix(BREAKING): make dns record types have consistent naming (#25357)
Closes https://github.com/denoland/deno/issues/15207
This commit is contained in:
parent
42cf762cf4
commit
a3bd1ba26d
2 changed files with 25 additions and 25 deletions
30
cli/tsc/dts/lib.deno.ns.d.ts
vendored
30
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -5773,7 +5773,7 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* @category Network
|
* @category Network
|
||||||
*/
|
*/
|
||||||
export interface CAARecord {
|
export interface CaaRecord {
|
||||||
/** If `true`, indicates that the corresponding property tag **must** be
|
/** If `true`, indicates that the corresponding property tag **must** be
|
||||||
* understood if the semantics of the CAA record are to be correctly
|
* understood if the semantics of the CAA record are to be correctly
|
||||||
* interpreted by an issuer.
|
* interpreted by an issuer.
|
||||||
|
@ -5793,7 +5793,7 @@ declare namespace Deno {
|
||||||
* specified, it will return an array of objects with this interface.
|
* specified, it will return an array of objects with this interface.
|
||||||
*
|
*
|
||||||
* @category Network */
|
* @category Network */
|
||||||
export interface MXRecord {
|
export interface MxRecord {
|
||||||
/** A priority value, which is a relative value compared to the other
|
/** A priority value, which is a relative value compared to the other
|
||||||
* preferences of MX records for the domain. */
|
* preferences of MX records for the domain. */
|
||||||
preference: number;
|
preference: number;
|
||||||
|
@ -5805,7 +5805,7 @@ declare namespace Deno {
|
||||||
* specified, it will return an array of objects with this interface.
|
* specified, it will return an array of objects with this interface.
|
||||||
*
|
*
|
||||||
* @category Network */
|
* @category Network */
|
||||||
export interface NAPTRRecord {
|
export interface NaptrRecord {
|
||||||
order: number;
|
order: number;
|
||||||
preference: number;
|
preference: number;
|
||||||
flags: string;
|
flags: string;
|
||||||
|
@ -5818,7 +5818,7 @@ declare namespace Deno {
|
||||||
* specified, it will return an array of objects with this interface.
|
* specified, it will return an array of objects with this interface.
|
||||||
*
|
*
|
||||||
* @category Network */
|
* @category Network */
|
||||||
export interface SOARecord {
|
export interface SoaRecord {
|
||||||
mname: string;
|
mname: string;
|
||||||
rname: string;
|
rname: string;
|
||||||
serial: number;
|
serial: number;
|
||||||
|
@ -5833,7 +5833,7 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* @category Network
|
* @category Network
|
||||||
*/
|
*/
|
||||||
export interface SRVRecord {
|
export interface SrvRecord {
|
||||||
priority: number;
|
priority: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
port: number;
|
port: number;
|
||||||
|
@ -5898,7 +5898,7 @@ declare namespace Deno {
|
||||||
query: string,
|
query: string,
|
||||||
recordType: "CAA",
|
recordType: "CAA",
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<CAARecord[]>;
|
): Promise<CaaRecord[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs DNS resolution against the given query, returning resolved
|
* Performs DNS resolution against the given query, returning resolved
|
||||||
|
@ -5928,7 +5928,7 @@ declare namespace Deno {
|
||||||
query: string,
|
query: string,
|
||||||
recordType: "MX",
|
recordType: "MX",
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<MXRecord[]>;
|
): Promise<MxRecord[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs DNS resolution against the given query, returning resolved
|
* Performs DNS resolution against the given query, returning resolved
|
||||||
|
@ -5958,7 +5958,7 @@ declare namespace Deno {
|
||||||
query: string,
|
query: string,
|
||||||
recordType: "NAPTR",
|
recordType: "NAPTR",
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<NAPTRRecord[]>;
|
): Promise<NaptrRecord[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs DNS resolution against the given query, returning resolved
|
* Performs DNS resolution against the given query, returning resolved
|
||||||
|
@ -5988,7 +5988,7 @@ declare namespace Deno {
|
||||||
query: string,
|
query: string,
|
||||||
recordType: "SOA",
|
recordType: "SOA",
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<SOARecord[]>;
|
): Promise<SoaRecord[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs DNS resolution against the given query, returning resolved
|
* Performs DNS resolution against the given query, returning resolved
|
||||||
|
@ -6018,7 +6018,7 @@ declare namespace Deno {
|
||||||
query: string,
|
query: string,
|
||||||
recordType: "SRV",
|
recordType: "SRV",
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<SRVRecord[]>;
|
): Promise<SrvRecord[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs DNS resolution against the given query, returning resolved
|
* Performs DNS resolution against the given query, returning resolved
|
||||||
|
@ -6080,11 +6080,11 @@ declare namespace Deno {
|
||||||
options?: ResolveDnsOptions,
|
options?: ResolveDnsOptions,
|
||||||
): Promise<
|
): Promise<
|
||||||
| string[]
|
| string[]
|
||||||
| CAARecord[]
|
| CaaRecord[]
|
||||||
| MXRecord[]
|
| MxRecord[]
|
||||||
| NAPTRRecord[]
|
| NaptrRecord[]
|
||||||
| SOARecord[]
|
| SoaRecord[]
|
||||||
| SRVRecord[]
|
| SrvRecord[]
|
||||||
| string[][]
|
| string[][]
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
this.#query(name, "CAA").then(({ ret }) => {
|
this.#query(name, "CAA").then(({ ret }) => {
|
||||||
(ret as Deno.CAARecord[]).forEach(({ critical, tag, value }) =>
|
(ret as Deno.CaaRecord[]).forEach(({ critical, tag, value }) =>
|
||||||
records.push({
|
records.push({
|
||||||
type: "CAA",
|
type: "CAA",
|
||||||
[tag]: value,
|
[tag]: value,
|
||||||
|
@ -284,7 +284,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
this.#query(name, "MX").then(({ ret }) => {
|
this.#query(name, "MX").then(({ ret }) => {
|
||||||
(ret as Deno.MXRecord[]).forEach(({ preference, exchange }) =>
|
(ret as Deno.MxRecord[]).forEach(({ preference, exchange }) =>
|
||||||
records.push({
|
records.push({
|
||||||
type: "MX",
|
type: "MX",
|
||||||
priority: preference,
|
priority: preference,
|
||||||
|
@ -293,7 +293,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
this.#query(name, "NAPTR").then(({ ret }) => {
|
this.#query(name, "NAPTR").then(({ ret }) => {
|
||||||
(ret as Deno.NAPTRRecord[]).forEach(
|
(ret as Deno.NaptrRecord[]).forEach(
|
||||||
({ order, preference, flags, services, regexp, replacement }) =>
|
({ order, preference, flags, services, regexp, replacement }) =>
|
||||||
records.push({
|
records.push({
|
||||||
type: "NAPTR",
|
type: "NAPTR",
|
||||||
|
@ -317,7 +317,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
this.#query(name, "SOA").then(({ ret }) => {
|
this.#query(name, "SOA").then(({ ret }) => {
|
||||||
(ret as Deno.SOARecord[]).forEach(
|
(ret as Deno.SoaRecord[]).forEach(
|
||||||
({ mname, rname, serial, refresh, retry, expire, minimum }) =>
|
({ mname, rname, serial, refresh, retry, expire, minimum }) =>
|
||||||
records.push({
|
records.push({
|
||||||
type: "SOA",
|
type: "SOA",
|
||||||
|
@ -332,7 +332,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
this.#query(name, "SRV").then(({ ret }) => {
|
this.#query(name, "SRV").then(({ ret }) => {
|
||||||
(ret as Deno.SRVRecord[]).forEach(
|
(ret as Deno.SrvRecord[]).forEach(
|
||||||
({ priority, weight, port, target }) =>
|
({ priority, weight, port, target }) =>
|
||||||
records.push({
|
records.push({
|
||||||
type: "SRV",
|
type: "SRV",
|
||||||
|
@ -378,7 +378,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
|
|
||||||
queryCaa(req: QueryReqWrap, name: string): number {
|
queryCaa(req: QueryReqWrap, name: string): number {
|
||||||
this.#query(name, "CAA").then(({ code, ret }) => {
|
this.#query(name, "CAA").then(({ code, ret }) => {
|
||||||
const records = (ret as Deno.CAARecord[]).map(
|
const records = (ret as Deno.CaaRecord[]).map(
|
||||||
({ critical, tag, value }) => ({
|
({ critical, tag, value }) => ({
|
||||||
[tag]: value,
|
[tag]: value,
|
||||||
critical: +critical && 128,
|
critical: +critical && 128,
|
||||||
|
@ -401,7 +401,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
|
|
||||||
queryMx(req: QueryReqWrap, name: string): number {
|
queryMx(req: QueryReqWrap, name: string): number {
|
||||||
this.#query(name, "MX").then(({ code, ret }) => {
|
this.#query(name, "MX").then(({ code, ret }) => {
|
||||||
const records = (ret as Deno.MXRecord[]).map(
|
const records = (ret as Deno.MxRecord[]).map(
|
||||||
({ preference, exchange }) => ({
|
({ preference, exchange }) => ({
|
||||||
priority: preference,
|
priority: preference,
|
||||||
exchange: fqdnToHostname(exchange),
|
exchange: fqdnToHostname(exchange),
|
||||||
|
@ -416,7 +416,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
|
|
||||||
queryNaptr(req: QueryReqWrap, name: string): number {
|
queryNaptr(req: QueryReqWrap, name: string): number {
|
||||||
this.#query(name, "NAPTR").then(({ code, ret }) => {
|
this.#query(name, "NAPTR").then(({ code, ret }) => {
|
||||||
const records = (ret as Deno.NAPTRRecord[]).map(
|
const records = (ret as Deno.NaptrRecord[]).map(
|
||||||
({ order, preference, flags, services, regexp, replacement }) => ({
|
({ order, preference, flags, services, regexp, replacement }) => ({
|
||||||
flags,
|
flags,
|
||||||
service: services,
|
service: services,
|
||||||
|
@ -459,7 +459,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
|
|
||||||
if (ret.length) {
|
if (ret.length) {
|
||||||
const { mname, rname, serial, refresh, retry, expire, minimum } =
|
const { mname, rname, serial, refresh, retry, expire, minimum } =
|
||||||
ret[0] as Deno.SOARecord;
|
ret[0] as Deno.SoaRecord;
|
||||||
|
|
||||||
record = {
|
record = {
|
||||||
nsname: fqdnToHostname(mname),
|
nsname: fqdnToHostname(mname),
|
||||||
|
@ -480,7 +480,7 @@ export class ChannelWrap extends AsyncWrap implements ChannelWrapQuery {
|
||||||
|
|
||||||
querySrv(req: QueryReqWrap, name: string): number {
|
querySrv(req: QueryReqWrap, name: string): number {
|
||||||
this.#query(name, "SRV").then(({ code, ret }) => {
|
this.#query(name, "SRV").then(({ code, ret }) => {
|
||||||
const records = (ret as Deno.SRVRecord[]).map(
|
const records = (ret as Deno.SrvRecord[]).map(
|
||||||
({ priority, weight, port, target }) => ({
|
({ priority, weight, port, target }) => ({
|
||||||
priority,
|
priority,
|
||||||
weight,
|
weight,
|
||||||
|
|
Loading…
Reference in a new issue