@modern-js/bff-core 2.20.0 → 2.20.1-alpha.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.
@@ -60,7 +60,7 @@ const enableRegister = (requireFn) => {
60
60
  }
61
61
  if (!existTsLoader) {
62
62
  try {
63
- const projectSearchDir = _path.default.dirname(modulePath);
63
+ const projectSearchDir = process.cwd();
64
64
  const tsNode = require("ts-node");
65
65
  tsNode.register({
66
66
  projectSearchDir,
@@ -41,7 +41,7 @@ const enableRegister = (requireFn) => {
41
41
  }
42
42
  if (!existTsLoader) {
43
43
  try {
44
- const projectSearchDir = path.dirname(modulePath);
44
+ const projectSearchDir = process.cwd();
45
45
  const tsNode = require("ts-node");
46
46
  tsNode.register({
47
47
  projectSearchDir,
@@ -4,7 +4,6 @@ export declare enum APIMode {
4
4
  * 框架模式
5
5
  */
6
6
  FARMEWORK = "framework",
7
-
8
7
  /**
9
8
  * 函数模式
10
9
  */
@@ -40,7 +40,6 @@ export declare class ApiRouter {
40
40
  * 如果用户未传入或传入空串,默认为 /api
41
41
  * 如果传入 /,则 prefix 为 /
42
42
  */
43
-
44
43
  private initPrefix;
45
44
  private validateAbsolute;
46
45
  private getExactApiMode;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.20.0",
18
+ "version": "2.20.1-alpha.1",
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/bff-runtime": "2.20.0",
35
- "@modern-js/utils": "2.20.0"
34
+ "@modern-js/utils": "2.20.0",
35
+ "@modern-js/bff-runtime": "2.20.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "^29",
@@ -42,7 +42,7 @@
42
42
  "ts-node": "^10.9.1",
43
43
  "tsconfig-paths": "^4.1.2",
44
44
  "type-fest": "2.15.0",
45
- "typescript": "^4",
45
+ "typescript": "^5",
46
46
  "zod": "^3.17.3",
47
47
  "@modern-js/types": "2.20.0",
48
48
  "@scripts/build": "2.20.0",