diff --git a/lib/AppLoader.d.ts b/lib/AppLoader.d.ts
index 817920a..6adca18 100644
--- a/lib/AppLoader.d.ts
+++ b/lib/AppLoader.d.ts
@@ -1,4 +1,3 @@
-///
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
import { AppLoader as GeneralAppLoader, Trigger, EntityDict, Watcher, OpRecord, FreeTimer, OperationResult } from "oak-domain/lib/types";
import { DbStore } from "./DbStore";
@@ -38,9 +37,9 @@ export declare class AppLoader;
getStore(): DbStore;
getEndpoints(prefix: string): [string, "post" | "get" | "put" | "delete", string, (params: Record, headers: IncomingHttpHeaders, req: IncomingMessage, body?: any) => Promise<{
- headers?: Record | undefined;
+ headers?: Record;
data: any;
- statusCode?: number | undefined;
+ statusCode?: number;
}>][];
protected operateInWatcher(entity: T, operation: ED[T]['Update'], context: Cxt, singleton?: true): Promise>;
protected selectInWatcher(entity: T, selection: ED[T]['Selection'], context: Cxt, forUpdate?: true, singleton?: true): Promise[]>;
diff --git a/lib/AppLoader.js b/lib/AppLoader.js
index 4a82968..d8efd6c 100644
--- a/lib/AppLoader.js
+++ b/lib/AppLoader.js
@@ -423,7 +423,7 @@ class AppLoader extends types_1.AppLoader {
console.log(`定时器【${name}】执行成功,耗时${Date.now() - start}毫秒】,结果是`, result);
}
catch (err) {
- console.warn(`定时器【${name}】执行失败,耗时${Date.now() - start}毫秒】,错误是`, err);
+ console.error(`定时器【${name}】执行失败,耗时${Date.now() - start}毫秒】,错误是`, err);
}
}
else {
@@ -436,7 +436,7 @@ class AppLoader extends types_1.AppLoader {
await context.commit();
}
catch (err) {
- console.warn(`定时器【${name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
+ console.error(`定时器【${name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
if (err instanceof types_1.OakPartialSuccess) {
await context.commit();
}
@@ -468,7 +468,7 @@ class AppLoader extends types_1.AppLoader {
console.log(`例程【${routine.name}】执行成功,耗时${Date.now() - start}毫秒,结果是`, result);
}
catch (err) {
- console.warn(`例程【${routine.name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
+ console.error(`例程【${routine.name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
throw err;
}
}
@@ -484,7 +484,7 @@ class AppLoader extends types_1.AppLoader {
await context.commit();
}
catch (err) {
- console.warn(`例程【${name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
+ console.error(`例程【${name}】执行失败,耗时${Date.now() - start}毫秒,错误是`, err);
await context.rollback();
throw err;
}
diff --git a/lib/Synchronizer.d.ts b/lib/Synchronizer.d.ts
index 2283d42..eca40d7 100644
--- a/lib/Synchronizer.d.ts
+++ b/lib/Synchronizer.d.ts
@@ -27,7 +27,7 @@ export default class Synchronizer[];
+ getSyncTriggers(): Array>;
getSelfEndpoint(): EndpointItem;
tryCreateSyncProcess(): void;
}
diff --git a/lib/Synchronizer.js b/lib/Synchronizer.js
index 99d48fe..ed4fecf 100644
--- a/lib/Synchronizer.js
+++ b/lib/Synchronizer.js
@@ -114,7 +114,7 @@ class Synchronizer {
remoteEntityId: entityId,
data: queue.map((ele) => ({
entity: ele.oper.targetEntity,
- rowIds: ele.oper.filter.id.$in,
+ rowIds: ele.oper.filter.id.$in, // 暂时应该没什么用
action: ele.oper.action,
data: ele.oper.data,
})),
diff --git a/lib/cluster/env.js b/lib/cluster/env.js
index 63fef08..7503829 100644
--- a/lib/cluster/env.js
+++ b/lib/cluster/env.js
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.getClusterInfo = void 0;
+exports.getClusterInfo = getClusterInfo;
function getProcessEnvOption(option) {
if (process.env.hasOwnProperty(option)) {
return process.env[option];
@@ -54,4 +54,3 @@ const MyClusterInfo = initialize();
function getClusterInfo() {
return MyClusterInfo;
}
-exports.getClusterInfo = getClusterInfo;
diff --git a/lib/routines/i18n.js b/lib/routines/i18n.js
index e396e0c..6356d35 100644
--- a/lib/routines/i18n.js
+++ b/lib/routines/i18n.js
@@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.checkAndUpdateI18n = exports.checkI18n = void 0;
+exports.checkI18n = checkI18n;
+exports.checkAndUpdateI18n = checkAndUpdateI18n;
const tslib_1 = require("tslib");
const node_path_1 = require("node:path");
const requirePrj_1 = tslib_1.__importDefault(require("../utils/requirePrj"));
@@ -66,7 +67,6 @@ async function checkAndUpdateI18nInner(context, onlyCheck) {
function checkI18n(context) {
return checkAndUpdateI18nInner(context, true);
}
-exports.checkI18n = checkI18n;
/**
* 检查项目目录下的i18n数据和数据库中的差异,并更新
* @param context
@@ -75,4 +75,3 @@ exports.checkI18n = checkI18n;
function checkAndUpdateI18n(context) {
return checkAndUpdateI18nInner(context);
}
-exports.checkAndUpdateI18n = checkAndUpdateI18n;
diff --git a/lib/utils/requirePrj.js b/lib/utils/requirePrj.js
index df6a041..fb4a96a 100644
--- a/lib/utils/requirePrj.js
+++ b/lib/utils/requirePrj.js
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = requireSth;
const fs_1 = require("fs");
const lodash_1 = require("oak-domain/lib/utils/lodash");
const path_1 = require("path");
@@ -20,4 +21,3 @@ function requireSth(prjPath, filePath, dependencies) {
}
return (0, lodash_1.mergeConcatMany)(sthExternal);
}
-exports.default = requireSth;