@modern-js/bff-core 2.25.1-alpha.0 → 2.25.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @modern-js/bff-core
|
|
2
2
|
|
|
3
|
+
## 2.25.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 358ed24: fix: support configuration ts-node and avoid to register ts-node unnecessarily
|
|
8
|
+
fix: 支持配置 ts-node,避免对 ts-node 不必要的注册
|
|
9
|
+
- Updated dependencies [63d8247]
|
|
10
|
+
- Updated dependencies [6651684]
|
|
11
|
+
- Updated dependencies [272646c]
|
|
12
|
+
- Updated dependencies [358ed24]
|
|
13
|
+
- @modern-js/utils@2.25.2
|
|
14
|
+
- @modern-js/bff-runtime@2.25.2
|
|
15
|
+
|
|
16
|
+
## 2.25.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [9f78d0c]
|
|
21
|
+
- @modern-js/utils@2.25.1
|
|
22
|
+
- @modern-js/bff-runtime@2.25.1
|
|
23
|
+
|
|
3
24
|
## 2.25.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -47,7 +47,7 @@ const generateClient = async ({ appDir, resourcePath, apiDir, lambdaDir, prefix,
|
|
|
47
47
|
let handlersCode = "";
|
|
48
48
|
for (const handlerInfo of handlerInfos) {
|
|
49
49
|
const { name, httpMethod, routePath } = handlerInfo;
|
|
50
|
-
let exportStatement = `
|
|
50
|
+
let exportStatement = `var ${name} =`;
|
|
51
51
|
if (name.toLowerCase() === "default") {
|
|
52
52
|
exportStatement = "default";
|
|
53
53
|
}
|
package/dist/cjs/router/index.js
CHANGED
|
@@ -22,7 +22,7 @@ _export_star._(require("./types"), exports);
|
|
|
22
22
|
class ApiRouter {
|
|
23
23
|
enableRegister() {
|
|
24
24
|
const existTsLoader = Boolean(require.extensions[".ts"]);
|
|
25
|
-
if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild
|
|
25
|
+
if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild)) {
|
|
26
26
|
try {
|
|
27
27
|
const projectSearchDir = this.appDir || this.apiDir;
|
|
28
28
|
const tsNode = require("ts-node");
|
|
@@ -27,7 +27,7 @@ export const generateClient = async ({ appDir, resourcePath, apiDir, lambdaDir,
|
|
|
27
27
|
let handlersCode = "";
|
|
28
28
|
for (const handlerInfo of handlerInfos) {
|
|
29
29
|
const { name, httpMethod, routePath } = handlerInfo;
|
|
30
|
-
let exportStatement = `
|
|
30
|
+
let exportStatement = `var ${name} =`;
|
|
31
31
|
if (name.toLowerCase() === "default") {
|
|
32
32
|
exportStatement = "default";
|
|
33
33
|
}
|
package/dist/esm/router/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export * from "./constants";
|
|
|
11
11
|
export class ApiRouter {
|
|
12
12
|
enableRegister() {
|
|
13
13
|
const existTsLoader = Boolean(require.extensions[".ts"]);
|
|
14
|
-
if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild
|
|
14
|
+
if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild)) {
|
|
15
15
|
try {
|
|
16
16
|
const projectSearchDir = this.appDir || this.apiDir;
|
|
17
17
|
const tsNode = require("ts-node");
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.25.
|
|
18
|
+
"version": "2.25.2",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"koa-compose": "^4.1.0",
|
|
32
32
|
"reflect-metadata": "^0.1.13",
|
|
33
33
|
"@swc/helpers": "0.5.1",
|
|
34
|
-
"@modern-js/
|
|
35
|
-
"@modern-js/
|
|
34
|
+
"@modern-js/bff-runtime": "2.25.2",
|
|
35
|
+
"@modern-js/utils": "2.25.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^29",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"type-fest": "2.15.0",
|
|
45
45
|
"typescript": "^5",
|
|
46
46
|
"zod": "^3.17.3",
|
|
47
|
-
"@scripts/
|
|
48
|
-
"@modern-js/types": "2.25.
|
|
49
|
-
"@scripts/
|
|
47
|
+
"@scripts/jest-config": "2.25.2",
|
|
48
|
+
"@modern-js/types": "2.25.2",
|
|
49
|
+
"@scripts/build": "2.25.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"zod": "^3.17.3",
|