From 9cfd61aab855667139552aadb9e12c4abe8f2b98 Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 15 Dec 2022 10:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=92=8C=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=B0=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/context/FrontendRuntimeContext.js | 4 ++-- package.json | 8 ++++---- src/context/FrontendRuntimeContext.ts | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/context/FrontendRuntimeContext.js b/lib/context/FrontendRuntimeContext.js index 13f1a5cc7..d0f3aface 100644 --- a/lib/context/FrontendRuntimeContext.js +++ b/lib/context/FrontendRuntimeContext.js @@ -2,9 +2,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.FrontendRuntimeContext = void 0; var tslib_1 = require("tslib"); +var assert_1 = tslib_1.__importDefault(require("assert")); var SyncRowStore_1 = require("oak-domain/lib/store/SyncRowStore"); var Exception_1 = require("../types/Exception"); -var console_1 = require("console"); var types_1 = require("oak-domain/lib/types"); var FrontendRuntimeContext = /** @class */ (function (_super) { tslib_1.__extends(FrontendRuntimeContext, _super); @@ -76,7 +76,7 @@ var FrontendRuntimeContext = /** @class */ (function (_super) { throw new Exception_1.OakTokenExpiredException('您的登录状态有异常,请重新登录 '); } else { - (0, console_1.assert)(userState === 'normal'); + (0, assert_1.default)(userState === 'normal'); } return true; } diff --git a/package.json b/package.json index 48ae3e819..8469cc716 100644 --- a/package.json +++ b/package.json @@ -28,13 +28,13 @@ "uuid": "^8.3.2" }, "peerDependencies": { - "react": ">=18.2.0", - "react-dom": ">=18.1.0", - "react-router-dom": "^6.3.0", "@ant-design/icons": "^4.7.0", "antd": "^5.0.2", "antd-mobile": "^5.24.1", - "antd-mobile-icons": "^0.3.0" + "antd-mobile-icons": "^0.3.0", + "react": ">=18.2.0", + "react-dom": ">=18.1.0", + "react-router-dom": "^6.3.0" }, "devDependencies": { "@ant-design/icons": "^4.7.0", diff --git a/src/context/FrontendRuntimeContext.ts b/src/context/FrontendRuntimeContext.ts index b7b741a8b..ebe94e24e 100644 --- a/src/context/FrontendRuntimeContext.ts +++ b/src/context/FrontendRuntimeContext.ts @@ -1,4 +1,4 @@ - +import assert from 'assert'; import { EntityDict } from '../general-app-domain'; import { RuntimeContext } from './RuntimeContext'; @@ -10,7 +10,6 @@ import { SyncContext, SyncRowStore } from 'oak-domain/lib/store/SyncRowStore'; import { AsyncContext } from 'oak-domain/lib/store/AsyncRowStore'; import { BackendRuntimeContext } from './BackendRuntimeContext'; import { OakTokenExpiredException, OakUserDisabledException } from '../types/Exception'; -import { assert } from 'console'; import { OakUnloggedInException } from 'oak-domain/lib/types'; type AspectDict> = GeneralAspectDict & CommonAspectDict;