mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix
This commit is contained in:
6 files changed
+4
-7
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
import fs from 'fs';
|
|
||||||
import { Reader } from 'maxmind';
|
import { Reader } from 'maxmind';
|
||||||
import { Context, findFileSync, Service } from 'hydrooj';
|
import {
|
||||||
|
Context, findFileSync, fs, Service,
|
||||||
|
} from 'hydrooj';
|
||||||
|
|
||||||
const buffer = fs.readFileSync(findFileSync('@hydrooj/geoip/GeoLite2-City.mmdb'));
|
const buffer = fs.readFileSync(findFileSync('@hydrooj/geoip/GeoLite2-City.mmdb'));
|
||||||
const reader = new Reader(buffer);
|
const reader = new Reader(buffer);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import AdmZip from 'adm-zip';
|
import AdmZip from 'adm-zip';
|
||||||
import { stringify as toCSV } from 'csv-stringify/sync';
|
import { stringify as toCSV } from 'csv-stringify/sync';
|
||||||
import { statSync } from 'fs-extra';
|
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import { ObjectId } from 'mongodb';
|
import { ObjectId } from 'mongodb';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { statSync } from 'fs-extra';
|
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
import { statSync } from 'fs';
|
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import { lookup } from 'mime-types';
|
import { lookup } from 'mime-types';
|
||||||
import { Context } from '../context';
|
import { Context } from '../context';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import { statSync } from 'fs-extra';
|
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import { Filter, ObjectId } from 'mongodb';
|
import { Filter, ObjectId } from 'mongodb';
|
||||||
import { sortFiles } from '@hydrooj/utils/lib/utils';
|
import { sortFiles } from '@hydrooj/utils/lib/utils';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import fs from 'fs';
|
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import cac from 'cac';
|
import cac from 'cac';
|
||||||
|
import fs from 'fs-extra';
|
||||||
import proxy from 'koa-proxies';
|
import proxy from 'koa-proxies';
|
||||||
import cache from 'koa-static-cache';
|
import cache from 'koa-static-cache';
|
||||||
import { type FindCursor, ObjectId } from 'mongodb';
|
import { type FindCursor, ObjectId } from 'mongodb';
|
||||||
|
|||||||
Reference in new issue
Block a user