mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-18 06:14:24 +00:00
support for bluesky service records
This commit is contained in:
1 parent
212c386b4d
commit
c6fa0573d1
36 files changed
+55
-166
No files matched your search
@@ -121,6 +121,13 @@ t("Disallow nested subdomains when parent has specific service records", (t) =>
|
||||
`${file}: Nested subdomain "_vercel.${subdomain}" should not exist when services.vercel is present`
|
||||
);
|
||||
}
|
||||
|
||||
if (data?.services?.bluesky) {
|
||||
t.false(
|
||||
files.includes(`_atproto.${file}`),
|
||||
`${file}: Nested subdomain "_atproto.${subdomain}" should not exist when services.bluesky is present`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
t.pass();
|
||||
|
||||
@@ -164,6 +164,10 @@ async function processFile(file, t) {
|
||||
`${file}: services.vercel should be an array or string`
|
||||
);
|
||||
}
|
||||
|
||||
if (data.services.bluesky) {
|
||||
t.true(typeof data.services.bluesky === "string", `${file}: services.bluesky should be a string`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const field of blockedFields) {
|
||||
|
||||
@@ -356,6 +356,12 @@ t("All files should have valid service records", (t) => {
|
||||
t.true(value.length >= 48, `${file}: Vercel service token should be 48 characters or longer`);
|
||||
});
|
||||
}
|
||||
|
||||
const atprotoRegex = /^did=did:plc:[a-z0-9]{24}$/;
|
||||
|
||||
if (data?.services?.bluesky) {
|
||||
t.true(atprotoRegex.test(data.services.bluesky), `${file}: Invalid Bluesky service record format`);
|
||||
}
|
||||
});
|
||||
|
||||
t.pass();
|
||||
|
||||
Reference in new issue
Block a user