mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-11 00:25:00 +00:00
Merge pull request #1108 from is-a-dev/tbn's-email
This commit is contained in:
@@ -17,3 +17,5 @@ jobs:
|
||||
days-before-close: 20
|
||||
stale-issue-message: 'This issue has been marked as stale due to inactivity and will be closed. Comment anything on this PR to prevent it'
|
||||
stale-pr-message: 'This pull request has been marked as stale due to inactivity and will be closed. Comment anything on this PR to prevent it'
|
||||
exempt-issue-labels: 'no-stale'
|
||||
exempt-pr-labels: 'no-stale'
|
||||
|
||||
+10
-3
@@ -1,11 +1,18 @@
|
||||
{
|
||||
"description": "TheBotlyNoob's development website",
|
||||
"repo": "https://github.com/TheBotlyNoob/TheBotlyNoob.github.io",
|
||||
"description": "JJ's Website",
|
||||
"repo": "https://github.com/TheBotlyNoob/website",
|
||||
"owner": {
|
||||
"username": "TheBotlyNoob",
|
||||
"email": "TheBotlyNoob@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://j-j.vercel.app"
|
||||
"A": [
|
||||
"35.230.85.45"
|
||||
],
|
||||
"MX": [
|
||||
"mx1.improvmx.com",
|
||||
"mx2.improvmx.com"
|
||||
],
|
||||
"TXT": "v=spf1 include:spf.improvmx.com ~all"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ describe('validateDomainData', () => {
|
||||
{ ...defaultDomain, record: { CNAME: 'sd', A: ['121,3213'] } },
|
||||
{ ...defaultDomain, record: { A: ['121', '12'], FOOBAR: ['sd'] } },
|
||||
{ ...defaultDomain, record: { A: [] } },
|
||||
{ ...defaultDomain, record: { A: ['11122'], URL: 'foobar' } },
|
||||
{ ...defaultDomain, owner: {}, },
|
||||
{ ...defaultDomain, owner: { username: 'hwelo', }, },
|
||||
{ ...defaultDomain, owner: { email: 'hwelo' }, },
|
||||
|
||||
@@ -7,11 +7,6 @@ const isValidURL = and([R.is(String), testRegex(/^https?:\/\//ig)]);
|
||||
|
||||
const isValidDomain = and([R.is(String), testRegex(/^(([a-z0-9\-]+)\.)+[a-z]+$/ig)]);
|
||||
|
||||
const allowMXRecord = R.compose(
|
||||
R.ifElse(R.includes('MX'), withLengthEq(2), withLengthEq(1)),
|
||||
R.keys,
|
||||
);
|
||||
|
||||
const validateCnameRecord = type => and([
|
||||
R.propIs(String, type),
|
||||
R.compose(withLengthEq(1), R.keys), // CNAME cannot be used with any other record
|
||||
@@ -21,7 +16,6 @@ const validateCnameRecord = type => and([
|
||||
|
||||
const validateARecord = type => and([
|
||||
R.propIs(Array, type),
|
||||
allowMXRecord,
|
||||
R.propSatisfies(withLengthGte(1), type),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user