@modern-js/plugin-bff 3.1.0 → 3.1.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/dist/esm/cli.mjs CHANGED
@@ -203,4 +203,5 @@ const bffPlugin = ()=>({
203
203
  }
204
204
  });
205
205
  const cli = bffPlugin;
206
- export { bffPlugin, cli as default };
206
+ export default cli;
207
+ export { bffPlugin };
@@ -36,4 +36,4 @@ async function loader(source) {
36
36
  callback(void 0, result.isOk ? result.value : `throw new Error('${result.value}')`);
37
37
  }
38
38
  const src_loader = loader;
39
- export { src_loader as default };
39
+ export default src_loader;
@@ -1,2 +1 @@
1
- import { configure, createRequest, createUploader } from "@modern-js/create-request";
2
- export { configure, createRequest, createUploader };
1
+ export { configure, createRequest, createUploader } from "@modern-js/create-request";
@@ -28,7 +28,7 @@ class HonoAdapter {
28
28
  method,
29
29
  handler,
30
30
  order: 'post',
31
- before
31
+ before: before
32
32
  }));
33
33
  };
34
34
  this.registerApiRoutes = async ()=>{
@@ -88,7 +88,7 @@ class HonoAdapter {
88
88
  path: `${prefix}/*`,
89
89
  method: 'all',
90
90
  order: 'post',
91
- before,
91
+ before: before,
92
92
  handler: async (c, next)=>{
93
93
  if (this.apiServer) {
94
94
  const nodeReq = c.env?.node?.req;
@@ -104,4 +104,4 @@ const server = ()=>({
104
104
  });
105
105
  }
106
106
  });
107
- export { server as default };
107
+ export default server;
@@ -172,4 +172,5 @@ async function clientGenerator(draftOptions) {
172
172
  setPackage(sourceList, draftOptions.appDir, draftOptions.relativeDistPath);
173
173
  }
174
174
  const utils_clientGenerator = clientGenerator;
175
- export { copyFiles, utils_clientGenerator as default, readDirectoryFiles };
175
+ export default utils_clientGenerator;
176
+ export { copyFiles, readDirectoryFiles };
@@ -88,4 +88,5 @@ const getHonoInput = async (c)=>{
88
88
  return draft;
89
89
  };
90
90
  const utils_createHonoRoutes = createHonoRoutes;
91
- export { createHonoHandler, utils_createHonoRoutes as default };
91
+ export default utils_createHonoRoutes;
92
+ export { createHonoHandler };
@@ -31,4 +31,5 @@ When using cross-project BFF, you should not configure bff.prefix as it may caus
31
31
  }
32
32
  });
33
33
  const utils_crossProjectApiPlugin = crossProjectApiPlugin;
34
- export { API_DIR, DIST_DIR, LAMBDA_DIR, PACKAGE_NAME, PREFIX, crossProjectApiPlugin, utils_crossProjectApiPlugin as default };
34
+ export default utils_crossProjectApiPlugin;
35
+ export { API_DIR, DIST_DIR, LAMBDA_DIR, PACKAGE_NAME, PREFIX, crossProjectApiPlugin };
@@ -26,4 +26,4 @@ async function pluginGenerator({ prefix, appDirectory, relativeDistPath, relativ
26
26
  }
27
27
  }
28
28
  const utils_pluginGenerator = pluginGenerator;
29
- export { utils_pluginGenerator as default };
29
+ export default utils_pluginGenerator;
@@ -40,4 +40,4 @@ async function runtimeGenerator({ runtime, appDirectory, relativeDistPath, packa
40
40
  await fs.writeFile(pluginTypePath, tsSource);
41
41
  }
42
42
  const utils_runtimeGenerator = runtimeGenerator;
43
- export { utils_runtimeGenerator as default };
43
+ export default utils_runtimeGenerator;
@@ -1,6 +1,4 @@
1
1
  import "node:module";
2
- import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
3
- import { dirname as __rspack_dirname } from "node:path";
4
2
  import path from "path";
5
3
  import { ApiRouter } from "@modern-js/bff-core";
6
4
  import { compile } from "@modern-js/server-utils";
@@ -8,6 +6,8 @@ import { API_DIR, DEFAULT_API_PREFIX, SHARED_DIR, fs, normalizeOutputPath } from
8
6
  import clientGenerator from "./utils/clientGenerator.mjs";
9
7
  import pluginGenerator from "./utils/pluginGenerator.mjs";
10
8
  import runtimeGenerator from "./utils/runtimeGenerator.mjs";
9
+ import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
10
+ import { dirname as __rspack_dirname } from "node:path";
11
11
  var cli_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
12
12
  const TS_CONFIG_FILENAME = 'tsconfig.json';
13
13
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
@@ -207,4 +207,5 @@ const bffPlugin = ()=>({
207
207
  }
208
208
  });
209
209
  const cli = bffPlugin;
210
- export { bffPlugin, cli as default };
210
+ export default cli;
211
+ export { bffPlugin };
@@ -38,4 +38,4 @@ async function loader(source) {
38
38
  callback(void 0, result.isOk ? result.value : `throw new Error('${result.value}')`);
39
39
  }
40
40
  const src_loader = loader;
41
- export { src_loader as default };
41
+ export default src_loader;
@@ -1,3 +1,2 @@
1
1
  import "node:module";
2
- import { configure, createRequest, createUploader } from "@modern-js/create-request";
3
- export { configure, createRequest, createUploader };
2
+ export { configure, createRequest, createUploader } from "@modern-js/create-request";
@@ -29,7 +29,7 @@ class HonoAdapter {
29
29
  method,
30
30
  handler,
31
31
  order: 'post',
32
- before
32
+ before: before
33
33
  }));
34
34
  };
35
35
  this.registerApiRoutes = async ()=>{
@@ -89,7 +89,7 @@ class HonoAdapter {
89
89
  path: `${prefix}/*`,
90
90
  method: 'all',
91
91
  order: 'post',
92
- before,
92
+ before: before,
93
93
  handler: async (c, next)=>{
94
94
  if (this.apiServer) {
95
95
  const nodeReq = c.env?.node?.req;
@@ -105,4 +105,4 @@ const server = ()=>({
105
105
  });
106
106
  }
107
107
  });
108
- export { server as default };
108
+ export default server;
@@ -173,4 +173,5 @@ async function clientGenerator(draftOptions) {
173
173
  setPackage(sourceList, draftOptions.appDir, draftOptions.relativeDistPath);
174
174
  }
175
175
  const utils_clientGenerator = clientGenerator;
176
- export { copyFiles, utils_clientGenerator as default, readDirectoryFiles };
176
+ export default utils_clientGenerator;
177
+ export { copyFiles, readDirectoryFiles };
@@ -89,4 +89,5 @@ const getHonoInput = async (c)=>{
89
89
  return draft;
90
90
  };
91
91
  const utils_createHonoRoutes = createHonoRoutes;
92
- export { createHonoHandler, utils_createHonoRoutes as default };
92
+ export default utils_createHonoRoutes;
93
+ export { createHonoHandler };
@@ -32,4 +32,5 @@ When using cross-project BFF, you should not configure bff.prefix as it may caus
32
32
  }
33
33
  });
34
34
  const utils_crossProjectApiPlugin = crossProjectApiPlugin;
35
- export { API_DIR, DIST_DIR, LAMBDA_DIR, PACKAGE_NAME, PREFIX, crossProjectApiPlugin, utils_crossProjectApiPlugin as default };
35
+ export default utils_crossProjectApiPlugin;
36
+ export { API_DIR, DIST_DIR, LAMBDA_DIR, PACKAGE_NAME, PREFIX, crossProjectApiPlugin };
@@ -1,9 +1,9 @@
1
1
  import "node:module";
2
- import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
3
- import { dirname as __rspack_dirname } from "node:path";
4
2
  import path from "path";
5
3
  import { fs, logger, normalizeToPosixPath } from "@modern-js/utils";
6
4
  import { API_DIR, DIST_DIR, LAMBDA_DIR, PACKAGE_NAME, PREFIX } from "./crossProjectApiPlugin.mjs";
5
+ import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
6
+ import { dirname as __rspack_dirname } from "node:path";
7
7
  var pluginGenerator_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
8
8
  function replaceContent(source, packageName, prefix, relativeDistPath, relativeApiPath, relativeLambdaPath) {
9
9
  const updatedSource = source.replace(new RegExp(PACKAGE_NAME, 'g'), packageName).replace(new RegExp(PREFIX, 'g'), prefix).replace(new RegExp(DIST_DIR, 'g'), normalizeToPosixPath(relativeDistPath)).replace(new RegExp(API_DIR, 'g'), normalizeToPosixPath(relativeApiPath)).replace(new RegExp(LAMBDA_DIR, 'g'), normalizeToPosixPath(relativeLambdaPath));
@@ -30,4 +30,4 @@ async function pluginGenerator({ prefix, appDirectory, relativeDistPath, relativ
30
30
  }
31
31
  }
32
32
  const utils_pluginGenerator = pluginGenerator;
33
- export { utils_pluginGenerator as default };
33
+ export default utils_pluginGenerator;
@@ -42,4 +42,4 @@ async function runtimeGenerator({ runtime, appDirectory, relativeDistPath, packa
42
42
  await fs.writeFile(pluginTypePath, tsSource);
43
43
  }
44
44
  const utils_runtimeGenerator = runtimeGenerator;
45
- export { utils_runtimeGenerator as default };
45
+ export default utils_runtimeGenerator;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.0",
18
+ "version": "3.1.2",
19
19
  "types": "./dist/types/cli.d.ts",
20
20
  "main": "./dist/cjs/cli.js",
21
21
  "exports": {
@@ -79,28 +79,28 @@
79
79
  "@swc/helpers": "^0.5.17",
80
80
  "qs": "^6.15.0",
81
81
  "type-is": "^1.6.18",
82
- "@modern-js/bff-core": "3.1.0",
83
- "@modern-js/builder": "3.1.0",
84
- "@modern-js/create-request": "3.1.0",
85
- "@modern-js/server-core": "3.1.0",
86
- "@modern-js/server-utils": "3.1.0",
87
- "@modern-js/utils": "3.1.0"
82
+ "@modern-js/bff-core": "3.1.2",
83
+ "@modern-js/create-request": "3.1.2",
84
+ "@modern-js/builder": "3.1.2",
85
+ "@modern-js/server-core": "3.1.2",
86
+ "@modern-js/utils": "3.1.2",
87
+ "@modern-js/server-utils": "3.1.2"
88
88
  },
89
89
  "devDependencies": {
90
- "@rsbuild/core": "2.0.0-beta.4",
91
- "@rslib/core": "0.19.6",
90
+ "@rsbuild/core": "2.0.0-rc.0",
91
+ "@rslib/core": "0.20.3",
92
92
  "@types/node": "^20",
93
93
  "@types/qs": "^6.15.0",
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/app-tools": "3.1.0",
99
- "@modern-js/bff-runtime": "3.1.0",
100
- "@modern-js/plugin": "3.1.0",
98
+ "@modern-js/bff-runtime": "3.1.2",
99
+ "@modern-js/plugin": "3.1.2",
101
100
  "@modern-js/rslib": "2.68.10",
102
- "@modern-js/runtime": "3.1.0",
103
- "@modern-js/types": "3.1.0",
101
+ "@modern-js/runtime": "3.1.2",
102
+ "@modern-js/types": "3.1.2",
103
+ "@modern-js/app-tools": "3.1.2",
104
104
  "@scripts/rstest-config": "2.66.0"
105
105
  },
106
106
  "sideEffects": false,
File without changes