mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: use moment-timezone
This commit is contained in:
1 parent
4db96d858a
commit
8f33ffd8eb
5 files changed
+6
-9
No files matched your search
@@ -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,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,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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user