zs 6 mesiacov pred
rodič
commit
48576139b8

+ 1 - 6
package-lock.json

@@ -21,7 +21,7 @@
         "@typegoose/typegoose": "^11.0.0",
         "dayjs": "^1.11.13",
         "fs-extra": "^11.2.0",
-        "lodash-es": "^4.17.21",
+        "lodash": "^4.17.21",
         "mime-types": "^2.1.35",
         "mongoose": "^7.0.0"
       },
@@ -6059,11 +6059,6 @@
       "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
       "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
     },
-    "node_modules/lodash-es": {
-      "version": "4.17.21",
-      "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
-      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
-    },
     "node_modules/lodash.includes": {
       "version": "4.3.0",
       "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz",

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
     "@typegoose/typegoose": "^11.0.0",
     "dayjs": "^1.11.13",
     "fs-extra": "^11.2.0",
-    "lodash-es": "^4.17.21",
+    "lodash": "^4.17.21",
     "mime-types": "^2.1.35",
     "mongoose": "^7.0.0"
   },

+ 1 - 1
src/controller/frame/Token.controller.ts

@@ -1,7 +1,7 @@
 import { Context, Controller, Get, Inject } from '@midwayjs/core';
 import { JwtService } from '@midwayjs/jwt';
 import assert = require('assert');
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 import { RoleService } from '../../service/system/role.service';
 import { RF } from '../../response/CustomerResponse';
 

+ 1 - 1
src/decorator/page.decorator.ts

@@ -1,5 +1,5 @@
 import { createRequestParamDecorator } from '@midwayjs/core';
-import { get, pick, omit } from 'lodash-es';
+import { get, pick, omit } from 'lodash';
 import { QueryMapping, QueryReset } from '../frame/QueryUtils';
 const pageKeys = ['skip', 'limit'];
 /**将query的skip和limit提取到object中返回 */

+ 1 - 1
src/entity/system/admin.entity.ts

@@ -1,6 +1,6 @@
 import { modelOptions, prop } from '@typegoose/typegoose';
 import { BaseModel } from '../../frame/BaseModel';
-import { isString } from 'lodash-es';
+import { isString } from 'lodash';
 @modelOptions({
   schemaOptions: { collection: 'admin' },
 })

+ 1 - 1
src/error/CustomerError.error.ts

@@ -1,5 +1,5 @@
 import { MidwayError } from '@midwayjs/core';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 
 export class ServiceError extends MidwayError {
   constructor(error: object) {

+ 1 - 1
src/filter/ServiceError.filter.ts

@@ -1,7 +1,7 @@
 import { Catch, Inject, MidwayEnvironmentService } from '@midwayjs/core';
 import { Context } from '@midwayjs/koa';
 import { ServiceError } from '../error/CustomerError.error';
-import { pick } from 'lodash-es';
+import { pick } from 'lodash';
 
 const pickList = ['errmsg', 'errcode'];
 const devList = ['name', 'stack'];

+ 1 - 1
src/frame/BaseService.ts

@@ -1,7 +1,7 @@
 import { ReturnModelType } from '@typegoose/typegoose';
 import { AnyParamConstructor } from '@typegoose/typegoose/lib/types';
 import { Application, Context } from '@midwayjs/koa';
-import { cloneDeep, get } from 'lodash-es';
+import { cloneDeep, get } from 'lodash';
 import { PageOptions, ResultOptions } from './Options';
 import { PopulateOptions } from 'mongoose';
 import { App, Inject } from '@midwayjs/core';

+ 1 - 1
src/frame/Options.ts

@@ -1,5 +1,5 @@
 import { Rule, RuleType } from '@midwayjs/validate';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 
 /**分页处理参数 */
 export interface PageOptions {

+ 1 - 1
src/frame/QueryUtils.ts

@@ -1,4 +1,4 @@
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 const signMappings = {
   [`^[%](.*(?=))[%]$`]: { pos: 1, deal: val => new RegExp(val) },
   [`^[@]([^=].*)`]: { pos: 1, deal: val => ({ $gt: val }) },

+ 1 - 1
src/frame/Utils.ts

@@ -1,6 +1,6 @@
 import { getModelForClass, getClass } from '@typegoose/typegoose';
 import { AnyParamConstructor } from '@typegoose/typegoose/lib/types';
-import { upperFirst } from 'lodash-es';
+import { upperFirst } from 'lodash';
 import { ServiceError } from '../error/CustomerError.error';
 import { ErrorCode } from '../error/Codes';
 /**

+ 1 - 1
src/middleware/CheckToken.middleware.ts

@@ -8,7 +8,7 @@ import {
 } from '@midwayjs/core';
 import { JwtService } from '@midwayjs/jwt';
 import { Context } from '@midwayjs/koa';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 import { LoginRecordService } from '../service/frame/LoginRecord.service';
 import { ErrorCode } from '../error/Codes';
 import { ServiceError } from '../error/CustomerError.error';

+ 1 - 1
src/service/frame/File.service.ts

@@ -1,7 +1,7 @@
 import { existsSync, lstatSync, mkdirSync, readdirSync } from 'fs';
 import { Context } from '@midwayjs/koa';
 import { dirname, extname, join, sep } from 'path';
-import { flattenDeep, get, last, head } from 'lodash-es';
+import { flattenDeep, get, last, head } from 'lodash';
 import { moveSync, removeSync } from 'fs-extra';
 import { Provide, Inject, Config } from '@midwayjs/core';
 import { mongoose } from '@typegoose/typegoose';

+ 1 - 1
src/service/frame/Login.service.ts

@@ -1,6 +1,6 @@
 import { Inject, Provide } from '@midwayjs/core';
 import { LoginType, UPwdDTO } from '../../frame/Options';
-import { get, isEqual, upperFirst } from 'lodash-es';
+import { get, isEqual, upperFirst } from 'lodash';
 import { GetModel, randomStr } from '../../frame/Utils';
 import { ServiceError } from '../../error/CustomerError.error';
 import { ErrorCode } from '../../error/Codes';

+ 1 - 1
src/service/frame/LoginRecord.service.ts

@@ -4,7 +4,7 @@ import { Config, Inject, Provide } from '@midwayjs/core';
 import { InjectEntityModel } from '@midwayjs/typegoose';
 import { Context } from '@midwayjs/koa';
 import { JwtService } from '@midwayjs/jwt';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 import * as dayjs from 'dayjs';
 import { ServiceError } from '../../error/CustomerError.error';
 import { ErrorCode } from '../../error/Codes';

+ 1 - 1
src/service/system/admin.service.ts

@@ -3,7 +3,7 @@ import { BaseService } from '../../frame/BaseService';
 import { Provide } from '@midwayjs/core';
 import { Admin } from '../../entity/system/admin.entity';
 import { InjectEntityModel } from '@midwayjs/typegoose';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 import { ServiceError } from '../../error/CustomerError.error';
 import { ErrorCode } from '../../error/Codes';
 type modelType = ReturnModelType<typeof Admin>;

+ 1 - 1
src/service/system/menus.service.ts

@@ -3,7 +3,7 @@ import { BaseService } from '../../frame/BaseService';
 import { Provide } from '@midwayjs/core';
 import { Menus } from '../../entity/system/menus.entity';
 import { InjectEntityModel } from '@midwayjs/typegoose';
-import { orderBy } from 'lodash-es';
+import { orderBy } from 'lodash';
 import { Types } from 'mongoose';
 const ObjectId = Types.ObjectId;
 type modelType = ReturnModelType<typeof Menus>;

+ 1 - 1
src/service/system/role.service.ts

@@ -3,7 +3,7 @@ import { BaseService } from '../../frame/BaseService';
 import { Inject, Provide } from '@midwayjs/core';
 import { Role } from '../../entity/system/role.entity';
 import { InjectEntityModel } from '@midwayjs/typegoose';
-import { lowerFirst, upperFirst, last, flattenDeep, uniq, get } from 'lodash-es';
+import { lowerFirst, upperFirst, last, flattenDeep, uniq, get } from 'lodash';
 import { Menus } from '../../entity/system/menus.entity';
 import { ServiceError } from '../../error/CustomerError.error';
 import { MenusService } from './menus.service';

+ 1 - 1
src/service/system/user.service.ts

@@ -3,7 +3,7 @@ import { BaseService } from '../../frame/BaseService';
 import { Provide } from '@midwayjs/core';
 import { User } from '../../entity/system/user.entity';
 import { InjectEntityModel } from '@midwayjs/typegoose';
-import { get } from 'lodash-es';
+import { get } from 'lodash';
 import { ErrorCode } from '../../error/Codes';
 import { ServiceError } from '../../error/CustomerError.error';
 type modelType = ReturnModelType<typeof User>;