@eggjs/dal-runtime 4.0.0-beta.9 → 4.0.1-beta.0
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/README.md +1 -1
- package/dist/BaseSqlMap.d.ts +17 -14
- package/dist/BaseSqlMap.js +178 -233
- package/dist/CodeGenerator.d.ts +16 -13
- package/dist/CodeGenerator.js +118 -138
- package/dist/DaoLoader.d.ts +7 -3
- package/dist/DaoLoader.js +16 -14
- package/dist/DataSource.d.ts +31 -26
- package/dist/DataSource.js +73 -80
- package/dist/DatabaseForker.d.ts +15 -11
- package/dist/DatabaseForker.js +48 -49
- package/dist/MySqlDataSource.d.ts +30 -21
- package/dist/MySqlDataSource.js +56 -60
- package/dist/NunjucksConverter.d.ts +75 -72
- package/dist/NunjucksConverter.js +90 -93
- package/dist/NunjucksUtil.d.ts +8 -4
- package/dist/NunjucksUtil.js +55 -65
- package/dist/SqlGenerator.d.ts +12 -8
- package/dist/SqlGenerator.js +224 -392
- package/dist/SqlMapLoader.d.ts +13 -9
- package/dist/SqlMapLoader.js +23 -18
- package/dist/SqlUtil.d.ts +5 -2
- package/dist/SqlUtil.js +185 -213
- package/dist/TableModelInstanceBuilder.d.ts +9 -5
- package/dist/TableModelInstanceBuilder.js +25 -23
- package/dist/TableSqlMap.d.ts +19 -17
- package/dist/TableSqlMap.js +96 -90
- package/dist/TemplateUtil.d.ts +21 -18
- package/dist/TemplateUtil.js +74 -85
- package/dist/index.d.ts +15 -15
- package/dist/index.js +16 -16
- package/package.json +36 -39
package/dist/TableSqlMap.js
CHANGED
|
@@ -1,92 +1,98 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _TableSqlMap_instances, _TableSqlMap_extract;
|
|
7
|
-
import { Template } from 'nunjucks';
|
|
8
|
-
import { SqlType } from '@eggjs/tegg-types';
|
|
9
|
-
import { NunjucksUtils } from "./NunjucksUtil.js";
|
|
10
1
|
import { TemplateUtil } from "./TemplateUtil.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
2
|
+
import { NunjucksUtils } from "./NunjucksUtil.js";
|
|
3
|
+
import { SqlType } from "@eggjs/tegg-types";
|
|
4
|
+
import { Template } from "nunjucks";
|
|
5
|
+
|
|
6
|
+
//#region src/TableSqlMap.ts
|
|
7
|
+
const SQL_PARAMS = "$$__sql_params";
|
|
8
|
+
var TableSqlMap = class {
|
|
9
|
+
name;
|
|
10
|
+
map;
|
|
11
|
+
blocks;
|
|
12
|
+
sqlGenerator;
|
|
13
|
+
constructor(name, map) {
|
|
14
|
+
this.name = name;
|
|
15
|
+
this.map = map;
|
|
16
|
+
const env = NunjucksUtils.createEnv(name);
|
|
17
|
+
const extracted = this.#extract(this.map);
|
|
18
|
+
this.blocks = extracted.blocks;
|
|
19
|
+
this.sqlGenerator = extracted.sqlGenerator;
|
|
20
|
+
for (const key in this.blocks) {
|
|
21
|
+
// istanbul ignore if
|
|
22
|
+
if (!this.blocks.hasOwnProperty(key)) continue;
|
|
23
|
+
env.addGlobal(key, this.blocks[key]);
|
|
24
|
+
}
|
|
25
|
+
env.addFilter("toJson", TemplateUtil.toJson);
|
|
26
|
+
env.addFilter("toPoint", TemplateUtil.toPoint);
|
|
27
|
+
env.addFilter("toLine", TemplateUtil.toLine);
|
|
28
|
+
env.addFilter("toPolygon", TemplateUtil.toPolygon);
|
|
29
|
+
env.addFilter("toGeometry", TemplateUtil.toGeometry);
|
|
30
|
+
env.addFilter("toMultiPoint", TemplateUtil.toMultiPoint);
|
|
31
|
+
env.addFilter("toMultiLine", TemplateUtil.toMultiLine);
|
|
32
|
+
env.addFilter("toMultiPolygon", TemplateUtil.toMultiPolygon);
|
|
33
|
+
env.addFilter("toGeometryCollection", TemplateUtil.toGeometryCollection);
|
|
34
|
+
env.addFilter("param", function(value) {
|
|
35
|
+
if (this.ctx[SQL_PARAMS]) this.ctx[SQL_PARAMS].push(value);
|
|
36
|
+
return "?";
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
#extract(map) {
|
|
40
|
+
const ret = {
|
|
41
|
+
blocks: {},
|
|
42
|
+
sqlGenerator: {}
|
|
43
|
+
};
|
|
44
|
+
for (const key in map) {
|
|
45
|
+
// istanbul ignore if
|
|
46
|
+
if (!map.hasOwnProperty(key)) continue;
|
|
47
|
+
const sqlMap = map[key];
|
|
48
|
+
switch (sqlMap.type) {
|
|
49
|
+
case SqlType.BLOCK:
|
|
50
|
+
ret.blocks[key] = sqlMap.content || "";
|
|
51
|
+
break;
|
|
52
|
+
case SqlType.INSERT:
|
|
53
|
+
case SqlType.SELECT:
|
|
54
|
+
case SqlType.UPDATE:
|
|
55
|
+
case SqlType.DELETE:
|
|
56
|
+
default:
|
|
57
|
+
ret.sqlGenerator[key] = {
|
|
58
|
+
type: sqlMap.type,
|
|
59
|
+
template: NunjucksUtils.compile(this.name, key, sqlMap.sql || ""),
|
|
60
|
+
raw: sqlMap.sql
|
|
61
|
+
};
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return ret;
|
|
66
|
+
}
|
|
67
|
+
generate(name, data, timezone) {
|
|
68
|
+
const generator = this.sqlGenerator[name];
|
|
69
|
+
// istanbul ignore if
|
|
70
|
+
if (!generator) throw new Error(`No sql map named '${name}' in '${name}'.`);
|
|
71
|
+
const template = generator.template;
|
|
72
|
+
const params = [];
|
|
73
|
+
template.env.timezone = timezone;
|
|
74
|
+
const context = {
|
|
75
|
+
...data,
|
|
76
|
+
[SQL_PARAMS]: params
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
sql: template.render(context),
|
|
80
|
+
params
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
getType(name) {
|
|
84
|
+
const generator = this.sqlGenerator[name];
|
|
85
|
+
// istanbul ignore if
|
|
86
|
+
if (!generator) throw new Error(`No sql map named '${name}' in '${name}'.`);
|
|
87
|
+
return generator.type;
|
|
88
|
+
}
|
|
89
|
+
getTemplateString(name) {
|
|
90
|
+
const generator = this.sqlGenerator[name];
|
|
91
|
+
// istanbul ignore if
|
|
92
|
+
if (!generator) throw new Error(`No sql map named '${name}' in '${name}'.`);
|
|
93
|
+
return generator.raw;
|
|
94
|
+
}
|
|
91
95
|
};
|
|
92
|
-
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { TableSqlMap };
|
package/dist/TemplateUtil.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { ColumnModel } from
|
|
2
|
-
import { ColumnType } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { ColumnModel } from "@eggjs/dal-decorator";
|
|
2
|
+
import { ColumnType, Geometry, GeometryCollection, Line, MultiLine, MultiPoint, MultiPolygon, Point, Polygon } from "@eggjs/tegg-types";
|
|
3
|
+
|
|
4
|
+
//#region src/TemplateUtil.d.ts
|
|
5
|
+
declare class TemplateUtil {
|
|
6
|
+
static isSpatialType(columnModel: ColumnModel): boolean;
|
|
7
|
+
static importPath(tableModelPath: string, currentPath: string): string;
|
|
8
|
+
static dbTypeToTsType(columnType: ColumnType): string;
|
|
9
|
+
static toJson(value: any): string;
|
|
10
|
+
static toPoint(point: Point): string;
|
|
11
|
+
static toLine(val: Line): string;
|
|
12
|
+
static toPolygon(val: Polygon): string;
|
|
13
|
+
static toGeometry(val: Geometry): string;
|
|
14
|
+
static toMultiPoint(val: MultiPoint): string;
|
|
15
|
+
static toMultiLine(val: MultiLine): string;
|
|
16
|
+
static toMultiPolygon(val: MultiPolygon): string;
|
|
17
|
+
static toGeometryCollection(val: GeometryCollection): string;
|
|
18
|
+
static spatialFilter: Record<ColumnType, string>;
|
|
19
|
+
static getSpatialFilter(columnType: ColumnType): string;
|
|
19
20
|
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { TemplateUtil };
|
package/dist/TemplateUtil.js
CHANGED
|
@@ -1,86 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
return filter;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
TemplateUtil.spatialFilter = {
|
|
77
|
-
[ColumnType.POINT]: 'toPoint',
|
|
78
|
-
[ColumnType.LINESTRING]: 'toLine',
|
|
79
|
-
[ColumnType.POLYGON]: 'toPolygon',
|
|
80
|
-
[ColumnType.GEOMETRY]: 'toGeometry',
|
|
81
|
-
[ColumnType.MULTIPOINT]: 'toMultiPoint',
|
|
82
|
-
[ColumnType.MULTILINESTRING]: 'toMultiLine',
|
|
83
|
-
[ColumnType.MULTIPOLYGON]: 'toMultiPolygon',
|
|
84
|
-
[ColumnType.GEOMETRYCOLLECTION]: 'toGeometryCollection',
|
|
1
|
+
import { ColumnModel, SpatialHelper } from "@eggjs/dal-decorator";
|
|
2
|
+
import { ColumnType } from "@eggjs/tegg-types";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
//#region src/TemplateUtil.ts
|
|
6
|
+
var TemplateUtil = class TemplateUtil {
|
|
7
|
+
static isSpatialType(columnModel) {
|
|
8
|
+
switch (columnModel.type.type) {
|
|
9
|
+
case ColumnType.GEOMETRY:
|
|
10
|
+
case ColumnType.POINT:
|
|
11
|
+
case ColumnType.LINESTRING:
|
|
12
|
+
case ColumnType.POLYGON:
|
|
13
|
+
case ColumnType.MULTIPOINT:
|
|
14
|
+
case ColumnType.MULTILINESTRING:
|
|
15
|
+
case ColumnType.MULTIPOLYGON:
|
|
16
|
+
case ColumnType.GEOMETRYCOLLECTION: return true;
|
|
17
|
+
default: return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
static importPath(tableModelPath, currentPath) {
|
|
21
|
+
return path.relative(currentPath, tableModelPath);
|
|
22
|
+
}
|
|
23
|
+
static dbTypeToTsType(columnType) {
|
|
24
|
+
return `ColumnTsType['${columnType}']`;
|
|
25
|
+
}
|
|
26
|
+
static toJson(value) {
|
|
27
|
+
return JSON.stringify(JSON.stringify(value));
|
|
28
|
+
}
|
|
29
|
+
static toPoint(point) {
|
|
30
|
+
if (typeof point.x !== "number" || typeof point.y !== "number") throw new Error(`invalidate point ${JSON.stringify(point)}`);
|
|
31
|
+
return `Point(${point.x}, ${point.y})`;
|
|
32
|
+
}
|
|
33
|
+
static toLine(val) {
|
|
34
|
+
return `LINESTRING(${val.map((t) => TemplateUtil.toPoint(t)).join(",")})`;
|
|
35
|
+
}
|
|
36
|
+
static toPolygon(val) {
|
|
37
|
+
return `POLYGON(${val.map((t) => TemplateUtil.toLine(t)).join(",")})`;
|
|
38
|
+
}
|
|
39
|
+
static toGeometry(val) {
|
|
40
|
+
const type = SpatialHelper.getGeometryType(val);
|
|
41
|
+
return TemplateUtil[TemplateUtil.getSpatialFilter(type)](val);
|
|
42
|
+
}
|
|
43
|
+
static toMultiPoint(val) {
|
|
44
|
+
return `MULTIPOINT(${val.map((t) => TemplateUtil.toPoint(t)).join(",")})`;
|
|
45
|
+
}
|
|
46
|
+
static toMultiLine(val) {
|
|
47
|
+
return `MULTILINESTRING(${val.map((t) => TemplateUtil.toLine(t)).join(",")})`;
|
|
48
|
+
}
|
|
49
|
+
static toMultiPolygon(val) {
|
|
50
|
+
return `MULTIPOLYGON(${val.map((t) => TemplateUtil.toPolygon(t)).join(",")})`;
|
|
51
|
+
}
|
|
52
|
+
static toGeometryCollection(val) {
|
|
53
|
+
return `GEOMETRYCOLLECTION(${val.map((t) => {
|
|
54
|
+
return TemplateUtil.toGeometry(t);
|
|
55
|
+
}).join(",")})`;
|
|
56
|
+
}
|
|
57
|
+
static spatialFilter = {
|
|
58
|
+
[ColumnType.POINT]: "toPoint",
|
|
59
|
+
[ColumnType.LINESTRING]: "toLine",
|
|
60
|
+
[ColumnType.POLYGON]: "toPolygon",
|
|
61
|
+
[ColumnType.GEOMETRY]: "toGeometry",
|
|
62
|
+
[ColumnType.MULTIPOINT]: "toMultiPoint",
|
|
63
|
+
[ColumnType.MULTILINESTRING]: "toMultiLine",
|
|
64
|
+
[ColumnType.MULTIPOLYGON]: "toMultiPolygon",
|
|
65
|
+
[ColumnType.GEOMETRYCOLLECTION]: "toGeometryCollection"
|
|
66
|
+
};
|
|
67
|
+
static getSpatialFilter(columnType) {
|
|
68
|
+
const filter = TemplateUtil.spatialFilter[columnType];
|
|
69
|
+
if (!filter) throw new Error(`type ${columnType} is not spatial type`);
|
|
70
|
+
return filter;
|
|
71
|
+
}
|
|
85
72
|
};
|
|
86
|
-
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { TemplateUtil };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
1
|
+
import { BaseSqlMapGenerator } from "./BaseSqlMap.js";
|
|
2
|
+
import { CodeGenerator } from "./CodeGenerator.js";
|
|
3
|
+
import { DaoLoader } from "./DaoLoader.js";
|
|
4
|
+
import { DataSourceOptions, EggQueryOptions, MysqlDataSource } from "./MySqlDataSource.js";
|
|
5
|
+
import { DatabaseForker } from "./DatabaseForker.js";
|
|
6
|
+
import { TableSqlMap } from "./TableSqlMap.js";
|
|
7
|
+
import { DataSource, ExecuteSql } from "./DataSource.js";
|
|
8
|
+
import { NunjucksConverter } from "./NunjucksConverter.js";
|
|
9
|
+
import { NunjucksUtils } from "./NunjucksUtil.js";
|
|
10
|
+
import { SqlGenerator } from "./SqlGenerator.js";
|
|
11
|
+
import { SqlMapLoader } from "./SqlMapLoader.js";
|
|
12
|
+
import { SqlUtil } from "./SqlUtil.js";
|
|
13
|
+
import { TableModelInstanceBuilder } from "./TableModelInstanceBuilder.js";
|
|
14
|
+
import { TemplateUtil } from "./TemplateUtil.js";
|
|
15
|
+
export { BaseSqlMapGenerator, CodeGenerator, DaoLoader, DataSource, DataSourceOptions, DatabaseForker, EggQueryOptions, ExecuteSql, MysqlDataSource, NunjucksConverter, NunjucksUtils, SqlGenerator, SqlMapLoader, SqlUtil, TableModelInstanceBuilder, TableSqlMap, TemplateUtil };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { TemplateUtil } from "./TemplateUtil.js";
|
|
2
|
+
import { BaseSqlMapGenerator } from "./BaseSqlMap.js";
|
|
3
|
+
import { SqlGenerator } from "./SqlGenerator.js";
|
|
4
|
+
import { CodeGenerator } from "./CodeGenerator.js";
|
|
5
|
+
import { DaoLoader } from "./DaoLoader.js";
|
|
6
|
+
import { MysqlDataSource } from "./MySqlDataSource.js";
|
|
7
|
+
import { DatabaseForker } from "./DatabaseForker.js";
|
|
8
|
+
import { TableModelInstanceBuilder } from "./TableModelInstanceBuilder.js";
|
|
9
|
+
import { NunjucksConverter } from "./NunjucksConverter.js";
|
|
10
|
+
import { SqlUtil } from "./SqlUtil.js";
|
|
11
|
+
import { NunjucksUtils } from "./NunjucksUtil.js";
|
|
12
|
+
import { TableSqlMap } from "./TableSqlMap.js";
|
|
13
|
+
import { DataSource } from "./DataSource.js";
|
|
14
|
+
import { SqlMapLoader } from "./SqlMapLoader.js";
|
|
15
|
+
|
|
16
|
+
export { BaseSqlMapGenerator, CodeGenerator, DaoLoader, DataSource, DatabaseForker, MysqlDataSource, NunjucksConverter, NunjucksUtils, SqlGenerator, SqlMapLoader, SqlUtil, TableModelInstanceBuilder, TableSqlMap, TemplateUtil };
|
package/package.json
CHANGED
|
@@ -1,67 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/dal-runtime",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "tegg dal
|
|
3
|
+
"version": "4.0.1-beta.0",
|
|
4
|
+
"description": "tegg dal runtime",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"typescript",
|
|
6
|
+
"dal",
|
|
8
7
|
"decorator",
|
|
8
|
+
"egg",
|
|
9
|
+
"runtime",
|
|
9
10
|
"tegg",
|
|
10
|
-
"
|
|
11
|
-
],
|
|
12
|
-
"type": "module",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": "./dist/index.js",
|
|
15
|
-
"./package.json": "./package.json"
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist"
|
|
11
|
+
"typescript"
|
|
19
12
|
],
|
|
20
|
-
"
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"homepage": "https://github.com/eggjs/tegg/tree/next/core/dal-runtime",
|
|
13
|
+
"homepage": "https://github.com/eggjs/egg/tree/next/tegg/core/dal-runtime",
|
|
23
14
|
"bugs": {
|
|
24
|
-
"url": "https://github.com/eggjs/
|
|
15
|
+
"url": "https://github.com/eggjs/egg/issues"
|
|
25
16
|
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "killagu <killa123@126.com>",
|
|
26
19
|
"repository": {
|
|
27
20
|
"type": "git",
|
|
28
|
-
"url": "git
|
|
29
|
-
"directory": "core/dal-
|
|
21
|
+
"url": "git+https://github.com/eggjs/egg.git",
|
|
22
|
+
"directory": "tegg/core/dal-runtime"
|
|
30
23
|
},
|
|
31
|
-
"
|
|
32
|
-
"
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": "./dist/index.js",
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@eggjs/rds": "^1.
|
|
39
|
+
"@eggjs/rds": "^1.5.0",
|
|
36
40
|
"js-beautify": "^1.15.3",
|
|
37
41
|
"lodash": "^4.17.21",
|
|
38
42
|
"nunjucks": "^3.2.4",
|
|
39
43
|
"sdk-base": "^5.0.1",
|
|
40
44
|
"sqlstring": "^2.3.3",
|
|
41
|
-
"@eggjs/core-decorator": "4.0.
|
|
42
|
-
"@eggjs/dal-decorator": "4.0.
|
|
43
|
-
"@eggjs/tegg-loader": "4.0.
|
|
44
|
-
"@eggjs/tegg-types": "4.0.
|
|
45
|
-
},
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
45
|
+
"@eggjs/core-decorator": "4.0.1-beta.0",
|
|
46
|
+
"@eggjs/dal-decorator": "4.0.1-beta.0",
|
|
47
|
+
"@eggjs/tegg-loader": "4.0.1-beta.0",
|
|
48
|
+
"@eggjs/tegg-types": "4.0.1-beta.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@types/js-beautify": "^1.14.3",
|
|
51
52
|
"@types/lodash": "^4.17.20",
|
|
52
|
-
"@types/node": "^
|
|
53
|
+
"@types/node": "^24.10.2",
|
|
53
54
|
"@types/nunjucks": "^3.2.6",
|
|
54
55
|
"@types/sqlstring": "^2.3.2",
|
|
55
|
-
"typescript": "^5.9.3"
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
"typescript": "^5.9.3"
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22.18.0"
|
|
58
60
|
},
|
|
59
|
-
"main": "./dist/index.js",
|
|
60
|
-
"module": "./dist/index.js",
|
|
61
|
-
"types": "./dist/index.d.ts",
|
|
62
61
|
"scripts": {
|
|
63
|
-
"
|
|
64
|
-
"build": "tsdown && rimraf dist && tsc -b --clean && tsc",
|
|
65
|
-
"typecheck": "tsc --noEmit"
|
|
62
|
+
"typecheck": "tsgo --noEmit"
|
|
66
63
|
}
|
|
67
64
|
}
|