@modern-js/bff-core 2.40.1-alpha.0 → 2.41.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.
@@ -31,18 +31,8 @@ var import_types = require("../types");
31
31
  const AllHttpMethods = Object.values(import_types.HttpMethod);
32
32
  var APIMode;
33
33
  (function(APIMode2) {
34
- APIMode2[
35
- /**
36
- * 框架模式
37
- */
38
- "FARMEWORK"
39
- ] = "framework";
40
- APIMode2[
41
- /**
42
- * 函数模式
43
- */
44
- "FUNCTION"
45
- ] = "function";
34
+ APIMode2["FARMEWORK"] = "framework";
35
+ APIMode2["FUNCTION"] = "function";
46
36
  })(APIMode || (APIMode = {}));
47
37
  const FRAMEWORK_MODE_LAMBDA_DIR = "lambda";
48
38
  const FRAMEWORK_MODE_APP_DIR = "app";
@@ -48,14 +48,9 @@ class ApiRouter {
48
48
  if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild)) {
49
49
  try {
50
50
  const projectSearchDir = this.appDir || this.apiDir;
51
- let tsconfigPath = import_path.default.join(this.appDir || process.cwd(), "tsconfig.json");
52
- const serverTsconfigPath = import_path.default.resolve(this.appDir || process.cwd(), "tsconfig.server.json");
53
- if (import_utils.fs.existsSync(serverTsconfigPath)) {
54
- tsconfigPath = serverTsconfigPath;
55
- }
56
51
  const tsNode = require("ts-node");
57
52
  tsNode.register({
58
- project: tsconfigPath,
53
+ projectSearchDir,
59
54
  compilerOptions: {
60
55
  allowJs: false
61
56
  },
@@ -2,18 +2,8 @@ import { HttpMethod } from "../types";
2
2
  const AllHttpMethods = Object.values(HttpMethod);
3
3
  var APIMode;
4
4
  (function(APIMode2) {
5
- APIMode2[
6
- /**
7
- * 框架模式
8
- */
9
- "FARMEWORK"
10
- ] = "framework";
11
- APIMode2[
12
- /**
13
- * 函数模式
14
- */
15
- "FUNCTION"
16
- ] = "function";
5
+ APIMode2["FARMEWORK"] = "framework";
6
+ APIMode2["FUNCTION"] = "function";
17
7
  })(APIMode || (APIMode = {}));
18
8
  const FRAMEWORK_MODE_LAMBDA_DIR = "lambda";
19
9
  const FRAMEWORK_MODE_APP_DIR = "app";
@@ -14,14 +14,9 @@ class ApiRouter {
14
14
  if (!existTsLoader && (process.env.NODE_ENV !== "production" || this.isBuild)) {
15
15
  try {
16
16
  const projectSearchDir = this.appDir || this.apiDir;
17
- let tsconfigPath = path.join(this.appDir || process.cwd(), "tsconfig.json");
18
- const serverTsconfigPath = path.resolve(this.appDir || process.cwd(), "tsconfig.server.json");
19
- if (fs.existsSync(serverTsconfigPath)) {
20
- tsconfigPath = serverTsconfigPath;
21
- }
22
17
  const tsNode = require("ts-node");
23
18
  tsNode.register({
24
- project: tsconfigPath,
19
+ projectSearchDir,
25
20
  compilerOptions: {
26
21
  allowJs: false
27
22
  },
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.40.1-alpha.0",
18
+ "version": "2.41.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "koa-compose": "^4.1.0",
32
32
  "reflect-metadata": "^0.1.13",
33
- "@swc/helpers": "0.5.1",
34
- "@modern-js/utils": "2.40.0"
33
+ "@swc/helpers": "0.5.3",
34
+ "@modern-js/utils": "2.41.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/jest": "^29",
@@ -43,9 +43,9 @@
43
43
  "type-fest": "2.15.0",
44
44
  "typescript": "^5",
45
45
  "zod": "^3.22.3",
46
- "@scripts/build": "2.40.0",
47
- "@scripts/jest-config": "2.40.0",
48
- "@modern-js/types": "2.40.0"
46
+ "@scripts/build": "2.41.0",
47
+ "@scripts/jest-config": "2.41.0",
48
+ "@modern-js/types": "2.41.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^3.22.3",