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:
@@ -4,9 +4,7 @@ import NotificationHelper from "@server/models/helpers/NotificationHelper";
|
||||
import { CollectionEvent } from "@server/types";
|
||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||
|
||||
export default class CollectionCreatedNotificationsTask extends BaseTask<
|
||||
CollectionEvent
|
||||
> {
|
||||
export default class CollectionCreatedNotificationsTask extends BaseTask<CollectionEvent> {
|
||||
public async perform(event: CollectionEvent) {
|
||||
const collection = await Collection.findByPk(event.collectionId);
|
||||
|
||||
@@ -15,10 +13,11 @@ export default class CollectionCreatedNotificationsTask extends BaseTask<
|
||||
return;
|
||||
}
|
||||
|
||||
const recipients = await NotificationHelper.getCollectionNotificationRecipients(
|
||||
collection,
|
||||
NotificationEventType.CreateCollection
|
||||
);
|
||||
const recipients =
|
||||
await NotificationHelper.getCollectionNotificationRecipients(
|
||||
collection,
|
||||
NotificationEventType.CreateCollection
|
||||
);
|
||||
|
||||
for (const recipient of recipients) {
|
||||
// Suppress notifications for suspended users
|
||||
|
||||
@@ -7,9 +7,7 @@ import ProsemirrorHelper from "@server/models/helpers/ProsemirrorHelper";
|
||||
import { CommentEvent } from "@server/types";
|
||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||
|
||||
export default class CommentCreatedNotificationsTask extends BaseTask<
|
||||
CommentEvent
|
||||
> {
|
||||
export default class CommentCreatedNotificationsTask extends BaseTask<CommentEvent> {
|
||||
public async perform(event: CommentEvent) {
|
||||
const [document, comment] = await Promise.all([
|
||||
Document.scope("withCollection").findOne({
|
||||
|
||||
@@ -4,9 +4,7 @@ import ProsemirrorHelper from "@server/models/helpers/ProsemirrorHelper";
|
||||
import { CommentEvent, CommentUpdateEvent } from "@server/types";
|
||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||
|
||||
export default class CommentUpdatedNotificationsTask extends BaseTask<
|
||||
CommentEvent
|
||||
> {
|
||||
export default class CommentUpdatedNotificationsTask extends BaseTask<CommentEvent> {
|
||||
public async perform(event: CommentUpdateEvent) {
|
||||
const [document, comment] = await Promise.all([
|
||||
Document.scope("withCollection").findOne({
|
||||
|
||||
@@ -6,9 +6,7 @@ import NotificationHelper from "@server/models/helpers/NotificationHelper";
|
||||
import { DocumentEvent } from "@server/types";
|
||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||
|
||||
export default class DocumentPublishedNotificationsTask extends BaseTask<
|
||||
DocumentEvent
|
||||
> {
|
||||
export default class DocumentPublishedNotificationsTask extends BaseTask<DocumentEvent> {
|
||||
public async perform(event: DocumentEvent) {
|
||||
const document = await Document.findByPk(event.documentId, {
|
||||
includeState: true,
|
||||
|
||||
@@ -287,7 +287,8 @@ export default class ImportNotionTask extends ImportTask {
|
||||
/**
|
||||
* Regex to find markdown images of all types
|
||||
*/
|
||||
private ImageRegex = /!\[(?<alt>[^\][]*?)]\((?<filename>[^\][]*?)(?=“|\))“?(?<title>[^\][”]+)?”?\)/g;
|
||||
private ImageRegex =
|
||||
/!\[(?<alt>[^\][]*?)]\((?<filename>[^\][]*?)(?=“|\))“?(?<title>[^\][”]+)?”?\)/g;
|
||||
|
||||
/**
|
||||
* Regex to find markdown links containing ID's that look like UUID's with the
|
||||
@@ -298,5 +299,6 @@ export default class ImportNotionTask extends ImportTask {
|
||||
/**
|
||||
* Regex to find Notion document UUID's in the title of a document.
|
||||
*/
|
||||
private NotionUUIDRegex = /\s([0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}|[0-9a-fA-F]{32})$/;
|
||||
private NotionUUIDRegex =
|
||||
/\s([0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}|[0-9a-fA-F]{32})$/;
|
||||
}
|
||||
|
||||
@@ -11,9 +11,7 @@ import NotificationHelper from "@server/models/helpers/NotificationHelper";
|
||||
import { RevisionEvent } from "@server/types";
|
||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||
|
||||
export default class RevisionCreatedNotificationsTask extends BaseTask<
|
||||
RevisionEvent
|
||||
> {
|
||||
export default class RevisionCreatedNotificationsTask extends BaseTask<RevisionEvent> {
|
||||
public async perform(event: RevisionEvent) {
|
||||
const [document, revision] = await Promise.all([
|
||||
Document.findByPk(event.documentId, { includeState: true }),
|
||||
|
||||
Reference in New Issue
Block a user