chore(deps-dev): bump prettier from 2.1.2 to 2.8.8 (#5372)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -55,7 +55,8 @@ it("should parse attachment ID from markdown with title", () => {
|
||||
it("should parse multiple attachment IDs from markdown", () => {
|
||||
const uuid = uuidv4();
|
||||
const uuid2 = uuidv4();
|
||||
const results = parseAttachmentIds(`
|
||||
const results =
|
||||
parseAttachmentIds(`
|
||||
|
||||
some text
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { uniq, compact } from "lodash";
|
||||
|
||||
const attachmentRedirectRegex = /\/api\/attachments\.redirect\?id=(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
||||
const attachmentPublicRegex = /public\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
||||
const attachmentRedirectRegex =
|
||||
/\/api\/attachments\.redirect\?id=(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
||||
const attachmentPublicRegex =
|
||||
/public\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
||||
|
||||
export default function parseAttachmentIds(
|
||||
text: string,
|
||||
|
||||
@@ -14,17 +14,13 @@ const UPDATES_KEY = "UPDATES_KEY";
|
||||
export async function checkUpdates() {
|
||||
const secret = env.SECRET_KEY.slice(0, 6) + env.URL;
|
||||
const id = crypto.createHash("sha256").update(secret).digest("hex");
|
||||
const [
|
||||
userCount,
|
||||
teamCount,
|
||||
collectionCount,
|
||||
documentCount,
|
||||
] = await Promise.all([
|
||||
User.count(),
|
||||
Team.count(),
|
||||
Collection.count(),
|
||||
Document.count(),
|
||||
]);
|
||||
const [userCount, teamCount, collectionCount, documentCount] =
|
||||
await Promise.all([
|
||||
User.count(),
|
||||
Team.count(),
|
||||
Collection.count(),
|
||||
Document.count(),
|
||||
]);
|
||||
const body = JSON.stringify({
|
||||
id,
|
||||
version: 1,
|
||||
|
||||
@@ -18,7 +18,7 @@ export function CannotUseWithout(
|
||||
options: validationOptions,
|
||||
validator: {
|
||||
validate<T>(value: T, args: ValidationArguments) {
|
||||
const object = (args.object as unknown) as T;
|
||||
const object = args.object as unknown as T;
|
||||
const required = args.constraints[0] as string;
|
||||
return object[required] !== undefined;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user