@xiaoguomeiyitian/core 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/lib_linux_20.jsc +0 -0
- package/dist/lib_linux_22.jsc +0 -0
- package/dist/lib_win32_20.jsc +0 -0
- package/dist/lib_win32_22.jsc +0 -0
- package/package.json +2 -1
- package/types/lib.d.ts +4 -0
package/dist/index.js
CHANGED
@@ -7,9 +7,10 @@ exports.GenServiceFunc = exports.GenEntityDefs = exports.delFiles = exports.copy
|
|
7
7
|
require("bytenode");
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
9
9
|
const path_1 = __importDefault(require("path"));
|
10
|
+
;
|
10
11
|
let lib = null;
|
11
|
-
if (fs_1.default.existsSync(path_1.default.resolve(process.cwd(), './
|
12
|
-
lib = require(path_1.default.resolve(process.cwd(), './
|
12
|
+
if (fs_1.default.existsSync(path_1.default.resolve(process.cwd(), './core'))) {
|
13
|
+
lib = require(path_1.default.resolve(process.cwd(), './core/lib'));
|
13
14
|
}
|
14
15
|
else {
|
15
16
|
lib = require("./lib_" + process.platform + '_' + process.versions.node.split('.')[0] + '.jsc');
|
package/dist/lib_linux_20.jsc
CHANGED
Binary file
|
package/dist/lib_linux_22.jsc
CHANGED
Binary file
|
package/dist/lib_win32_20.jsc
CHANGED
Binary file
|
package/dist/lib_win32_22.jsc
CHANGED
Binary file
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xiaoguomeiyitian/core",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.7",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"types": "types/lib.d.ts",
|
6
6
|
"bin": {
|
@@ -13,6 +13,7 @@
|
|
13
13
|
"dist/lib_*.jsc"
|
14
14
|
],
|
15
15
|
"scripts": {
|
16
|
+
"pull": "git stash && git pull && git stash pop",
|
16
17
|
"build": "tsc --build --diagnostics",
|
17
18
|
"jsc": "node ./gen_jsc.js ./dist/lib.js ./dist/lib.jsc",
|
18
19
|
"pack": "npm pack --pack-destination ../sheShou/server",
|
package/types/lib.d.ts
CHANGED
@@ -17,6 +17,10 @@ export declare class Global {
|
|
17
17
|
loadByRedis(type: string, id: string): Promise<any>;
|
18
18
|
/**数据写入到redis */
|
19
19
|
setToRedis(type: string, id: string, data: any): Promise<void>;
|
20
|
+
/**根据条件从mongo中查询单条实体数据*/
|
21
|
+
findOne(type: string, filter: any, keys?: string[]): Promise<any>;
|
22
|
+
/**根据条件从mongo中查询多条实体数据*/
|
23
|
+
find(type: string, filter: any, keys?: string[]): Promise<any>;
|
20
24
|
/**创建实体 单个进程只会创建一个相同id的实体*/
|
21
25
|
create(type: string, id?: string, cdata?: any): Promise<any>;
|
22
26
|
/**根据类型和id获取实体 */
|