diff --git a/pkg/js/parse_tests/001-basic.js b/pkg/js/parse_tests/001-basic.js index fd14395310..97febff45b 100644 --- a/pkg/js/parse_tests/001-basic.js +++ b/pkg/js/parse_tests/001-basic.js @@ -1,7 +1,6 @@ - -var REG = NewRegistrar("Third-Party","NONE"); +var REG = NewRegistrar("Third-Party", "NONE"); var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); -D("foo.com",REG,DnsProvider(CF), - A("@","1.2.3.4") -); \ No newline at end of file +D("foo.com", REG, DnsProvider(CF), + A("@", "1.2.3.4") +); diff --git a/pkg/js/parse_tests/002-ttl.js b/pkg/js/parse_tests/002-ttl.js index c96ab60e63..0834e0d7a1 100644 --- a/pkg/js/parse_tests/002-ttl.js +++ b/pkg/js/parse_tests/002-ttl.js @@ -1,5 +1,5 @@ -var REG = NewRegistrar("Third-Party","NONE"); +var REG = NewRegistrar("Third-Party", "NONE"); var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") -D("foo.com",REG,DnsProvider(CF), - A("@","1.2.3.4",TTL(42)) -); \ No newline at end of file +D("foo.com", REG, DnsProvider(CF), + A("@", "1.2.3.4", TTL(42)) +); diff --git a/pkg/js/parse_tests/003-meta.js b/pkg/js/parse_tests/003-meta.js index 679a971250..e157cb9474 100644 --- a/pkg/js/parse_tests/003-meta.js +++ b/pkg/js/parse_tests/003-meta.js @@ -1,5 +1,6 @@ - -var CLOUDFLARE = NewRegistrar("Cloudflare","CLOUDFLAREAPI"); -D("foo.com",CLOUDFLARE, - A("@","1.2.3.4",{"cloudflare_proxy":"ON"}) -); \ No newline at end of file +var CLOUDFLARE = NewRegistrar("Cloudflare", "CLOUDFLAREAPI"); +D("foo.com", CLOUDFLARE, + A("@", "1.2.3.4", { + "cloudflare_proxy": "ON" + }) +); diff --git a/pkg/js/parse_tests/004-ips.js b/pkg/js/parse_tests/004-ips.js index 01405eefa1..ce362ad4dc 100644 --- a/pkg/js/parse_tests/004-ips.js +++ b/pkg/js/parse_tests/004-ips.js @@ -1,10 +1,10 @@ -var REG = NewRegistrar("Third-Party","NONE"); +var REG = NewRegistrar("Third-Party", "NONE"); var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") var BASE = IP("1.2.3.4") -D("foo.com",REG,DnsProvider(CF,0), - A("@",BASE), - A("p1",BASE+1), - A("p255", BASE+255) -); \ No newline at end of file +D("foo.com", REG, DnsProvider(CF, 0), + A("@", BASE), + A("p1", BASE + 1), + A("p255", BASE + 255) +); diff --git a/pkg/js/parse_tests/005-ignored-records.js b/pkg/js/parse_tests/005-ignored-records.js index f389c92d69..272689ee5b 100644 --- a/pkg/js/parse_tests/005-ignored-records.js +++ b/pkg/js/parse_tests/005-ignored-records.js @@ -1,23 +1,5 @@ -D("foo.com", "none" - , IGNORE_NAME("testignore") - , IGNORE_NAME("testignore2", "A") - , IGNORE_NAME("testignore3", "A, CNAME, TXT") - , IGNORE_NAME("testignore4", "*") - , IGNORE_TARGET("testtarget", "CNAME") - , IGNORE("legacyignore") - , IGNORE_NAME("@") - , IGNORE_TARGET("@", "CNAME") -); -D("diff2.com", "none" - , IGNORE("mylabel") - , IGNORE("mylabel2", "") - , IGNORE("mylabel3", "", "") - , IGNORE("", "A") - , IGNORE("", "A,AAAA") - , IGNORE("", "", "mytarget") - , IGNORE("labelc", "CNAME", "targetc") - // Compatibility mode: - , IGNORE_NAME("nametest") - , IGNORE_TARGET("targettest1") - , IGNORE_TARGET("targettest2", "A") +D("foo.com", "none", IGNORE_NAME("testignore"), IGNORE_NAME("testignore2", "A"), IGNORE_NAME("testignore3", "A, CNAME, TXT"), IGNORE_NAME("testignore4", "*"), IGNORE_TARGET("testtarget", "CNAME"), IGNORE("legacyignore"), IGNORE_NAME("@"), IGNORE_TARGET("@", "CNAME")); +D("diff2.com", "none", IGNORE("mylabel"), IGNORE("mylabel2", ""), IGNORE("mylabel3", "", ""), IGNORE("", "A"), IGNORE("", "A,AAAA"), IGNORE("", "", "mytarget"), IGNORE("labelc", "CNAME", "targetc") + // Compatibility mode: + , IGNORE_NAME("nametest"), IGNORE_TARGET("targettest1"), IGNORE_TARGET("targettest2", "A") ); diff --git a/pkg/js/parse_tests/006-transforms.js b/pkg/js/parse_tests/006-transforms.js index 7e834c0188..cab456219b 100644 --- a/pkg/js/parse_tests/006-transforms.js +++ b/pkg/js/parse_tests/006-transforms.js @@ -1,12 +1,22 @@ -var REG = NewRegistrar("Third-Party","NONE"); +var REG = NewRegistrar("Third-Party", "NONE"); var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI") -var TRANSFORM_INT = [ - {low: "0.0.0.0", high: "1.1.1.1", newBase: "2.2.2.2" }, - {low: "1.1.1.1", high: IP("2.2.2.2"), newBase: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]} , - {low: "1.1.1.1", high: IP("2.2.2.2"), newIP: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]} -] +var TRANSFORM_INT = [{ + low: "0.0.0.0", + high: "1.1.1.1", + newBase: "2.2.2.2" +}, { + low: "1.1.1.1", + high: IP("2.2.2.2"), + newBase: ["3.3.3.3", "4.4.4.4", IP("5.5.5.5")] +}, { + low: "1.1.1.1", + high: IP("2.2.2.2"), + newIP: ["3.3.3.3", "4.4.4.4", IP("5.5.5.5")] +}] -D("foo.com",REG,DnsProvider(CF), - A("@","1.2.3.4",{transform: TRANSFORM_INT}) -); \ No newline at end of file +D("foo.com", REG, DnsProvider(CF), + A("@", "1.2.3.4", { + transform: TRANSFORM_INT + }) +); diff --git a/pkg/js/parse_tests/007-importTransformTTL.js b/pkg/js/parse_tests/007-importTransformTTL.js index 0919db1595..94b00cf199 100755 --- a/pkg/js/parse_tests/007-importTransformTTL.js +++ b/pkg/js/parse_tests/007-importTransformTTL.js @@ -11,8 +11,7 @@ var TRANSFORM_BASE = [{ low: "7.7.7.7", high: "8.8.8.8", newBase: "9.9.9.9" -}, -]; +}, ]; D("foo1.com", "reg"); diff --git a/pkg/js/parse_tests/008-import.js b/pkg/js/parse_tests/008-import.js index 5ffd406ecf..d026fc446c 100644 --- a/pkg/js/parse_tests/008-import.js +++ b/pkg/js/parse_tests/008-import.js @@ -1,2 +1 @@ - require("./import.js") diff --git a/pkg/js/parse_tests/009-reverse.js b/pkg/js/parse_tests/009-reverse.js index 8f4261afdc..bc09c60a39 100644 --- a/pkg/js/parse_tests/009-reverse.js +++ b/pkg/js/parse_tests/009-reverse.js @@ -1 +1 @@ -D(REV("1.2.0.0/16"),"none"); +D(REV("1.2.0.0/16"), "none"); diff --git a/pkg/js/parse_tests/010-alias.js b/pkg/js/parse_tests/010-alias.js index e9a27ab4fd..bb06e68996 100644 --- a/pkg/js/parse_tests/010-alias.js +++ b/pkg/js/parse_tests/010-alias.js @@ -1,3 +1,3 @@ -D("foo.com","none", - ALIAS("@","foo.com.") -); \ No newline at end of file +D("foo.com", "none", + ALIAS("@", "foo.com.") +); diff --git a/pkg/js/parse_tests/011-cfRedirect.js b/pkg/js/parse_tests/011-cfRedirect.js index 9c9dad9390..30e7cef50d 100644 --- a/pkg/js/parse_tests/011-cfRedirect.js +++ b/pkg/js/parse_tests/011-cfRedirect.js @@ -1,4 +1,4 @@ -D("foo.com","none", - CF_REDIRECT("test.foo.com","https://goo.com/$1"), - CF_TEMP_REDIRECT("test.foo.com","https://goo.com/$1") -); \ No newline at end of file +D("foo.com", "none", + CF_REDIRECT("test.foo.com", "https://goo.com/$1"), + CF_TEMP_REDIRECT("test.foo.com", "https://goo.com/$1") +); diff --git a/pkg/js/parse_tests/012-duration.js b/pkg/js/parse_tests/012-duration.js index 69c2a64e91..58adbe39e1 100644 --- a/pkg/js/parse_tests/012-duration.js +++ b/pkg/js/parse_tests/012-duration.js @@ -1,7 +1,7 @@ -D("foo.com","none", - A("@","1.2.3.4", TTL("300s")), - A("a","1.2.3.5", TTL("300")), - A("b","1.2.3.6", TTL("3m")), - A("c","1.2.3.7", TTL("3h")), - A("d","1.2.3.8", TTL("3d")) +D("foo.com", "none", + A("@", "1.2.3.4", TTL("300s")), + A("a", "1.2.3.5", TTL("300")), + A("b", "1.2.3.6", TTL("3m")), + A("c", "1.2.3.7", TTL("3h")), + A("d", "1.2.3.8", TTL("3d")) ); diff --git a/pkg/js/parse_tests/013-mx.js b/pkg/js/parse_tests/013-mx.js index ba37be2a7d..7940f5973c 100644 --- a/pkg/js/parse_tests/013-mx.js +++ b/pkg/js/parse_tests/013-mx.js @@ -1,3 +1,3 @@ -D("foo.com","none", - MX("@",15,"foo.com.") +D("foo.com", "none", + MX("@", 15, "foo.com.") ); diff --git a/pkg/js/parse_tests/014-caa.js b/pkg/js/parse_tests/014-caa.js index c755ee4baa..8753941abb 100644 --- a/pkg/js/parse_tests/014-caa.js +++ b/pkg/js/parse_tests/014-caa.js @@ -1,8 +1,8 @@ -D("foo.com","none", +D("foo.com", "none", // Allow letsencrypt to issue certificate for this domain - CAA("@","issue","letsencrypt.org"), + CAA("@", "issue", "letsencrypt.org"), // Allow no CA to issue wildcard certificate for this domain - CAA("@","issuewild",";"), + CAA("@", "issuewild", ";"), // Report all violation to test@example.com. If CA does not support // this record then refuse to issue any certificate CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), diff --git a/pkg/js/parse_tests/015-tlsa.js b/pkg/js/parse_tests/015-tlsa.js index df1b52ab32..4a82206e38 100644 --- a/pkg/js/parse_tests/015-tlsa.js +++ b/pkg/js/parse_tests/015-tlsa.js @@ -1,3 +1,3 @@ -D("foo.com","none", - TLSA("_443._tcp",3,1,1,"MDFiYTQ3MTljODBiNmZlOTExYjA5MWE3YzA1MTI0YjY0ZWVlY2U5NjRlMDljMDU4ZWY4Zjk4MDVkYWNhNTQ2YiAgLQo=") +D("foo.com", "none", + TLSA("_443._tcp", 3, 1, 1, "MDFiYTQ3MTljODBiNmZlOTExYjA5MWE3YzA1MTI0YjY0ZWVlY2U5NjRlMDljMDU4ZWY4Zjk4MDVkYWNhNTQ2YiAgLQo=") ); diff --git a/pkg/js/parse_tests/017-txt.js b/pkg/js/parse_tests/017-txt.js index abc4a818a6..d5213a7089 100644 --- a/pkg/js/parse_tests/017-txt.js +++ b/pkg/js/parse_tests/017-txt.js @@ -1,7 +1 @@ -D("foo.com","none" - , TXT("a","simple") - , TXT("b","ws at end ") - , TXT("c",["one"]) - , TXT("d",["bonie", "clyde"]) - , TXT("e",["straw", "wood", "brick"]) -); +D("foo.com", "none", TXT("a", "simple"), TXT("b", "ws at end "), TXT("c", ["one"]), TXT("d", ["bonie", "clyde"]), TXT("e", ["straw", "wood", "brick"])); diff --git a/pkg/js/parse_tests/018-dkim.js b/pkg/js/parse_tests/018-dkim.js index d08543e7a7..b2be034e09 100644 --- a/pkg/js/parse_tests/018-dkim.js +++ b/pkg/js/parse_tests/018-dkim.js @@ -1,3 +1 @@ -D("foo.com","none" - , TXT("dkimtest2",DKIM("this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3jthis is the remainder. it is 156 bytes long.mOhl2JmbsFKy+RoMTwbkk0/meRvcEFWLHkr4MSgbnie6OpQvM4Y51+kO6DUVr3rwjrdVO9wpFt+n/hdQ92TNif17RMJtE5AGaQ6BN3yJQIDAQAB;")) -); +D("foo.com", "none", TXT("dkimtest2", DKIM("this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3jthis is the remainder. it is 156 bytes long.mOhl2JmbsFKy+RoMTwbkk0/meRvcEFWLHkr4MSgbnie6OpQvM4Y51+kO6DUVr3rwjrdVO9wpFt+n/hdQ92TNif17RMJtE5AGaQ6BN3yJQIDAQAB;"))); diff --git a/pkg/js/parse_tests/019-r53-alias.js b/pkg/js/parse_tests/019-r53-alias.js index 6c3f55a5e1..62fba1ea4d 100644 --- a/pkg/js/parse_tests/019-r53-alias.js +++ b/pkg/js/parse_tests/019-r53-alias.js @@ -1,15 +1,15 @@ D("foo.com", "none", - R53_ALIAS("mxtest", "MX", "foo.com."), - R53_ALIAS("atest", "A", "foo.com."), - R53_ALIAS("atest", "A", "foo.com.", R53_ZONE("Z2FTEDLFRTF")), - R53_ALIAS("aevaltargethealthtest", "A", "foo.com.", R53_EVALUATE_TARGET_HEALTH(true)), - R53_ALIAS("aaaatest", "AAAA", "foo.com."), - R53_ALIAS("aaaatest", "AAAA", "foo.com.", R53_ZONE("ERERTFGFGF")), - R53_ALIAS("cnametest", "CNAME", "foo.com."), - R53_ALIAS("ptrtest", "PTR", "foo.com."), - R53_ALIAS("txttest", "TXT", "foo.com."), - R53_ALIAS("srvtest", "SRV", "foo.com."), - R53_ALIAS("spftest", "SPF", "foo.com."), - R53_ALIAS("caatest", "CAA", "foo.com."), - R53_ALIAS("naptrtest", "NAPTR", "foo.com.") -); \ No newline at end of file + R53_ALIAS("mxtest", "MX", "foo.com."), + R53_ALIAS("atest", "A", "foo.com."), + R53_ALIAS("atest", "A", "foo.com.", R53_ZONE("Z2FTEDLFRTF")), + R53_ALIAS("aevaltargethealthtest", "A", "foo.com.", R53_EVALUATE_TARGET_HEALTH(true)), + R53_ALIAS("aaaatest", "AAAA", "foo.com."), + R53_ALIAS("aaaatest", "AAAA", "foo.com.", R53_ZONE("ERERTFGFGF")), + R53_ALIAS("cnametest", "CNAME", "foo.com."), + R53_ALIAS("ptrtest", "PTR", "foo.com."), + R53_ALIAS("txttest", "TXT", "foo.com."), + R53_ALIAS("srvtest", "SRV", "foo.com."), + R53_ALIAS("spftest", "SPF", "foo.com."), + R53_ALIAS("caatest", "CAA", "foo.com."), + R53_ALIAS("naptrtest", "NAPTR", "foo.com.") +); diff --git a/pkg/js/parse_tests/020-complexRequire.js b/pkg/js/parse_tests/020-complexRequire.js index 6c8d1148b7..3fd7ad25e2 100644 --- a/pkg/js/parse_tests/020-complexRequire.js +++ b/pkg/js/parse_tests/020-complexRequire.js @@ -1 +1 @@ -require('./complexImports/base.js'); \ No newline at end of file +require('./complexImports/base.js'); diff --git a/pkg/js/parse_tests/021-srv.js b/pkg/js/parse_tests/021-srv.js index a7cf7d0371..0aafb20912 100644 --- a/pkg/js/parse_tests/021-srv.js +++ b/pkg/js/parse_tests/021-srv.js @@ -1,7 +1 @@ -D("foo.com","none" - , SRV('_ntp._udp', 1, 100, 123, 'one.foo.com.') - , SRV('_ntp._udp', 2, 100, 123, 'two') - , SRV('_ntp._udp', 3, 100, 123, 'localhost') - , SRV('_ntp._udp', 4, 100, 123, 'three.example.com.') - , SRV('_ntp._udp', 0, 0, 1, 'zeros') -); +D("foo.com", "none", SRV('_ntp._udp', 1, 100, 123, 'one.foo.com.'), SRV('_ntp._udp', 2, 100, 123, 'two'), SRV('_ntp._udp', 3, 100, 123, 'localhost'), SRV('_ntp._udp', 4, 100, 123, 'three.example.com.'), SRV('_ntp._udp', 0, 0, 1, 'zeros')); diff --git a/pkg/js/parse_tests/022-sshfp.js b/pkg/js/parse_tests/022-sshfp.js index 146c92c80b..16c7ba7066 100644 --- a/pkg/js/parse_tests/022-sshfp.js +++ b/pkg/js/parse_tests/022-sshfp.js @@ -1,10 +1,10 @@ -D("foo.com","none", - SSHFP("@",1,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), - SSHFP("@",1,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), - SSHFP("@",2,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), - SSHFP("@",2,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), - SSHFP("@",3,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), - SSHFP("@",3,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), - SSHFP("@",4,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), - SSHFP("@",4,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc") +D("foo.com", "none", + SSHFP("@", 1, 1, "66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), + SSHFP("@", 1, 2, "745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), + SSHFP("@", 2, 1, "66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), + SSHFP("@", 2, 2, "745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), + SSHFP("@", 3, 1, "66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), + SSHFP("@", 3, 2, "745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), + SSHFP("@", 4, 1, "66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), + SSHFP("@", 4, 2, "745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc") ); diff --git a/pkg/js/parse_tests/023-ignored-glob-records.js b/pkg/js/parse_tests/023-ignored-glob-records.js index 51c7076a78..51e212b76d 100644 --- a/pkg/js/parse_tests/023-ignored-glob-records.js +++ b/pkg/js/parse_tests/023-ignored-glob-records.js @@ -1,3 +1 @@ -D("foo.com", "none" - , IGNORE("\\*.testignore") -); +D("foo.com", "none", IGNORE("\\*.testignore")); diff --git a/pkg/js/parse_tests/024-json-import.js b/pkg/js/parse_tests/024-json-import.js index 26e9690883..04323e9c67 100644 --- a/pkg/js/parse_tests/024-json-import.js +++ b/pkg/js/parse_tests/024-json-import.js @@ -3,6 +3,6 @@ var domains = require('./domain-ip-map.json') var domain = "foo.com" var ip = domains["foo.com"] -D(domain,"none", - A("@",ip) +D(domain, "none", + A("@", ip) ); diff --git a/pkg/js/parse_tests/025-autodnssec.js b/pkg/js/parse_tests/025-autodnssec.js index 68184a5185..dd306bbdba 100644 --- a/pkg/js/parse_tests/025-autodnssec.js +++ b/pkg/js/parse_tests/025-autodnssec.js @@ -1,8 +1,7 @@ -D("nothing.com","none" +D("nothing.com", "none"); +D("with.com", "none", + AUTODNSSEC_ON ); -D("with.com","none", - AUTODNSSEC_ON -); -D("without.com","none", - AUTODNSSEC_OFF +D("without.com", "none", + AUTODNSSEC_OFF ); diff --git a/pkg/js/parse_tests/026-azure-alias.js b/pkg/js/parse_tests/026-azure-alias.js index 06ea367d53..735400c7b6 100644 --- a/pkg/js/parse_tests/026-azure-alias.js +++ b/pkg/js/parse_tests/026-azure-alias.js @@ -1,5 +1,5 @@ D("foo.com", "none", - AZURE_ALIAS("atest", "A", "foo.com."), - AZURE_ALIAS("aaaatest", "AAAA", "foo.com."), - AZURE_ALIAS("cnametest", "CNAME", "foo.com.") -); \ No newline at end of file + AZURE_ALIAS("atest", "A", "foo.com."), + AZURE_ALIAS("aaaatest", "AAAA", "foo.com."), + AZURE_ALIAS("cnametest", "CNAME", "foo.com.") +); diff --git a/pkg/js/parse_tests/027-ds.js b/pkg/js/parse_tests/027-ds.js index 4eccc76a8a..8e7f00e3a3 100644 --- a/pkg/js/parse_tests/027-ds.js +++ b/pkg/js/parse_tests/027-ds.js @@ -1,4 +1,4 @@ -D("foo.com","none", +D("foo.com", "none", DS("@", 1000, 13, 2, "AABBCCDDEEFF"), DS("@", 1, 1, 1, "FFFF") ); diff --git a/pkg/js/parse_tests/028-dextend.js b/pkg/js/parse_tests/028-dextend.js index 7504ce12e9..8c3577923f 100644 --- a/pkg/js/parse_tests/028-dextend.js +++ b/pkg/js/parse_tests/028-dextend.js @@ -3,20 +3,20 @@ var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); // Zone and subdomain Zone: D("foo.com", REG, DnsProvider(CF), - A("@", "10.1.1.1"), - A("www", "10.2.2.2") + A("@", "10.1.1.1"), + A("www", "10.2.2.2") ); D("bar.foo.com", REG, DnsProvider(CF), - A("@", "10.3.3.3"), - A("www", "10.4.4.4") + A("@", "10.3.3.3"), + A("www", "10.4.4.4") ); // Zone that gets extended D("foo.edu", REG, DnsProvider(CF), - A("@", "10.5.5.5"), - A("www", "10.6.6.6") + A("@", "10.5.5.5"), + A("www", "10.6.6.6") ); D_EXTEND("foo.edu", - A("more1", "10.7.7.7"), - A("more2", "10.8.8.8") + A("more1", "10.7.7.7"), + A("more2", "10.8.8.8") ); diff --git a/pkg/js/parse_tests/029-dextendsub.js b/pkg/js/parse_tests/029-dextendsub.js index 2cf856ecc3..9742ee2590 100644 --- a/pkg/js/parse_tests/029-dextendsub.js +++ b/pkg/js/parse_tests/029-dextendsub.js @@ -3,133 +3,133 @@ var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); // Zone that gets extended by subdomain D("foo.net", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "10.1.1.1"), - A("www", "10.2.2.2") + DefaultTTL(300), + A("@", "10.1.1.1"), + A("www", "10.2.2.2") ); D_EXTEND("bar.foo.net", - A("@", "10.3.3.3"), - A("www", "10.4.4.4") + A("@", "10.3.3.3"), + A("www", "10.4.4.4") ); // Zone and subdomain zone, each get extended. D("foo.tld", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "20.5.5.5"), - A("www", "20.6.6.6") + DefaultTTL(300), + A("@", "20.5.5.5"), + A("www", "20.6.6.6") ); D("bar.foo.tld", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "30.7.7.7"), - A("www", "30.8.8.8") + DefaultTTL(300), + A("@", "30.7.7.7"), + A("www", "30.8.8.8") ); D_EXTEND("bar.foo.tld", - A("a", "30.9.9.9") + A("a", "30.9.9.9") ); D_EXTEND("foo.tld", - A("a", "20.10.10.10") + A("a", "20.10.10.10") ); // Zone and subdomain zone, each get extended by a subdomain. D("foo.help", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "40.12.12.12"), - A("www", "40.12.12.12") + DefaultTTL(300), + A("@", "40.12.12.12"), + A("www", "40.12.12.12") ); D("bar.foo.help", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "50.13.13.13"), - A("www", "50.14.14.14") + DefaultTTL(300), + A("@", "50.13.13.13"), + A("www", "50.14.14.14") ); D_EXTEND("zip.bar.foo.help", - A("@", "50.15.15.15"), - A("www", "50.16.16.16") + A("@", "50.15.15.15"), + A("www", "50.16.16.16") ); D_EXTEND("morty.foo.help", - A("@", "40.17.17.17"), - A("www", "40.18.18.18") + A("@", "40.17.17.17"), + A("www", "40.18.18.18") ); // Zone extended by a subdomain and sub-subdomain. D("foo.here", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "60.19.19.19"), - A("www", "60.20.20.20") + DefaultTTL(300), + A("@", "60.19.19.19"), + A("www", "60.20.20.20") ); D_EXTEND("bar.foo.here", - A("@", "60.21.21.21"), - A("www", "60.22.22.22") + A("@", "60.21.21.21"), + A("www", "60.22.22.22") ); D_EXTEND("baz.bar.foo.here", - A("@", "60.23.23.23"), - A("www", "60.24.24.24") + A("@", "60.23.23.23"), + A("www", "60.24.24.24") ); // Zone extended by a sub-subdomain. D_EXTEND("a.long.path.of.sub.domains.foo.net", - A("@", "10.25.25.25"), - A("www", "10.26.26.26") + A("@", "10.25.25.25"), + A("www", "10.26.26.26") ); // ASCII zone D("example.com", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "10.0.0.1"), - A("www", "10.0.0.2") + DefaultTTL(300), + A("@", "10.0.0.1"), + A("www", "10.0.0.2") ); // … extended by an IDN subdomain D_EXTEND("düsseldorf.example.com", - A("@", "10.0.0.3"), - A("www", "10.0.0.4") + A("@", "10.0.0.3"), + A("www", "10.0.0.4") ); // … extended by a one-character IDN subdomain D_EXTEND("ü.example.com", - A("@", "10.0.0.5"), - A("www", "10.0.0.6") + A("@", "10.0.0.5"), + A("www", "10.0.0.6") ); // IDN zone D("düsseldorf.example.net", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "10.0.0.7"), - A("www", "10.0.0.8") + DefaultTTL(300), + A("@", "10.0.0.7"), + A("www", "10.0.0.8") ); // … extended by an ASCII subdomain D_EXTEND("subdomain.düsseldorf.example.net", - A("@", "10.0.0.9"), - A("www", "10.0.0.10") + A("@", "10.0.0.9"), + A("www", "10.0.0.10") ); // … extended by an IDN subdomain D_EXTEND("düsseltal.düsseldorf.example.net", - A("@", "10.0.0.11"), - A("www", "10.0.0.12") + A("@", "10.0.0.11"), + A("www", "10.0.0.12") ); // … extended by a one-character IDN subdomain D_EXTEND("ü.düsseldorf.example.net", - A("@", "10.0.0.13"), - A("www", "10.0.0.14") + A("@", "10.0.0.13"), + A("www", "10.0.0.14") ); // One-character IDN zone D("ü.example.net", REG, DnsProvider(CF), - DefaultTTL(300), - A("@", "10.0.0.15"), - A("www", "10.0.0.16") + DefaultTTL(300), + A("@", "10.0.0.15"), + A("www", "10.0.0.16") ); // … extended by an ASCII subdomain D_EXTEND("subdomain.ü.example.net", - A("@", "10.0.0.17"), - A("www", "10.0.0.18") + A("@", "10.0.0.17"), + A("www", "10.0.0.18") ); // … extended by an IDN subdomain D_EXTEND("düsseldorf.ü.example.net", - A("@", "10.0.0.19"), - A("www", "10.0.0.20") + A("@", "10.0.0.19"), + A("www", "10.0.0.20") ); // … extended by a one-character IDN subdomain D_EXTEND("ü.ü.example.net", - A("@", "10.0.0.21"), - A("www", "10.0.0.22") + A("@", "10.0.0.21"), + A("www", "10.0.0.22") ); // Zone extended by a subdomain, with absolute and relative CNAME targets diff --git a/pkg/js/parse_tests/030-dextenddoc.js b/pkg/js/parse_tests/030-dextenddoc.js index 56f43e4cd6..a8db274496 100644 --- a/pkg/js/parse_tests/030-dextenddoc.js +++ b/pkg/js/parse_tests/030-dextenddoc.js @@ -4,24 +4,24 @@ var DNS = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); // The example from documentation/language-reference/top-level-functions/D_EXTEND.md D("domain.tld", REG, DnsProvider(DNS), - A("@", "127.0.0.1"), // domain.tld - A("www", "127.0.0.2"), // www.domain.tld - CNAME("a", "b") // a.domain.tld -> b.domain.tld + A("@", "127.0.0.1"), // domain.tld + A("www", "127.0.0.2"), // www.domain.tld + CNAME("a", "b") // a.domain.tld -> b.domain.tld ); D_EXTEND("domain.tld", - A("aaa", "127.0.0.3"), // aaa.domain.tld - CNAME("c", "d") // c.domain.tld -> d.domain.tld + A("aaa", "127.0.0.3"), // aaa.domain.tld + CNAME("c", "d") // c.domain.tld -> d.domain.tld ); D_EXTEND("sub.domain.tld", - A("bbb", "127.0.0.4"), // bbb.sub.domain.tld - A("ccc", "127.0.0.5"), // ccc.sub.domain.tld - CNAME("e", "f") // e.sub.domain.tld -> f.sub.domain.tld + A("bbb", "127.0.0.4"), // bbb.sub.domain.tld + A("ccc", "127.0.0.5"), // ccc.sub.domain.tld + CNAME("e", "f") // e.sub.domain.tld -> f.sub.domain.tld ); D_EXTEND("sub.sub.domain.tld", - A("ddd", "127.0.0.6"), // ddd.sub.sub.domain.tld - CNAME("g", "h") // g.sub.domain.tld -> h.sub.domain.tld + A("ddd", "127.0.0.6"), // ddd.sub.sub.domain.tld + CNAME("g", "h") // g.sub.domain.tld -> h.sub.domain.tld ); D_EXTEND("sub.domain.tld", - A("@", "127.0.0.7"), // sub.domain.tld - CNAME("i", "j") // i.sub.domain.tld -> j.sub.domain.tld + A("@", "127.0.0.7"), // sub.domain.tld + CNAME("i", "j") // i.sub.domain.tld -> j.sub.domain.tld ); diff --git a/pkg/js/parse_tests/031-dextendnames.js b/pkg/js/parse_tests/031-dextendnames.js index 731ab7ee0b..0e71a0c358 100644 --- a/pkg/js/parse_tests/031-dextendnames.js +++ b/pkg/js/parse_tests/031-dextendnames.js @@ -4,42 +4,42 @@ var DNS = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); // Test the name matching algorithm D("domain.tld", REG, DnsProvider(DNS), - A("@", "127.0.0.1"), - A("a", "127.0.0.2"), - CNAME("b", "c") + A("@", "127.0.0.1"), + A("a", "127.0.0.2"), + CNAME("b", "c") ); D("sub.domain.tld", REG, DnsProvider(DNS), - A("@", "127.0.1.1"), - A("aa", "127.0.1.2"), - CNAME("bb", "cc") + A("@", "127.0.1.1"), + A("aa", "127.0.1.2"), + CNAME("bb", "cc") ); // Should match domain.tld D_EXTEND("domain.tld", - A("@", "127.0.0.3"), - A("d", "127.0.0.4"), - CNAME("e", "f") + A("@", "127.0.0.3"), + A("d", "127.0.0.4"), + CNAME("e", "f") ); // Should match domain.tld D_EXTEND("ub.domain.tld", - A("@", "127.0.0.5"), - A("g", "127.0.0.6"), - CNAME("h", "i") + A("@", "127.0.0.5"), + A("g", "127.0.0.6"), + CNAME("h", "i") ); // Should match sub.domain.tld D_EXTEND("sub.domain.tld", - A("@", "127.0.1.3"), - A("dd", "127.0.1.4"), - CNAME("ee", "ff") + A("@", "127.0.1.3"), + A("dd", "127.0.1.4"), + CNAME("ee", "ff") ); // Should match domain.tld D_EXTEND("ssub.domain.tld", - A("@", "127.0.0.7"), - A("j", "127.0.0.8"), - CNAME("k", "l") + A("@", "127.0.0.7"), + A("j", "127.0.0.8"), + CNAME("k", "l") ); diff --git a/pkg/js/parse_tests/032-reverseip.js b/pkg/js/parse_tests/032-reverseip.js index f8f274459c..bf217cf760 100644 --- a/pkg/js/parse_tests/032-reverseip.js +++ b/pkg/js/parse_tests/032-reverseip.js @@ -1,10 +1,12 @@ -var REGISTRAR = NewRegistrar('none', 'NONE'); // No registrar. +var REGISTRAR = NewRegistrar('none', 'NONE'); // No registrar. var BIND = NewDnsProvider('bind', 'BIND'); D(REV('1.2.3.0/24'), REGISTRAR, DnsProvider(BIND), - PTR("1", 'foo.example.com.'), - PTR("1.2.3.2", 'bar.example.com.'), - PTR(REV("1.2.3.3"), 'baz.example.com.', {skip_fqdn_check:"true"}) + PTR("1", 'foo.example.com.'), + PTR("1.2.3.2", 'bar.example.com.'), + PTR(REV("1.2.3.3"), 'baz.example.com.', { + skip_fqdn_check: "true" + }) ); D_EXTEND(REV("1.2.3.4"), PTR("4", "silly.example.com.")) D_EXTEND(REV("1.2.3.5"), PTR("1.2.3.5", "willy.example.com.")) @@ -12,4 +14,6 @@ D_EXTEND(REV("1.2.3.6"), PTR(REV("1.2.3.6"), "billy.example.com.")) D_EXTEND(REV("1.2.3.0/24"), PTR("7", "my.example.com.")) D_EXTEND(REV("1.2.3.0/24"), PTR("1.2.3.8", "fair.example.com.")) -D_EXTEND(REV("1.2.3.0/24"), PTR(REV("1.2.3.9/32"), "lady.example.com.", {skip_fqdn_check:"true"})) +D_EXTEND(REV("1.2.3.0/24"), PTR(REV("1.2.3.9/32"), "lady.example.com.", { + skip_fqdn_check: "true" +})) diff --git a/pkg/js/parse_tests/033-revextend.js b/pkg/js/parse_tests/033-revextend.js index 2bcab1a98a..b6712773f1 100644 --- a/pkg/js/parse_tests/033-revextend.js +++ b/pkg/js/parse_tests/033-revextend.js @@ -1,8 +1,8 @@ -var REGISTRAR = NewRegistrar('none', 'NONE'); // No registrar. +var REGISTRAR = NewRegistrar('none', 'NONE'); // No registrar. var BIND = NewDnsProvider('bind', 'BIND'); // Delegating reverse zones D(REV('1.3.0.0/16'), REGISTRAR, DnsProvider(BIND), - NS(REV('1.3.1.0/24'), "ns1.example.com.") + NS(REV('1.3.1.0/24'), "ns1.example.com.") ); D_EXTEND(REV("1.3.2.0/24"), NS(REV("1.3.2.0/24"), "ns2.example.org.")) diff --git a/pkg/js/parse_tests/035-naptr.js b/pkg/js/parse_tests/035-naptr.js index a44181f557..ae8ff3ae19 100644 --- a/pkg/js/parse_tests/035-naptr.js +++ b/pkg/js/parse_tests/035-naptr.js @@ -1,6 +1,6 @@ -D("foo.com","none", - NAPTR("@",100,10,"U","E2U+sip","!^.*$!sip:customer-service@example.com!","example"), - NAPTR("@",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example"), - NAPTR("@",103,10,"U","E2U+email","!^.*$!mailto:information@example.com!",""), - NAPTR("@",104,10,"U","E2U+email","!^.*$!mailto:information@example.com!",".") +D("foo.com", "none", + NAPTR("@", 100, 10, "U", "E2U+sip", "!^.*$!sip:customer-service@example.com!", "example"), + NAPTR("@", 102, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example"), + NAPTR("@", 103, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", ""), + NAPTR("@", 104, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", ".") ); diff --git a/pkg/js/parse_tests/036-dextendcf.js b/pkg/js/parse_tests/036-dextendcf.js index 844404b968..33da2c5caf 100644 --- a/pkg/js/parse_tests/036-dextendcf.js +++ b/pkg/js/parse_tests/036-dextendcf.js @@ -3,10 +3,10 @@ var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); D("foo.com", REG, DnsProvider(CF)); D_EXTEND("sub.foo.com", - A("test1.foo.com","10.2.3.1"), - A("test2.foo.com","10.2.3.2"), - A("test3.foo.com","10.2.3.3"), - CF_REDIRECT("test1.foo.com","https://goo.com/$1"), - CF_TEMP_REDIRECT("test2.foo.com","https://goo.com/$1"), - CF_WORKER_ROUTE("test3.foo.com","test-worker") + A("test1.foo.com", "10.2.3.1"), + A("test2.foo.com", "10.2.3.2"), + A("test3.foo.com", "10.2.3.3"), + CF_REDIRECT("test1.foo.com", "https://goo.com/$1"), + CF_TEMP_REDIRECT("test2.foo.com", "https://goo.com/$1"), + CF_WORKER_ROUTE("test3.foo.com", "test-worker") ); diff --git a/pkg/js/parse_tests/037-splithor.js b/pkg/js/parse_tests/037-splithor.js index 649598b79c..d32d7459ac 100644 --- a/pkg/js/parse_tests/037-splithor.js +++ b/pkg/js/parse_tests/037-splithor.js @@ -4,21 +4,21 @@ var DNS_INSIDE = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); var DNS_OUTSIDE = NewDnsProvider("bind", "BIND"); D("example.com", REG, DnsProvider(DNS_MAIN), - A("main", "3.3.3.3") + A("main", "3.3.3.3") ); D("example.com!inside", REG, DnsProvider(DNS_INSIDE), - A("main", "1.1.1.1") + A("main", "1.1.1.1") ); D("example.com!outside", REG, DnsProvider(DNS_OUTSIDE), - A("main", "8.8.8.8") + A("main", "8.8.8.8") ); D_EXTEND("example.com", - A("www", "33.33.33.33") + A("www", "33.33.33.33") ); D_EXTEND("example.com!inside", - A("main", "11.11.11.11") + A("main", "11.11.11.11") ); diff --git a/pkg/js/parse_tests/038-soa.js b/pkg/js/parse_tests/038-soa.js index 5f94375046..1c8b8e10a4 100644 --- a/pkg/js/parse_tests/038-soa.js +++ b/pkg/js/parse_tests/038-soa.js @@ -1,3 +1,3 @@ -D("foo.com","none", +D("foo.com", "none", SOA('@', 'ns1.foo.com.', 'admin.foo.com', 3600, 900, 604800, 86400) ); diff --git a/pkg/js/parse_tests/039-include.js b/pkg/js/parse_tests/039-include.js index 3d75ffbc56..76fe47d324 100644 --- a/pkg/js/parse_tests/039-include.js +++ b/pkg/js/parse_tests/039-include.js @@ -1,12 +1,11 @@ - -var REG = NewRegistrar("Third-Party","NONE"); +var REG = NewRegistrar("Third-Party", "NONE"); var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI"); -D("foo.com!external",REG,DnsProvider(CF), - A("@","1.2.3.4") +D("foo.com!external", REG, DnsProvider(CF), + A("@", "1.2.3.4") ); -D("foo.com!internal",REG,DnsProvider(CF), - INCLUDE("foo.com!external"), - A("local","127.0.0.1") +D("foo.com!internal", REG, DnsProvider(CF), + INCLUDE("foo.com!external"), + A("local", "127.0.0.1") ); diff --git a/pkg/js/parse_tests/040-cfWorkerRoute.js b/pkg/js/parse_tests/040-cfWorkerRoute.js index e8b3d31efc..29fc3eae8d 100644 --- a/pkg/js/parse_tests/040-cfWorkerRoute.js +++ b/pkg/js/parse_tests/040-cfWorkerRoute.js @@ -1,3 +1,3 @@ -D("foo.com","none", - CF_WORKER_ROUTE("test.foo.com","test-worker") -); \ No newline at end of file +D("foo.com", "none", + CF_WORKER_ROUTE("test.foo.com", "test-worker") +); diff --git a/pkg/js/parse_tests/043-safety.js b/pkg/js/parse_tests/043-safety.js index 6affbdc448..c239b176bc 100644 --- a/pkg/js/parse_tests/043-safety.js +++ b/pkg/js/parse_tests/043-safety.js @@ -1,5 +1,2 @@ -D("unsafe.com", "none" - , DISABLE_IGNORE_SAFETY_CHECK -); -D("safe.com", "none" -); +D("unsafe.com", "none", DISABLE_IGNORE_SAFETY_CHECK); +D("safe.com", "none"); diff --git a/pkg/js/parse_tests/044-ensureabsent.js b/pkg/js/parse_tests/044-ensureabsent.js index 85a0f961ea..32e3d92125 100644 --- a/pkg/js/parse_tests/044-ensureabsent.js +++ b/pkg/js/parse_tests/044-ensureabsent.js @@ -1,5 +1,5 @@ D("example.com", "none", - A("normal", "1.1.1.1"), - A("helper", "2.2.2.2", ENSURE_ABSENT_REC()), - //ENSURE_ABSENT(A("wrapped", "3.3.3.3")), - {}); + A("normal", "1.1.1.1"), + A("helper", "2.2.2.2", ENSURE_ABSENT_REC()), + //ENSURE_ABSENT(A("wrapped", "3.3.3.3")), + {}); diff --git a/pkg/js/parse_tests/045-loc.js b/pkg/js/parse_tests/045-loc.js index 579ef1416f..eacac5cbc1 100644 --- a/pkg/js/parse_tests/045-loc.js +++ b/pkg/js/parse_tests/045-loc.js @@ -1,92 +1,79 @@ -D("foo.com","none" - // LOC "subdomain", d1, m1, s1, "[NnSs]", d2, m2, s2, "[EeWw]", alt, siz, hp, vp) - , LOC("@", 42, 21, 54, "N", 71, 6, 18, "W", -24, 30, 0, 0) //42 21 54 N 71 06 18 W -24m 30m - , LOC("a", 42, 21, 43.952, "N", 71, 5, 6.344, "W", -24.01, 1, 200, 10) //42 21 43.952 N 71 5 6.344 W -24.01m 1m 200m - , LOC("b", 52, 14, 5, "N", 0, 8, 50, "E", 10.33, 0, 0, 0) //52 14 05 N 00 08 50 E 10.33m - , LOC("c", 32, 7, 19, "S",116, 2, 25, "E", 10, 0, 0, 0) //32 7 19 S 116 2 25 E 10m - , LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 2000m - , LOC("d-alt-highest", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 42849672.95, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W 42849672.95m 2000m - , LOC("d-alt-lowest", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -100000.00, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -100000.00m 2000m - , LOC("d-alt-toohigh", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 42849672.96, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W 42849672.95m 2000m - , LOC("d-alt-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -100000.01, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -100000m 2000m - , LOC("d-horizprecision-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 90000000, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 90000000m 0.00m - , LOC("d-horizprecision-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 98765432, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 90000000m 0.00m - , LOC("d-horizprecision-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, -1, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 0m 0.00m - , LOC("d-size-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 98765432, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 2000m - , LOC("d-size-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, -1, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 0m - , LOC("d-size-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 90000000, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 90000000m - , LOC("d-vertprecision-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, 90000000) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 90000000m - , LOC("d-vertprecision-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, 98765432) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 90000000m - , LOC("d-vertprecision-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, -1) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 0m +D("foo.com", "none" + // LOC "subdomain", d1, m1, s1, "[NnSs]", d2, m2, s2, "[EeWw]", alt, siz, hp, vp) + , LOC("@", 42, 21, 54, "N", 71, 6, 18, "W", -24, 30, 0, 0) //42 21 54 N 71 06 18 W -24m 30m + , LOC("a", 42, 21, 43.952, "N", 71, 5, 6.344, "W", -24.01, 1, 200, 10) //42 21 43.952 N 71 5 6.344 W -24.01m 1m 200m + , LOC("b", 52, 14, 5, "N", 0, 8, 50, "E", 10.33, 0, 0, 0) //52 14 05 N 00 08 50 E 10.33m + , LOC("c", 32, 7, 19, "S", 116, 2, 25, "E", 10, 0, 0, 0) //32 7 19 S 116 2 25 E 10m + , LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 2000m + , LOC("d-alt-highest", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 42849672.95, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W 42849672.95m 2000m + , LOC("d-alt-lowest", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -100000.00, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -100000.00m 2000m + , LOC("d-alt-toohigh", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 42849672.96, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W 42849672.95m 2000m + , LOC("d-alt-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -100000.01, 2000, 0, 0) //42 21 28.764 N 71 00 51.617 W -100000m 2000m + , LOC("d-horizprecision-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 90000000, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 90000000m 0.00m + , LOC("d-horizprecision-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 98765432, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 90000000m 0.00m + , LOC("d-horizprecision-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, -1, 0) //42 21 28.764 N 71 00 51.617 W 0m 1m 0m 0.00m + , LOC("d-size-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 98765432, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 2000m + , LOC("d-size-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, -1, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 0m + , LOC("d-size-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 90000000, 0, 0) //42 21 28.764 N 71 00 51.617 W -44m 90000000m + , LOC("d-vertprecision-hi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, 90000000) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 90000000m + , LOC("d-vertprecision-toohi", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, 98765432) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 90000000m + , LOC("d-vertprecision-toolow", 42, 21, 28.764, "N", 71, 0, 51.617, "W", 0, 1, 0, -1) //42 21 28.764 N 71 00 51.617 W 0m 1m 0.00m 0m - // via the Decimal degrees to LOC builder. - , LOC_BUILDER_DD({ - label: "big-ben", - x: 51.50084265331501, - y: -0.12462541415599787, - alt: 6, - }) - , LOC_BUILDER_DD({ - label: "white-house", - x: 38.89775977858357, - y: -77.03655125982903, - alt: 19, - ttl: "5m", - }) - , LOC_BUILDER_DMS_STR({ - label: "opera-house", - str: '33°51′31″S 151°12′51″E', - alt: 4, - ttl: "5m", - }) - , LOC_BUILDER_DMS_STR({ - label: "opera-house2", - str: '33°51\'31"S 151°12\'51"E', - alt: 4, - ttl: "5m", - }) - , LOC_BUILDER_DMS_STR({ - label: "opera-house3", - str: '33d51m31sS 151d12m51sE', - alt: 4, - ttl: "5m", - }) - , LOC_BUILDER_DMS_STR({ - label: "opera-house4", - str: '33d51m31s S 151d12m51s E', - alt: 4, - ttl: "5m", - }) - , LOC_BUILDER_DMM_STR({ - label: "fraser-island", - str: '25.24°S 153.15°E', - alt: 3, - }) - , LOC_BUILDER_STR({ - label: "tasmania", - str: '42°S 147°E', - alt: 3, - }) - , LOC_BUILDER_STR({ - label: "hawaii", - str: '21.5°N 158.0°W', - alt: 920, - }) - , LOC_BUILDER_STR({ - label: "old-faithful", - str: '44.46046°N 110.82815°W', - alt: 2240, - }) - , LOC_BUILDER_STR({ - label: "ribblehead-viaduct", - str: '54.210436°N 2.370231°W', - alt: 300, - }) - , LOC_BUILDER_STR({ - label: "guinness-brewery", - str: '53°20′40″N 6°17′20″W', - alt: 300, - }) + // via the Decimal degrees to LOC builder. + , LOC_BUILDER_DD({ + label: "big-ben", + x: 51.50084265331501, + y: -0.12462541415599787, + alt: 6, + }), LOC_BUILDER_DD({ + label: "white-house", + x: 38.89775977858357, + y: -77.03655125982903, + alt: 19, + ttl: "5m", + }), LOC_BUILDER_DMS_STR({ + label: "opera-house", + str: '33°51′31″S 151°12′51″E', + alt: 4, + ttl: "5m", + }), LOC_BUILDER_DMS_STR({ + label: "opera-house2", + str: '33°51\'31"S 151°12\'51"E', + alt: 4, + ttl: "5m", + }), LOC_BUILDER_DMS_STR({ + label: "opera-house3", + str: '33d51m31sS 151d12m51sE', + alt: 4, + ttl: "5m", + }), LOC_BUILDER_DMS_STR({ + label: "opera-house4", + str: '33d51m31s S 151d12m51s E', + alt: 4, + ttl: "5m", + }), LOC_BUILDER_DMM_STR({ + label: "fraser-island", + str: '25.24°S 153.15°E', + alt: 3, + }), LOC_BUILDER_STR({ + label: "tasmania", + str: '42°S 147°E', + alt: 3, + }), LOC_BUILDER_STR({ + label: "hawaii", + str: '21.5°N 158.0°W', + alt: 920, + }), LOC_BUILDER_STR({ + label: "old-faithful", + str: '44.46046°N 110.82815°W', + alt: 2240, + }), LOC_BUILDER_STR({ + label: "ribblehead-viaduct", + str: '54.210436°N 2.370231°W', + alt: 300, + }), LOC_BUILDER_STR({ + label: "guinness-brewery", + str: '53°20′40″N 6°17′20″W', + alt: 300, + }) ); - - diff --git a/pkg/js/parse_tests/046-DHCID.js b/pkg/js/parse_tests/046-DHCID.js index 8847c54ff8..5b7cf3dffc 100644 --- a/pkg/js/parse_tests/046-DHCID.js +++ b/pkg/js/parse_tests/046-DHCID.js @@ -1,3 +1,3 @@ -D("foo.com","none", +D("foo.com", "none", DHCID("@", "Test") ); diff --git a/pkg/js/parse_tests/047-DNAME.js b/pkg/js/parse_tests/047-DNAME.js index d7d3841908..350c4604ec 100644 --- a/pkg/js/parse_tests/047-DNAME.js +++ b/pkg/js/parse_tests/047-DNAME.js @@ -1,3 +1,3 @@ -D("foo.com","none", +D("foo.com", "none", DNAME("@", "bar.com.") ); diff --git a/pkg/js/parse_tests/047-SVCB.js b/pkg/js/parse_tests/047-SVCB.js index 1a69a5de08..5b80c02726 100644 --- a/pkg/js/parse_tests/047-SVCB.js +++ b/pkg/js/parse_tests/047-SVCB.js @@ -1,4 +1,4 @@ -D("foo.com","none", +D("foo.com", "none", SVCB("@", 1, ".", ""), HTTPS("@", 2, ".", 'alpn="h3,h2" port=443 ipv4hint=123.123.123.123 ipv6hint=dead::beaf') ); diff --git a/pkg/js/parse_tests/048-DNSKEY.js b/pkg/js/parse_tests/048-DNSKEY.js index 0f066011ae..11129e8650 100644 --- a/pkg/js/parse_tests/048-DNSKEY.js +++ b/pkg/js/parse_tests/048-DNSKEY.js @@ -1,3 +1,3 @@ -D("foo.com","none", +D("foo.com", "none", DNSKEY("@", 257, 3, 13, "AABBCCDD") ); diff --git a/pkg/js/parse_tests/049-json5-require.js b/pkg/js/parse_tests/049-json5-require.js index 0c672f2ce0..25aae0f93d 100644 --- a/pkg/js/parse_tests/049-json5-require.js +++ b/pkg/js/parse_tests/049-json5-require.js @@ -3,6 +3,6 @@ var domains = require('./domain-ip-map.json5') var domain = "foo.com" var ip = domains["foo.com"] -D(domain,"none", - A("@",ip) +D(domain, "none", + A("@", ip) ); diff --git a/pkg/js/parse_tests/050-cfSingleRedirect.js b/pkg/js/parse_tests/050-cfSingleRedirect.js index 6f221b66ac..9bb1c7ac73 100644 --- a/pkg/js/parse_tests/050-cfSingleRedirect.js +++ b/pkg/js/parse_tests/050-cfSingleRedirect.js @@ -1,8 +1,14 @@ -D("foo.com","none", - A("name1", "1.2.3.4", { meta: "value" } ), +D("foo.com", "none", + A("name1", "1.2.3.4", { + meta: "value" + }), CF_SINGLE_REDIRECT("name1", 301, "when1", "then1"), CF_SINGLE_REDIRECT("name2", 302, "when2", "then2"), CF_SINGLE_REDIRECT("name3", "301", "when3", "then3"), CF_SINGLE_REDIRECT("namettl", 302, "whenttl", "thenttl", TTL(999)), - CF_SINGLE_REDIRECT("namemeta", 302, "whenmeta", "thenmeta", { metastr: "stringy"}, { metanum: 22 } ) + CF_SINGLE_REDIRECT("namemeta", 302, "whenmeta", "thenmeta", { + metastr: "stringy" + }, { + metanum: 22 + }) ); diff --git a/pkg/js/parse_tests/import.js b/pkg/js/parse_tests/import.js index f598ccae87..a547f1a322 100644 --- a/pkg/js/parse_tests/import.js +++ b/pkg/js/parse_tests/import.js @@ -1,3 +1,3 @@ -D("foo.com","none", - A("@","1.2.3.4") -); \ No newline at end of file +D("foo.com", "none", + A("@", "1.2.3.4") +);