@modern-js/plugin-bff 3.0.0-alpha.2 → 3.0.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
@@ -49,7 +49,6 @@ const runtimeGenerator_js_namespaceObject = require("./utils/runtimeGenerator.js
49
49
  var runtimeGenerator_js_default = /*#__PURE__*/ __webpack_require__.n(runtimeGenerator_js_namespaceObject);
50
50
  const TS_CONFIG_FILENAME = 'tsconfig.json';
51
51
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
52
- const RUNTIME_HONO = '@modern-js/plugin-bff/server';
53
52
  const bffPlugin = ()=>({
54
53
  name: '@modern-js/plugin-bff',
55
54
  setup: (api)=>{
@@ -146,9 +145,6 @@ const bffPlugin = ()=>({
146
145
  return compress;
147
146
  };
148
147
  api.config(async ()=>{
149
- const honoRuntimePath = isHono() ? {
150
- [RUNTIME_HONO]: RUNTIME_HONO
151
- } : void 0;
152
148
  const devServer = api.getConfig()?.tools?.devServer;
153
149
  const prefix = api.getConfig()?.bff?.prefix || utils_namespaceObject.DEFAULT_API_PREFIX;
154
150
  const compress = createCompressConfig(devServer, prefix);
@@ -190,9 +186,6 @@ const bffPlugin = ()=>({
190
186
  httpMethodDecider
191
187
  });
192
188
  }
193
- },
194
- output: {
195
- externals: honoRuntimePath
196
189
  }
197
190
  };
198
191
  });
@@ -5,9 +5,6 @@ var __webpack_modules__ = {
5
5
  },
6
6
  "@modern-js/bff-core" (module) {
7
7
  module.exports = require("@modern-js/bff-core");
8
- },
9
- "@modern-js/server-core" (module) {
10
- module.exports = require("@modern-js/server-core");
11
8
  }
12
9
  };
13
10
  var __webpack_module_cache__ = {};
@@ -53,29 +50,16 @@ function __webpack_require__(moduleId) {
53
50
  var __webpack_exports__ = {};
54
51
  (()=>{
55
52
  __webpack_require__.r(__webpack_exports__);
56
- __webpack_require__.d(__webpack_exports__, {
57
- useHonoContext: ()=>_modern_js_server_core__rspack_import_1.useHonoContext
58
- });
59
53
  var _modern_js_bff_core__rspack_import_0 = __webpack_require__("@modern-js/bff-core");
60
54
  var __rspack_reexport = {};
61
- for(const __rspack_import_key in _modern_js_bff_core__rspack_import_0)if ([
62
- "useHonoContext",
63
- "default"
64
- ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_modern_js_bff_core__rspack_import_0[__rspack_import_key];
55
+ for(const __rspack_import_key in _modern_js_bff_core__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_modern_js_bff_core__rspack_import_0[__rspack_import_key];
65
56
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
66
- var _modern_js_server_core__rspack_import_1 = __webpack_require__("@modern-js/server-core");
67
- var _operators__rspack_import_2 = __webpack_require__("./operators");
57
+ var _operators__rspack_import_1 = __webpack_require__("./operators");
68
58
  var __rspack_reexport = {};
69
- for(const __rspack_import_key in _operators__rspack_import_2)if ([
70
- "useHonoContext",
71
- "default"
72
- ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_operators__rspack_import_2[__rspack_import_key];
59
+ for(const __rspack_import_key in _operators__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_operators__rspack_import_1[__rspack_import_key];
73
60
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
74
61
  })();
75
- exports.useHonoContext = __webpack_exports__.useHonoContext;
76
- for(var __rspack_i in __webpack_exports__)if (-1 === [
77
- "useHonoContext"
78
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
62
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
79
63
  Object.defineProperty(exports, '__esModule', {
80
64
  value: true
81
65
  });
package/dist/esm/cli.mjs CHANGED
@@ -7,7 +7,6 @@ import pluginGenerator from "./utils/pluginGenerator.mjs";
7
7
  import runtimeGenerator from "./utils/runtimeGenerator.mjs";
8
8
  const TS_CONFIG_FILENAME = 'tsconfig.json';
9
9
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
10
- const RUNTIME_HONO = '@modern-js/plugin-bff/server';
11
10
  const bffPlugin = ()=>({
12
11
  name: '@modern-js/plugin-bff',
13
12
  setup: (api)=>{
@@ -104,9 +103,6 @@ const bffPlugin = ()=>({
104
103
  return compress;
105
104
  };
106
105
  api.config(async ()=>{
107
- const honoRuntimePath = isHono() ? {
108
- [RUNTIME_HONO]: RUNTIME_HONO
109
- } : void 0;
110
106
  const devServer = api.getConfig()?.tools?.devServer;
111
107
  const prefix = api.getConfig()?.bff?.prefix || DEFAULT_API_PREFIX;
112
108
  const compress = createCompressConfig(devServer, prefix);
@@ -148,9 +144,6 @@ const bffPlugin = ()=>({
148
144
  httpMethodDecider
149
145
  });
150
146
  }
151
- },
152
- output: {
153
- externals: honoRuntimePath
154
147
  }
155
148
  };
156
149
  });
@@ -1,4 +1,2 @@
1
- import { useHonoContext } from "@modern-js/server-core";
2
1
  export * from "@modern-js/bff-core";
3
2
  export * from "./operators.mjs";
4
- export { useHonoContext };
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
4
3
  import { dirname as __rspack_dirname } from "node:path";
5
4
  import path from "path";
@@ -12,7 +11,6 @@ import runtimeGenerator from "./utils/runtimeGenerator.mjs";
12
11
  var cli_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
13
12
  const TS_CONFIG_FILENAME = 'tsconfig.json';
14
13
  const RUNTIME_CREATE_REQUEST = '@modern-js/plugin-bff/client';
15
- const RUNTIME_HONO = '@modern-js/plugin-bff/server';
16
14
  const bffPlugin = ()=>({
17
15
  name: '@modern-js/plugin-bff',
18
16
  setup: (api)=>{
@@ -109,9 +107,6 @@ const bffPlugin = ()=>({
109
107
  return compress;
110
108
  };
111
109
  api.config(async ()=>{
112
- const honoRuntimePath = isHono() ? {
113
- [RUNTIME_HONO]: RUNTIME_HONO
114
- } : void 0;
115
110
  const devServer = api.getConfig()?.tools?.devServer;
116
111
  const prefix = api.getConfig()?.bff?.prefix || DEFAULT_API_PREFIX;
117
112
  const compress = createCompressConfig(devServer, prefix);
@@ -153,9 +148,6 @@ const bffPlugin = ()=>({
153
148
  httpMethodDecider
154
149
  });
155
150
  }
156
- },
157
- output: {
158
- externals: honoRuntimePath
159
151
  }
160
152
  };
161
153
  });
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  const API_APP_NAME = '_app';
4
3
  const BUILD_FILES = [
5
4
  '**/*.[tj]sx?',
@@ -1,3 +1,2 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  export * from "./constants.mjs";
@@ -1,5 +1,5 @@
1
1
  import __rslib_shim_module__ from "node:module";
2
- const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
2
+ const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
3
3
  import { generateClient } from "@modern-js/bff-core";
4
4
  import { logger } from "@modern-js/utils";
5
5
  async function loader(source) {
@@ -1,4 +1,3 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { configure, createRequest, createUploader } from "@modern-js/create-request";
4
3
  export { configure, createRequest, createUploader };
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { Hono, run } from "@modern-js/server-core";
4
3
  import { isProd, logger } from "@modern-js/utils";
5
4
  import createHonoRoutes from "../../utils/createHonoRoutes.mjs";
@@ -1,6 +1,3 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
- import { useHonoContext } from "@modern-js/server-core";
4
2
  export * from "@modern-js/bff-core";
5
3
  export * from "./operators.mjs";
6
- export { useHonoContext };
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { useHonoContext } from "@modern-js/server-core";
4
3
  const Pipe = (func)=>({
5
4
  name: 'pipe',
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import path from "path";
4
3
  import { ApiRouter } from "@modern-js/bff-core";
5
4
  import { API_DIR, isFunction, isWebOnly } from "@modern-js/utils";
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import path from "path";
4
3
  import { generateClient } from "@modern-js/bff-core";
5
4
  import { fs, logger } from "@modern-js/utils";
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { HttpMetadata, ResponseMetaType, ValidationError, isWithMetaHandler } from "@modern-js/bff-core";
4
3
  import { parse } from "qs";
5
4
  import type_is from "type-is";
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import path from "path";
4
3
  const PACKAGE_NAME = '{packageName}';
5
4
  const PREFIX = '{prefix}';
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- /*#__PURE__*/ import.meta.url;
3
2
  import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
4
3
  import { dirname as __rspack_dirname } from "node:path";
5
4
  import path from "path";
@@ -1,5 +1,5 @@
1
1
  import __rslib_shim_module__ from "node:module";
2
- const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
2
+ const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
3
3
  import path from "path";
4
4
  import { fs } from "@modern-js/utils";
5
5
  const getPackageName = (appDirectory)=>{
@@ -1,3 +1,2 @@
1
1
  export * from '@modern-js/bff-core';
2
- export { useHonoContext } from '@modern-js/server-core';
3
2
  export * from './operators';
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.0.0-alpha.2",
18
+ "version": "3.0.1",
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.14.1",
81
81
  "type-is": "^1.6.18",
82
- "@modern-js/bff-core": "3.0.0-alpha.2",
83
- "@modern-js/builder": "3.0.0-alpha.2",
84
- "@modern-js/create-request": "3.0.0-alpha.2",
85
- "@modern-js/server-core": "3.0.0-alpha.2",
86
- "@modern-js/server-utils": "3.0.0-alpha.2",
87
- "@modern-js/utils": "3.0.0-alpha.2"
82
+ "@modern-js/bff-core": "3.0.1",
83
+ "@modern-js/builder": "3.0.1",
84
+ "@modern-js/create-request": "3.0.1",
85
+ "@modern-js/server-core": "3.0.1",
86
+ "@modern-js/server-utils": "3.0.1",
87
+ "@modern-js/utils": "3.0.1"
88
88
  },
89
89
  "devDependencies": {
90
- "@rsbuild/core": "2.0.0-beta.0",
91
- "@rslib/core": "0.19.3",
90
+ "@rsbuild/core": "2.0.0-beta.2",
91
+ "@rslib/core": "0.19.4",
92
92
  "@types/node": "^20",
93
93
  "@types/qs": "^6.14.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.0.0-alpha.2",
99
- "@modern-js/bff-runtime": "3.0.0-alpha.2",
100
- "@modern-js/plugin": "3.0.0-alpha.2",
98
+ "@modern-js/app-tools": "3.0.1",
99
+ "@modern-js/bff-runtime": "3.0.1",
100
+ "@modern-js/plugin": "3.0.1",
101
101
  "@modern-js/rslib": "2.68.10",
102
- "@modern-js/runtime": "3.0.0-alpha.2",
103
- "@modern-js/types": "3.0.0-alpha.2",
102
+ "@modern-js/runtime": "3.0.1",
103
+ "@modern-js/types": "3.0.1",
104
104
  "@scripts/rstest-config": "2.66.0"
105
105
  },
106
106
  "sideEffects": false,