chore: Remove optimize imports to allow vite upgrade (#5691)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { yDocToProsemirrorJSON } from "@getoutline/y-prosemirror";
|
||||
import { uniq } from "lodash";
|
||||
import uniq from "lodash/uniq";
|
||||
import { Node } from "prosemirror-model";
|
||||
import * as Y from "yjs";
|
||||
import { sequelize } from "@server/database/sequelize";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from "path";
|
||||
import emojiRegex from "emoji-regex";
|
||||
import { truncate } from "lodash";
|
||||
import truncate from "lodash/truncate";
|
||||
import mammoth from "mammoth";
|
||||
import quotedPrintable from "quoted-printable";
|
||||
import { Transaction } from "sequelize";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { uniq } from "lodash";
|
||||
import uniq from "lodash/uniq";
|
||||
import { QueryTypes } from "sequelize";
|
||||
import { sequelize } from "@server/database/sequelize";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isUndefined } from "lodash";
|
||||
import isUndefined from "lodash/isUndefined";
|
||||
import { Transaction } from "sequelize";
|
||||
import { Event, Notification } from "@server/models";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { has } from "lodash";
|
||||
import has from "lodash/has";
|
||||
import { Transaction } from "sequelize";
|
||||
import { TeamPreference } from "@shared/types";
|
||||
import env from "@server/env";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { uniqBy } from "lodash";
|
||||
import uniqBy from "lodash/uniqBy";
|
||||
import { Role } from "@shared/types";
|
||||
import InviteEmail from "@server/emails/templates/InviteEmail";
|
||||
import env from "@server/env";
|
||||
|
||||
@@ -10,7 +10,7 @@ import Koa from "koa";
|
||||
import helmet from "koa-helmet";
|
||||
import logger from "koa-logger";
|
||||
import Router from "koa-router";
|
||||
import { uniq } from "lodash";
|
||||
import uniq from "lodash/uniq";
|
||||
import { AddressInfo } from "net";
|
||||
import stoppable from "stoppable";
|
||||
import throng from "throng";
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* eslint-disable no-console */
|
||||
import { IncomingMessage } from "http";
|
||||
import chalk from "chalk";
|
||||
import { isEmpty, isArray, isObject, isString } from "lodash";
|
||||
import isArray from "lodash/isArray";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import isObject from "lodash/isObject";
|
||||
import isString from "lodash/isString";
|
||||
import winston from "winston";
|
||||
import env from "@server/env";
|
||||
import Metrics from "@server/logging/Metrics";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Context, Next } from "koa";
|
||||
import { defaults } from "lodash";
|
||||
import defaults from "lodash/defaults";
|
||||
import env from "@server/env";
|
||||
import { RateLimitExceededError } from "@server/errors";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { find, findIndex, remove, uniq } from "lodash";
|
||||
import find from "lodash/find";
|
||||
import findIndex from "lodash/findIndex";
|
||||
import remove from "lodash/remove";
|
||||
import uniq from "lodash/uniq";
|
||||
import randomstring from "randomstring";
|
||||
import { Identifier, Transaction, Op, FindOptions } from "sequelize";
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { compact, uniq } from "lodash";
|
||||
import compact from "lodash/compact";
|
||||
import uniq from "lodash/uniq";
|
||||
import randomstring from "randomstring";
|
||||
import type { SaveOptions } from "sequelize";
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import crypto from "crypto";
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { SaveOptions } from "sequelize";
|
||||
import {
|
||||
Column,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isNil } from "lodash";
|
||||
import isNil from "lodash/isNil";
|
||||
import vaults from "@server/database/vaults";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import path from "path";
|
||||
import { glob } from "glob";
|
||||
import Router from "koa-router";
|
||||
import { find, sortBy } from "lodash";
|
||||
import find from "lodash/find";
|
||||
import sortBy from "lodash/sortBy";
|
||||
import env from "@server/env";
|
||||
import Team from "@server/models/Team";
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ import {
|
||||
yDocToProsemirrorJSON,
|
||||
} from "@getoutline/y-prosemirror";
|
||||
import { JSDOM } from "jsdom";
|
||||
import { escapeRegExp, startCase } from "lodash";
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import startCase from "lodash/startCase";
|
||||
import { Node } from "prosemirror-model";
|
||||
import * as Y from "yjs";
|
||||
import textBetween from "@shared/editor/lib/textBetween";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import removeMarkdown from "@tommoor/remove-markdown";
|
||||
import invariant from "invariant";
|
||||
import { find, map } from "lodash";
|
||||
import find from "lodash/find";
|
||||
import map from "lodash/map";
|
||||
import queryParser from "pg-tsquery";
|
||||
import { Op, QueryTypes, WhereOptions } from "sequelize";
|
||||
import { DateFilter } from "@shared/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { size } from "lodash";
|
||||
import size from "lodash/size";
|
||||
import { addAttributeOptions } from "sequelize-typescript";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { size } from "lodash";
|
||||
import size from "lodash/size";
|
||||
import { Node } from "prosemirror-model";
|
||||
import { addAttributeOptions } from "sequelize-typescript";
|
||||
import { ProsemirrorData } from "@shared/types";
|
||||
|
||||
@@ -2,7 +2,9 @@ import fs from "fs";
|
||||
import http from "http";
|
||||
import path from "path";
|
||||
import Koa, { Context } from "koa";
|
||||
import { isNil, escape, snakeCase } from "lodash";
|
||||
import escape from "lodash/escape";
|
||||
import isNil from "lodash/isNil";
|
||||
import snakeCase from "lodash/snakeCase";
|
||||
import { ValidationError, EmptyResultError } from "sequelize";
|
||||
import env from "@server/env";
|
||||
import { InternalError } from "@server/errors";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import invariant from "invariant";
|
||||
import { some } from "lodash";
|
||||
import some from "lodash/some";
|
||||
import { CollectionPermission } from "@shared/types";
|
||||
import { Collection, User, Team } from "@server/models";
|
||||
import { AdminRequiredError } from "../errors";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { compact } from "lodash";
|
||||
import compact from "lodash/compact";
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { User } from "@server/models";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import JSZip from "jszip";
|
||||
import { omit } from "lodash";
|
||||
import omit from "lodash/omit";
|
||||
import { NavigationNode } from "@shared/types";
|
||||
import { parser } from "@server/editor";
|
||||
import env from "@server/env";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from "fs";
|
||||
import { truncate } from "lodash";
|
||||
import truncate from "lodash/truncate";
|
||||
import { FileOperationState, NotificationEventType } from "@shared/types";
|
||||
import ExportFailureEmail from "@server/emails/templates/ExportFailureEmail";
|
||||
import ExportSuccessEmail from "@server/emails/templates/ExportSuccessEmail";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import JSZip from "jszip";
|
||||
import { escapeRegExp, find } from "lodash";
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import find from "lodash/find";
|
||||
import mime from "mime-types";
|
||||
import { Node } from "prosemirror-model";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import JSZip from "jszip";
|
||||
import { escapeRegExp } from "lodash";
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import mime from "mime-types";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import documentImporter from "@server/commands/documentImporter";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import path from "path";
|
||||
import JSZip from "jszip";
|
||||
import { compact, escapeRegExp } from "lodash";
|
||||
import compact from "lodash/compact";
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import mime from "mime-types";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import documentImporter from "@server/commands/documentImporter";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { S3 } from "aws-sdk";
|
||||
import { truncate } from "lodash";
|
||||
import truncate from "lodash/truncate";
|
||||
import {
|
||||
CollectionPermission,
|
||||
CollectionSort,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { subHours } from "date-fns";
|
||||
import { differenceBy } from "lodash";
|
||||
import differenceBy from "lodash/differenceBy";
|
||||
import { Op } from "sequelize";
|
||||
import { NotificationEventType } from "@shared/types";
|
||||
import { createSubscriptionsForDocument } from "@server/commands/subscriptionCreator";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Redis, { RedisOptions } from "ioredis";
|
||||
import { defaults } from "lodash";
|
||||
import defaults from "lodash/defaults";
|
||||
import env from "@server/env";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import { AttachmentPreset } from "@shared/types";
|
||||
import BaseSchema from "@server/routes/api/BaseSchema";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { subHours, subMinutes } from "date-fns";
|
||||
import Router from "koa-router";
|
||||
import { uniqBy } from "lodash";
|
||||
import uniqBy from "lodash/uniqBy";
|
||||
import { TeamPreference } from "@shared/types";
|
||||
import { getCookieDomain, parseDomain } from "@shared/utils/domains";
|
||||
import env from "@server/env";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isUndefined } from "lodash";
|
||||
import isUndefined from "lodash/isUndefined";
|
||||
import { z } from "zod";
|
||||
import { randomElement } from "@shared/random";
|
||||
import { CollectionPermission, FileOperationFormat } from "@shared/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import BaseSchema from "../BaseSchema";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import isUUID from "validator/lib/isUUID";
|
||||
import { z } from "zod";
|
||||
import { SHARE_URL_SLUG_REGEX } from "@shared/utils/urlHelpers";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import z from "zod";
|
||||
import { FileOperationType } from "@shared/types";
|
||||
import { FileOperation } from "@server/models";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Router from "koa-router";
|
||||
import { isNull, isUndefined } from "lodash";
|
||||
import isNull from "lodash/isNull";
|
||||
import isUndefined from "lodash/isUndefined";
|
||||
import { WhereOptions, Op } from "sequelize";
|
||||
import { NotificationEventType } from "@shared/types";
|
||||
import notificationUpdater from "@server/commands/notificationUpdater";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import { NotificationEventType } from "@shared/types";
|
||||
import BaseSchema from "../BaseSchema";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import { Revision } from "@server/models";
|
||||
import BaseSchema from "@server/routes/api/BaseSchema";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import BaseSchema from "../BaseSchema";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import isUUID from "validator/lib/isUUID";
|
||||
import { z } from "zod";
|
||||
import { SHARE_URL_SLUG_REGEX, SLUG_URL_REGEX } from "@shared/utils/urlHelpers";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Router from "koa-router";
|
||||
import { isUndefined } from "lodash";
|
||||
import isUndefined from "lodash/isUndefined";
|
||||
import { Op, WhereOptions } from "sequelize";
|
||||
import { NotFoundError } from "@server/errors";
|
||||
import auth from "@server/middlewares/authentication";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { z } from "zod";
|
||||
import { ValidateDocumentId, ValidateIndex } from "@server/validation";
|
||||
import BaseSchema from "../BaseSchema";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isNil } from "lodash";
|
||||
import isNil from "lodash/isNil";
|
||||
import { z } from "zod";
|
||||
import { isUrl } from "@shared/utils/urls";
|
||||
import { ValidateURL } from "@server/validation";
|
||||
|
||||
@@ -2,7 +2,7 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
import util from "util";
|
||||
import { Context, Next } from "koa";
|
||||
import { escape } from "lodash";
|
||||
import escape from "lodash/escape";
|
||||
import { Sequelize } from "sequelize";
|
||||
import isUUID from "validator/lib/isUUID";
|
||||
import { IntegrationType, TeamPreference } from "@shared/types";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { isNil, isNull } from "lodash";
|
||||
import isNil from "lodash/isNil";
|
||||
import isNull from "lodash/isNull";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import {
|
||||
CollectionPermission,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { groupBy } from "lodash";
|
||||
import groupBy from "lodash/groupBy";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { timeout } from "./timers";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import JSZip from "jszip";
|
||||
import { find } from "lodash";
|
||||
import find from "lodash/find";
|
||||
import tmp from "tmp";
|
||||
import { bytesToHumanReadable } from "@shared/utils/files";
|
||||
import { ValidationError } from "@server/errors";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import querystring from "querystring";
|
||||
import { addMonths } from "date-fns";
|
||||
import { Context } from "koa";
|
||||
import { pick } from "lodash";
|
||||
import pick from "lodash/pick";
|
||||
import { Client } from "@shared/types";
|
||||
import { getCookieDomain } from "@shared/utils/domains";
|
||||
import env from "@server/env";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import formidable from "formidable";
|
||||
import { Request } from "koa";
|
||||
import { isArray } from "lodash";
|
||||
import isArray from "lodash/isArray";
|
||||
|
||||
/**
|
||||
* Get the first file from an incoming koa request
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { uniq, compact } from "lodash";
|
||||
import compact from "lodash/compact";
|
||||
import uniq from "lodash/uniq";
|
||||
|
||||
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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Queue from "bull";
|
||||
import { snakeCase } from "lodash";
|
||||
import snakeCase from "lodash/snakeCase";
|
||||
import { Second } from "@shared/utils/time";
|
||||
import env from "@server/env";
|
||||
import Metrics from "@server/logging/Metrics";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import util from "util";
|
||||
import AWS, { S3 } from "aws-sdk";
|
||||
import fetch from "fetch-with-proxy";
|
||||
import { compact } from "lodash";
|
||||
import compact from "lodash/compact";
|
||||
import { useAgent } from "request-filtering-agent";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import chalk from "chalk";
|
||||
import { isEmpty } from "lodash";
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { migrations } from "@server/database/sequelize";
|
||||
import env from "@server/env";
|
||||
import Logger from "@server/logging/Logger";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { repeat } from "lodash";
|
||||
import repeat from "lodash/repeat";
|
||||
import TurndownService from "turndown";
|
||||
|
||||
const highlightRegExp = /brush: ([a-z0-9]+);/;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { existsSync } from "fs";
|
||||
import path from "path";
|
||||
import glob from "glob";
|
||||
import { startCase } from "lodash";
|
||||
import startCase from "lodash/startCase";
|
||||
import env from "@server/env";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { UnfurlResolver } from "@server/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isArrayLike } from "lodash";
|
||||
import isArrayLike from "lodash/isArrayLike";
|
||||
import { Primitive } from "utility-types";
|
||||
import validator from "validator";
|
||||
import isUUID from "validator/lib/isUUID";
|
||||
|
||||
Reference in New Issue
Block a user