Merge branch 'master' into contest-access-lock

This commit is contained in:
undefined committed 2022-12-12 02:57:00 +08:00
commit a6f48233d1
5 files changed
+6 -9

No files matched your search

+1 -4
View File
@@ -1,8 +1,5 @@
import AdmZip from 'adm-zip';
import fs from 'fs-extra';
import yaml from 'js-yaml';
import _ from 'lodash';
import moment from 'moment-timezone';
import Schema from 'schemastery';
import superagent from 'superagent';
import { Context } from './context';
@@ -12,7 +9,7 @@ export * from './utils';
export * from './interface';
export * from './typeutils';
export {
Schema, yaml, fs, AdmZip, superagent, _, moment,
Schema, AdmZip, superagent, _,
};
export const definePlugin = <T = never>(args: {
using?: keyof Context[];
+1 -1
View File
@@ -1,5 +1,5 @@
import { omit } from 'lodash';
import moment from 'moment';
import moment from 'moment-timezone';
import { FilterQuery, ObjectID } from 'mongodb';
import { Context } from '../context';
import { DiscussionNodeNotFoundError, DocumentNotFoundError } from '../error';
+1 -1
View File
@@ -1,7 +1,7 @@
import { extname } from 'path';
import { escapeRegExp } from 'lodash';
import { lookup } from 'mime-types';
import moment from 'moment';
import moment from 'moment-timezone';
import { nanoid } from 'nanoid';
import type { Readable } from 'stream';
import * as bus from '../service/bus';
+1 -1
View File
@@ -3,7 +3,7 @@
/* eslint-disable @typescript-eslint/naming-convention */
import yaml from 'js-yaml';
import { pick } from 'lodash';
import moment from 'moment';
import moment from 'moment-timezone';
import { ObjectID } from 'mongodb';
import { buildContent } from './lib/content';
import { Logger } from './logger';
+2 -2
View File
@@ -4,7 +4,7 @@ import path from 'path';
import { Duplex } from 'stream';
import { inspect } from 'util';
import fs from 'fs-extra';
import { isMoment, Moment } from 'moment-timezone';
import moment, { isMoment, Moment } from 'moment-timezone';
import { ObjectID } from 'mongodb';
import Logger from 'reggol';
export * as yaml from 'js-yaml';
@@ -18,7 +18,7 @@ Logger.targets[0].label = {
margin: 1,
};
export { Logger };
export { Logger, moment };
const encrypt = (algorithm, content) => crypto.createHash(algorithm).update(content).digest('hex');
export const sha1 = (content: string) => encrypt('sha1', content);