@modern-js/plugin-bff 3.2.0 → 3.2.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/dist/cjs/cli.js CHANGED
@@ -47,7 +47,6 @@ const pluginGenerator_js_namespaceObject = require("./utils/pluginGenerator.js")
47
47
  var pluginGenerator_js_default = /*#__PURE__*/ __webpack_require__.n(pluginGenerator_js_namespaceObject);
48
48
  const runtimeGenerator_js_namespaceObject = require("./utils/runtimeGenerator.js");
49
49
  var runtimeGenerator_js_default = /*#__PURE__*/ __webpack_require__.n(runtimeGenerator_js_namespaceObject);
50
- const TS_CONFIG_FILENAME = 'tsconfig.json';
51
50
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
52
51
  const bffPlugin = ()=>({
53
52
  name: '@modern-js/plugin-bff',
@@ -58,7 +57,7 @@ const bffPlugin = ()=>({
58
57
  const distDir = external_path_default().resolve(distDirectory);
59
58
  const apiDir = apiDirectory || external_path_default().resolve(appDirectory, utils_namespaceObject.API_DIR);
60
59
  const sharedDir = sharedDirectory || external_path_default().resolve(appDirectory, utils_namespaceObject.SHARED_DIR);
61
- const tsconfigPath = external_path_default().resolve(appDirectory, TS_CONFIG_FILENAME);
60
+ const tsconfigPath = (0, utils_namespaceObject.resolveServerTsconfig)(appDirectory, modernConfig?.server?.tsconfigPath);
62
61
  const sourceDirs = [];
63
62
  if (await utils_namespaceObject.fs.pathExists(apiDir)) sourceDirs.push(apiDir);
64
63
  if (await utils_namespaceObject.fs.pathExists(sharedDir)) sourceDirs.push(sharedDir);
package/dist/esm/cli.mjs CHANGED
@@ -1,11 +1,10 @@
1
1
  import path from "path";
2
2
  import { ApiRouter } from "@modern-js/bff-core";
3
3
  import { compile } from "@modern-js/server-utils";
4
- import { API_DIR, DEFAULT_API_PREFIX, SHARED_DIR, fs, normalizeOutputPath } from "@modern-js/utils";
4
+ import { API_DIR, DEFAULT_API_PREFIX, SHARED_DIR, fs, normalizeOutputPath, resolveServerTsconfig } from "@modern-js/utils";
5
5
  import clientGenerator from "./utils/clientGenerator.mjs";
6
6
  import pluginGenerator from "./utils/pluginGenerator.mjs";
7
7
  import runtimeGenerator from "./utils/runtimeGenerator.mjs";
8
- const TS_CONFIG_FILENAME = 'tsconfig.json';
9
8
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
10
9
  const bffPlugin = ()=>({
11
10
  name: '@modern-js/plugin-bff',
@@ -16,7 +15,7 @@ const bffPlugin = ()=>({
16
15
  const distDir = path.resolve(distDirectory);
17
16
  const apiDir = apiDirectory || path.resolve(appDirectory, API_DIR);
18
17
  const sharedDir = sharedDirectory || path.resolve(appDirectory, SHARED_DIR);
19
- const tsconfigPath = path.resolve(appDirectory, TS_CONFIG_FILENAME);
18
+ const tsconfigPath = resolveServerTsconfig(appDirectory, modernConfig?.server?.tsconfigPath);
20
19
  const sourceDirs = [];
21
20
  if (await fs.pathExists(apiDir)) sourceDirs.push(apiDir);
22
21
  if (await fs.pathExists(sharedDir)) sourceDirs.push(sharedDir);
@@ -2,14 +2,13 @@ import "node:module";
2
2
  import path from "path";
3
3
  import { ApiRouter } from "@modern-js/bff-core";
4
4
  import { compile } from "@modern-js/server-utils";
5
- import { API_DIR, DEFAULT_API_PREFIX, SHARED_DIR, fs, normalizeOutputPath } from "@modern-js/utils";
5
+ import { API_DIR, DEFAULT_API_PREFIX, SHARED_DIR, fs, normalizeOutputPath, resolveServerTsconfig } from "@modern-js/utils";
6
6
  import clientGenerator from "./utils/clientGenerator.mjs";
7
7
  import pluginGenerator from "./utils/pluginGenerator.mjs";
8
8
  import runtimeGenerator from "./utils/runtimeGenerator.mjs";
9
9
  import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
10
10
  import { dirname as __rspack_dirname } from "node:path";
11
11
  var cli_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
12
- const TS_CONFIG_FILENAME = 'tsconfig.json';
13
12
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
14
13
  const bffPlugin = ()=>({
15
14
  name: '@modern-js/plugin-bff',
@@ -20,7 +19,7 @@ const bffPlugin = ()=>({
20
19
  const distDir = path.resolve(distDirectory);
21
20
  const apiDir = apiDirectory || path.resolve(appDirectory, API_DIR);
22
21
  const sharedDir = sharedDirectory || path.resolve(appDirectory, SHARED_DIR);
23
- const tsconfigPath = path.resolve(appDirectory, TS_CONFIG_FILENAME);
22
+ const tsconfigPath = resolveServerTsconfig(appDirectory, modernConfig?.server?.tsconfigPath);
24
23
  const sourceDirs = [];
25
24
  if (await fs.pathExists(apiDir)) sourceDirs.push(apiDir);
26
25
  if (await fs.pathExists(sharedDir)) sourceDirs.push(sharedDir);
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.2.0",
18
+ "version": "3.2.1",
19
19
  "types": "./dist/types/cli.d.ts",
20
20
  "main": "./dist/cjs/cli.js",
21
21
  "exports": {
@@ -79,29 +79,29 @@
79
79
  "@swc/helpers": "^0.5.17",
80
80
  "qs": "^6.15.1",
81
81
  "type-is": "^1.6.18",
82
- "@modern-js/bff-core": "3.2.0",
83
- "@modern-js/builder": "3.2.0",
84
- "@modern-js/create-request": "3.2.0",
85
- "@modern-js/server-core": "3.2.0",
86
- "@modern-js/server-utils": "3.2.0",
87
- "@modern-js/utils": "3.2.0"
82
+ "@modern-js/bff-core": "3.2.1",
83
+ "@modern-js/builder": "3.2.1",
84
+ "@modern-js/server-core": "3.2.1",
85
+ "@modern-js/create-request": "3.2.1",
86
+ "@modern-js/server-utils": "3.2.1",
87
+ "@modern-js/utils": "3.2.1"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@rsbuild/core": "2.0.0",
91
- "@rslib/core": "0.21.4",
91
+ "@rslib/core": "0.21.5",
92
92
  "@types/node": "^20",
93
93
  "@types/qs": "^6.15.1",
94
94
  "@types/type-is": "^1.6.7",
95
95
  "memfs": "^3.5.3",
96
96
  "typescript": "^5",
97
97
  "zod": "^3.25.76",
98
- "@modern-js/bff-runtime": "3.2.0",
99
- "@modern-js/app-tools": "3.2.0",
100
- "@modern-js/plugin": "3.2.0",
98
+ "@modern-js/app-tools": "3.2.1",
99
+ "@modern-js/bff-runtime": "3.2.1",
101
100
  "@modern-js/rslib": "2.68.10",
102
- "@modern-js/runtime": "3.2.0",
101
+ "@modern-js/plugin": "3.2.1",
102
+ "@modern-js/types": "3.2.1",
103
103
  "@scripts/rstest-config": "2.66.0",
104
- "@modern-js/types": "3.2.0"
104
+ "@modern-js/runtime": "3.2.1"
105
105
  },
106
106
  "sideEffects": false,
107
107
  "publishConfig": {