From 8456974d5cefa8e5bbd6051fd6af95a238aa17a5 Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:56:33 -0500 Subject: [PATCH 1/8] config: migrate types to config folder --- types-dnscontrol.d.ts => config/types-dnscontrol.d.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename types-dnscontrol.d.ts => config/types-dnscontrol.d.ts (100%) diff --git a/types-dnscontrol.d.ts b/config/types-dnscontrol.d.ts similarity index 100% rename from types-dnscontrol.d.ts rename to config/types-dnscontrol.d.ts From 986beacd18679953fb606c0863da35446cef332e Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:56:46 -0500 Subject: [PATCH 2/8] feat: add BIND type to creds --- creds.example.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/creds.example.json b/creds.example.json index 0e1c3be..19b247c 100644 --- a/creds.example.json +++ b/creds.example.json @@ -4,6 +4,9 @@ "api_key": "$PORKBUN_API_KEY", "secret_key": "$PORKBUN_API_SECRET" }, + "bind": { + "TYPE": "BIND" + }, "notifications": { "TYPE": "SLACK", "slack_url": "$SLACK_WEBHOOK_URL" From 9a77a33f57f510ecb1fa98d4a50b1504bf76938c Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:56:58 -0500 Subject: [PATCH 3/8] config: refactor path to types definition --- dnsconfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsconfig.js b/dnsconfig.js index a95e0bd..02c2d6e 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -1,5 +1,5 @@ // @ts-check -// +// var DSP_PORKBUN = NewDnsProvider("porkbun"); var REG_NONE = NewRegistrar("none"); From 6511d00516b9f80769a1e04a8700df061fb0bc36 Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:57:15 -0500 Subject: [PATCH 4/8] docs: add useful commands to README --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index 0e641ff..e83d706 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [creds.json](#credsjson) - [dnsconfig.js](#dnsconfigjs) - [DNS Records](#dns-records) + - [Useful Commands](#useful-commands) ## Overview @@ -286,6 +287,74 @@ D("noclocks.dev", REG_NONE, DnsProvider(DSP_PORKBUN), | `TXT` | `_acme-challenge` | `duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA` | 600 | Let's Encrypt Domain Verification | | `TXT` | `_github-pages-challenge-noclocks` | `8c88c3f5791a75585aedc0a0e821fb` | 600 | GitHub Domain Verification | +## Useful Commands + +```bash +# check configuration validity: +dnscontrol check + +# apply formatting to configuration +dnscontrol fmt dnsconfig.js + +# preview what changes would be made +dnscontrol preview + +# full preview +dnscontrol preview --full + +# preview with a notification hook (slack) +dnscontrol preview --notify + +# check credentials against Porkbun API: +dnscontrol check-creds porkbun + +# push DNS record changes +dnscontrol push + +# push and notify (slack) +dnscontrol push --notify + +# push and output a text report +mkdir reports +dnscontrol push --report "./reports/$(date '+%Y-%m-%d')-Report.txt" + +# import / retrieve current records via a 'zone' file +dnscontrol get-zones --format=zone porkbun - noclocks.dev + +# import / retrieve current records via a 'zone' file with output +mkdir zones +dnscontrol get-zones --format=zone porkbun - noclocks.dev > zones/noclocks.dev.zone + +# get zones (names only) +dnscontrol get-zones --format=nameonly porkbun - noclocks.dev + +# get zones (zone file format using the BIND provider) +dnscontrol get-zones --format=zone bind - noclocks.dev + +# get zones (table format) +dnscontrol get-zones --format=tsv porkbun - noclocks.dev + +# get zones (table format and output to CSV/TSV data file) +dnscontrol get-zones --format=tsv porkbun - noclocks.dev > reports/noclocks.dev.csv + +# get zones formatted with `djs` (JavaScript with leading commas) +dnscontrol get-zones --format=djs porkbun - noclocks.dev + +# get zones formatted with `djs` (JavaScript with leading commas) & output to file +dnscontrol get-zones --format=djs porkbun - noclocks.dev > noclocks.dev.js + +# get zones formatted as JavaScript +dnscontrol get-zones --format=js porkbun - noclocks.dev + +# get zones formatted as JavaScript and output to file +dnscontrol get-zones --format=js porkbun - noclocks.dev > noclocks.dev.js + +# utilize dnsutils 'dig' to check DNS record propogation, etc. +sudo apt install dnsutils +dig noclocks.dev +dig +short noclocks.dev +``` + *** No Clocks, LLC | 2024 From 141399e7e2aeefce382cbdd6deeb6520f0254b34 Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:57:22 -0500 Subject: [PATCH 5/8] feat: add zone file export --- zones/noclocks.dev.zone | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 zones/noclocks.dev.zone diff --git a/zones/noclocks.dev.zone b/zones/noclocks.dev.zone new file mode 100644 index 0000000..a095e48 --- /dev/null +++ b/zones/noclocks.dev.zone @@ -0,0 +1,15 @@ +$ORIGIN noclocks.dev. +$TTL 600 +@ IN MX 1 fwd1.porkbun.com. + IN MX 1 fwd2.porkbun.com. + 300 IN TXT "v=spf1 include:_spf.porkbun.com ~all" +;@ IN ALIAS lixie.porkbun.com. +* IN CNAME lixie.porkbun.com. +_acme-challenge IN TXT "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY" + IN TXT "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA" +_dmarc 300 IN TXT "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1" +default._domainkey 300 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB" +_github-pages-challenge-noclocks IN TXT "8c88c3f5791a75585aedc0a0e821fb" +blog IN CNAME 39843493.group43.sites.hubspot.net. +docs IN CNAME noclocks.github.io. + From 442702a8ddc93d36d2ee1c159a4a08bb75b482e4 Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 16:57:35 -0500 Subject: [PATCH 6/8] feat: add various example usage demos --- examples/Commands.txt | 63 +++++++++++++++++++++++++ examples/NameServers_and_DNSRecords.txt | 20 ++++++++ examples/README.md | 4 ++ examples/noclocks.dev.djs | 19 ++++++++ examples/noclocks.dev.js | 19 ++++++++ examples/noclocks.dev.tsv | 12 +++++ examples/noclocks.dev.zone | 15 ++++++ 7 files changed, 152 insertions(+) create mode 100644 examples/Commands.txt create mode 100644 examples/NameServers_and_DNSRecords.txt create mode 100644 examples/README.md create mode 100644 examples/noclocks.dev.djs create mode 100644 examples/noclocks.dev.js create mode 100644 examples/noclocks.dev.tsv create mode 100644 examples/noclocks.dev.zone diff --git a/examples/Commands.txt b/examples/Commands.txt new file mode 100644 index 0000000..6908aa8 --- /dev/null +++ b/examples/Commands.txt @@ -0,0 +1,63 @@ +# check configuration validity: +dnscontrol check + +# apply formatting to configuration +dnscontrol fmt dnsconfig.js + +# preview what changes would be made +dnscontrol preview + +# full preview +dnscontrol preview --full + +# preview with a notification hook (slack) +dnscontrol preview --notify + +# check credentials against Porkbun API: +dnscontrol check-creds porkbun + +# push DNS record changes +dnscontrol push + +# push and notify (slack) +dnscontrol push --notify + +# push and output a text report +mkdir reports +dnscontrol push --report "./reports/$(date '+%Y-%m-%d')-Report.txt" + +# import / retrieve current records via a 'zone' file +dnscontrol get-zones --format=zone porkbun - noclocks.dev + +# import / retrieve current records via a 'zone' file with output +mkdir zones +dnscontrol get-zones --format=zone porkbun - noclocks.dev > zones/noclocks.dev.zone + +# get zones (names only) +dnscontrol get-zones --format=nameonly porkbun - noclocks.dev + +# get zones (zone file format using the BIND provider) +dnscontrol get-zones --format=zone bind - noclocks.dev + +# get zones (table format) +dnscontrol get-zones --format=tsv porkbun - noclocks.dev + +# get zones (table format and output to CSV/TSV data file) +dnscontrol get-zones --format=tsv porkbun - noclocks.dev > reports/noclocks.dev.csv + +# get zones formatted with `djs` (JavaScript with leading commas) +dnscontrol get-zones --format=djs porkbun - noclocks.dev + +# get zones formatted with `djs` (JavaScript with leading commas) & output to file +dnscontrol get-zones --format=djs porkbun - noclocks.dev > noclocks.dev.js + +# get zones formatted as JavaScript +dnscontrol get-zones --format=js porkbun - noclocks.dev + +# get zones formatted as JavaScript and output to file +dnscontrol get-zones --format=js porkbun - noclocks.dev > noclocks.dev.js + +# utilize dnsutils 'dig' to check DNS record propogation, etc. +sudo apt install dnsutils +dig noclocks.dev +dig +short noclocks.dev diff --git a/examples/NameServers_and_DNSRecords.txt b/examples/NameServers_and_DNSRecords.txt new file mode 100644 index 0000000..a139732 --- /dev/null +++ b/examples/NameServers_and_DNSRecords.txt @@ -0,0 +1,20 @@ + +NAMESERVER("curitiba.ns.porkbun.com."), +NAMESERVER("fortaleza.ns.porkbun.com."), +NAMESERVER("maceio.ns.porkbun.com."), +NAMESERVER("salvador.ns.porkbun.com."), + +CNAME("www", "noclocks.dev."), +CNAME("blog", "39843493.group43.sites.hubspot.net."), +CNAME("*", "lixie.porkbun.com."), +CNAME("docs", "noclocks.github.io."), + +MX("@", 1, "fwd1.porkbun.com."), +MX("@", 1, "fwd2.porkbun.com."), + +TXT("@", "v=spf1 include:_spf.porkbun.com ~all"), +TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5wVNukpz+fpCVe3pTPph5GNNgljwTdL43ykZ2P4Vm/HiwFqsGGpuZaMhbVJtmmnItAAjdQfCqITYvMbQFU0DYAZpJencyelIU4bznlZM8NvwPlFo9so2C1zDfUs2Y9rgF71+4V/fyu3tXa0r8l8r6STpYGB0GsmL6idTZy3PJKQIDAQAB"), +TXT("_dmarc", "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1"), +TXT("_acme-challenge", "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY"), +TXT("_acme-challenge", "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA"), +TXT("_github-pages-challenge-noclocks", "8c88c3f5791a75585aedc0a0e821fb"), diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..6640558 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,4 @@ +# Examples + +> [!NOTE] +> Examples of how to use `dnscontrol` diff --git a/examples/noclocks.dev.djs b/examples/noclocks.dev.djs new file mode 100644 index 0000000..f62e62a --- /dev/null +++ b/examples/noclocks.dev.djs @@ -0,0 +1,19 @@ +var DSP_PORKBUN = NewDnsProvider("porkbun"); +var REG_NONE = NewRegistrar("none"); + +D("noclocks.dev", REG_NONE + , DnsProvider(DSP_PORKBUN) + , DefaultTTL(600) + , ALIAS("@", "lixie.porkbun.com.") + , CNAME("*", "lixie.porkbun.com.") + , CNAME("blog", "39843493.group43.sites.hubspot.net.") + , CNAME("docs", "noclocks.github.io.") + , MX("@", 1, "fwd1.porkbun.com.") + , MX("@", 1, "fwd2.porkbun.com.") + , TXT("@", "v=spf1 include:_spf.porkbun.com ~all", TTL(300)) + , TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB", TTL(300)) + , TXT("_dmarc", "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1", TTL(300)) + , TXT("_acme-challenge", "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY") + , TXT("_acme-challenge", "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA") + , TXT("_github-pages-challenge-noclocks", "8c88c3f5791a75585aedc0a0e821fb") +) diff --git a/examples/noclocks.dev.js b/examples/noclocks.dev.js new file mode 100644 index 0000000..24bb6d6 --- /dev/null +++ b/examples/noclocks.dev.js @@ -0,0 +1,19 @@ +var DSP_PORKBUN = NewDnsProvider("porkbun"); +var REG_NONE = NewRegistrar("none"); + +D("noclocks.dev", REG_NONE, + DnsProvider(DSP_PORKBUN), + DefaultTTL(600), + ALIAS("@", "lixie.porkbun.com."), + CNAME("*", "lixie.porkbun.com."), + CNAME("blog", "39843493.group43.sites.hubspot.net."), + CNAME("docs", "noclocks.github.io."), + MX("@", 1, "fwd1.porkbun.com."), + MX("@", 1, "fwd2.porkbun.com."), + TXT("@", "v=spf1 include:_spf.porkbun.com ~all", TTL(300)), + TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB", TTL(300)), + TXT("_dmarc", "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1", TTL(300)), + TXT("_acme-challenge", "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY"), + TXT("_acme-challenge", "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA"), + TXT("_github-pages-challenge-noclocks", "8c88c3f5791a75585aedc0a0e821fb") +) diff --git a/examples/noclocks.dev.tsv b/examples/noclocks.dev.tsv new file mode 100644 index 0000000..1152adb --- /dev/null +++ b/examples/noclocks.dev.tsv @@ -0,0 +1,12 @@ +noclocks.dev @ 600 IN ALIAS lixie.porkbun.com. +*.noclocks.dev * 600 IN CNAME lixie.porkbun.com. +blog.noclocks.dev blog 600 IN CNAME 39843493.group43.sites.hubspot.net. +docs.noclocks.dev docs 600 IN CNAME noclocks.github.io. +noclocks.dev @ 600 IN MX 1 fwd1.porkbun.com. +noclocks.dev @ 600 IN MX 1 fwd2.porkbun.com. +noclocks.dev @ 300 IN TXT v=spf1 include:_spf.porkbun.com ~all +default._domainkey.noclocks.dev default._domainkey 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB +_dmarc.noclocks.dev _dmarc 300 IN TXT v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1 +_acme-challenge.noclocks.dev _acme-challenge 600 IN TXT YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY +_acme-challenge.noclocks.dev _acme-challenge 600 IN TXT duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA +_github-pages-challenge-noclocks.noclocks.dev _github-pages-challenge-noclocks 600 IN TXT 8c88c3f5791a75585aedc0a0e821fb diff --git a/examples/noclocks.dev.zone b/examples/noclocks.dev.zone new file mode 100644 index 0000000..a095e48 --- /dev/null +++ b/examples/noclocks.dev.zone @@ -0,0 +1,15 @@ +$ORIGIN noclocks.dev. +$TTL 600 +@ IN MX 1 fwd1.porkbun.com. + IN MX 1 fwd2.porkbun.com. + 300 IN TXT "v=spf1 include:_spf.porkbun.com ~all" +;@ IN ALIAS lixie.porkbun.com. +* IN CNAME lixie.porkbun.com. +_acme-challenge IN TXT "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY" + IN TXT "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA" +_dmarc 300 IN TXT "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1" +default._domainkey 300 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB" +_github-pages-challenge-noclocks IN TXT "8c88c3f5791a75585aedc0a0e821fb" +blog IN CNAME 39843493.group43.sites.hubspot.net. +docs IN CNAME noclocks.github.io. + From 291ce8908ceaa7b311d9f8f8a1b8d17f0808ccdb Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 17:05:42 -0500 Subject: [PATCH 7/8] bug: fix records for mailchimp --- dnsconfig.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dnsconfig.js b/dnsconfig.js index 02c2d6e..20b4f9d 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -10,15 +10,14 @@ D("noclocks.dev", REG_NONE , CNAME("*", "lixie.porkbun.com.") , CNAME("blog", "39843493.group43.sites.hubspot.net.") , CNAME("docs", "noclocks.github.io.") - , CNAME("k2._domainkey.www", "dkim2.mcsv.net.") - , CNAME("k3._domainkey.www", "dkim3.mcsv.net.") + , CNAME("k2._domainkey", "dkim2.mcsv.net.") + , CNAME("k3._domainkey", "dkim3.mcsv.net.") , MX("@", 1, "fwd1.porkbun.com.") , MX("@", 1, "fwd2.porkbun.com.") - , TXT("@", "v=spf1 include:_spf.porkbun.com ~all", TTL(300)) - , TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB", TTL(300)) - , TXT("_dmarc", "v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1", TTL(300)) + , TXT("@", "v=spf1 include:_spf.porkbun.com ~all") + , TXT("_dmarc", "v=DMARC1; p=none;") + , TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB") , TXT("_acme-challenge", "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY") , TXT("_acme-challenge", "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA") , TXT("_github-pages-challenge-noclocks", "8c88c3f5791a75585aedc0a0e821fb") - , TXT("_dmarc", "v=DMARC1; p=none;", TTL(300)) ); From 5018825394f4f211d9d185811a99134a0e78e4ed Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Mon, 26 Feb 2024 17:05:53 -0500 Subject: [PATCH 8/8] feat: add `fmt` example output --- examples/formatted.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 examples/formatted.js diff --git a/examples/formatted.js b/examples/formatted.js new file mode 100644 index 0000000..7dc6143 --- /dev/null +++ b/examples/formatted.js @@ -0,0 +1,7 @@ +// @ts-check +// + +var DSP_PORKBUN = NewDnsProvider("porkbun"); +var REG_NONE = NewRegistrar("none"); + +D("noclocks.dev", REG_NONE, DnsProvider(DSP_PORKBUN), ALIAS("@", "lixie.porkbun.com."), CNAME("*", "lixie.porkbun.com."), CNAME("blog", "39843493.group43.sites.hubspot.net."), CNAME("docs", "noclocks.github.io."), CNAME("k2._domainkey", "dkim2.mcsv.net."), CNAME("k3._domainkey", "dkim3.mcsv.net."), MX("@", 1, "fwd1.porkbun.com."), MX("@", 1, "fwd2.porkbun.com."), TXT("@", "v=spf1 include:_spf.porkbun.com ~all"), TXT("_dmarc", "v=DMARC1; p=none;"), TXT("default._domainkey", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD23fAyoPbewQ6QAdP6FN30wbbEtWfpSvee3SR1CGqZc3YREGfXwPVi6R5cyR+qwx0DdJUuo5yOlFJ6rXyJUI6PSJ63sq5eNqKU+n6cqLlDaN4VxjS/NmLw+6szGeH52PhfrwRSyI2yMAnSszqvIO8YvN/bieqhIzcQjt8lQtWkJQIDAQAB"), TXT("_acme-challenge", "YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY"), TXT("_acme-challenge", "duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA"), TXT("_github-pages-challenge-noclocks", "8c88c3f5791a75585aedc0a0e821fb"));