dinegg 2.15.0 → 2.15.1
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/lib/tshelper.js +23 -23
- package/package.json +2 -2
package/lib/tshelper.js
CHANGED
|
@@ -77,29 +77,29 @@ module.exports = (importsModules = []) => {
|
|
|
77
77
|
// interfaceHandle: val => `ReturnType<typeof ${val}>`, // interface 预处理方法
|
|
78
78
|
// trigger: ['add', 'unlink'], // 当接收到这些文件更改事件的时候,会触发 d.ts 的重新生成, 所有事件: ['add', 'unlink', 'change']
|
|
79
79
|
},
|
|
80
|
-
oldService: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
80
|
+
// oldService: {
|
|
81
|
+
// directory: "app/service", // 监听目录
|
|
82
|
+
// // pattern: servicePattern, // 遍历的文件表达式,一般都不需要改这个
|
|
83
|
+
// // ignore: '', // 指定忽略某些文件的表达式,默认为空
|
|
84
|
+
// generator: "auto", // 生成器名称,取值为 class、auto、function、object
|
|
85
|
+
// // generator: genratorService, // 生成器名称,取值为 class、auto、function、object
|
|
86
|
+
// interface: "oIService", // interface 名称,如果不填的话,将会随机生成个 interface
|
|
87
|
+
// declareTo: 'Context.svs', // 指定定义到 egg 的某个类型下
|
|
88
|
+
// distName: "svs.d.ts", //读源码发现可以传入此参数实现自定义声明文件名称。解决了问题,无需自定义。
|
|
89
|
+
// watch: true, // 是否需要监听文件改动
|
|
90
|
+
// caseStyle: function (pathItem) {
|
|
91
|
+
// // 此处逻辑必须跟自定义加载器中的caseStyle自定义方法相一致,否则生成的d.ts无法对应。
|
|
92
|
+
// // pathItem = pathItem.replace(/.service$/, "");
|
|
93
|
+
// if (!/^[a-z][a-z0-9_-]*$/i.test(pathItem)) {
|
|
94
|
+
// throw new Error(`${pathItem} is not match 'a-z0-9_-' in ${pathItem}`);
|
|
95
|
+
// }
|
|
96
|
+
// pathItem = pathItem.replace(/[_-][a-z]/gi, (s) => s.substring(1).toUpperCase());
|
|
97
|
+
// const first = pathItem[0];
|
|
98
|
+
// return first.toLowerCase() + pathItem.substring(1);
|
|
99
|
+
// }, // 模块命名格式
|
|
100
|
+
// // interfaceHandle: val => `ReturnType<typeof ${val}>`, // interface 预处理方法
|
|
101
|
+
// // trigger: ['add', 'unlink'], // 当接收到这些文件更改事件的时候,会触发 d.ts 的重新生成, 所有事件: ['add', 'unlink', 'change']
|
|
102
|
+
// },
|
|
103
103
|
moduleController: {
|
|
104
104
|
directory: "app/modules", // 监听目录
|
|
105
105
|
pattern: controllerPattern, // 遍历的文件表达式,一般都不需要改这个
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dinegg",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.1",
|
|
4
4
|
"description": "egg framework dinegg.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@diyaner/egg-sequelize": "^6.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test-decorator": "tsc && egg-bin test ./test/decorator.test.js && npm run clean:js",
|
|
34
34
|
"test-appCache": "tsc && egg-bin test ./test/appCache.test.js && npm run clean:js",
|
|
35
35
|
"tsc": "tsc",
|
|
36
|
-
"clean:js": "
|
|
36
|
+
"clean:js": "tsc -b --clean",
|
|
37
37
|
"release": "tsc && npm publish && npm run clean:js",
|
|
38
38
|
"cov": "egg-bin cov",
|
|
39
39
|
"lint": "eslint . --resolve-plugins-relative-to .",
|