File tree Expand file tree Collapse file tree 2 files changed +48
-9
lines changed Expand file tree Collapse file tree 2 files changed +48
-9
lines changed Original file line number Diff line number Diff line change
1
+ interface ARecord {
2
+ name : string | '@' | '*'
3
+ address : string // IPv4
4
+ ttl ?: number | 'auto'
5
+ }
6
+
7
+ interface CNameRecord {
8
+ name : string
9
+ target : string
10
+ ttl : number | 'auto'
11
+ }
12
+
13
+ interface MXRecord {
14
+ name : string | '@'
15
+ mailServer : string
16
+ ttl : number | 'auto'
17
+ priority : number // 0-65535
18
+ }
19
+
20
+ interface TxtRecord {
21
+ name : string | '@'
22
+ ttl : number | 'auto'
23
+ content : string
24
+ }
25
+
26
+ interface AAAARecord {
27
+ name : string | '@' | '*'
28
+ address : string // IPv6
29
+ ttl : number | 'auto'
30
+ }
31
+
32
+ export type DnsRecord = ARecord | CNameRecord | MXRecord | TxtRecord | AAAARecord
33
+
1
34
export interface DnsOptions {
2
35
/**
3
36
* **DNS Options**
@@ -9,10 +42,10 @@ export interface DnsOptions {
9
42
* @default {}
10
43
* @see https://stacksjs.dev/docs/dns
11
44
*/
12
- a ?: [ ]
13
- aaaa ?: [ ]
14
- cname ?: [ ]
15
- mx ?: [ ]
45
+ a ?: ARecord [ ]
46
+ aaaa ?: AAAARecord [ ]
47
+ cname ?: CNameRecord [ ]
48
+ mx ?: MXRecord [ ]
49
+ txt ?: TxtRecord [ ]
16
50
ns ?: [ ]
17
- txt ?: [ ]
18
51
}
Original file line number Diff line number Diff line change @@ -3,12 +3,18 @@ import { defineDnsConfig } from 'stacks/core/config/src'
3
3
/**
4
4
* **DNS Options**
5
5
*
6
- * This configuration defines all of your DNS options. Because Stacks is fully-typed,
7
- * you may hover any of the options below and the definitions will be provided. In case
8
- * you have any questions, feel free to reach out via Discord or GitHub Discussions.
6
+ * This configuration defines all of your DNS options. Because Stacks is fully-typed, you
7
+ * may hover any of the options below and the definitions will be provided. In case you
8
+ * have any questions, feel free to reach out via Discord or GitHub Discussions.
9
9
*/
10
10
export default defineDnsConfig ( {
11
- a : [ ] ,
11
+ a : [
12
+ {
13
+ name : '' ,
14
+ address : '' ,
15
+ ttl : 300 ,
16
+ } ,
17
+ ] ,
12
18
aaaa : [ ] ,
13
19
cname : [ ] ,
14
20
txt : [ ] ,
You can’t perform that action at this time.
0 commit comments