@modern-js/plugin-testing 0.0.0-next-20240307035738 → 0.0.0-next-20240313080222

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.
@@ -21,7 +21,6 @@ __export(testConfigOperator_exports, {
21
21
  TestConfigOperator: () => TestConfigOperator
22
22
  });
23
23
  module.exports = __toCommonJS(testConfigOperator_exports);
24
- var import_define_property = require("@swc/helpers/_/_define_property");
25
24
  var import_lodash = require("@modern-js/utils/lodash");
26
25
  class TestConfigOperator {
27
26
  initial() {
@@ -66,12 +65,9 @@ class TestConfigOperator {
66
65
  return this.jestConfig;
67
66
  }
68
67
  constructor(testConfig) {
69
- (0, import_define_property._)(this, "_testConfig", void 0);
70
- (0, import_define_property._)(this, "_jestConfig", void 0);
71
- (0, import_define_property._)(this, "userJestConfig", void 0);
72
- (0, import_define_property._)(this, "defaultTestConfig", {
68
+ this.defaultTestConfig = {
73
69
  transformer: "babel-jest"
74
- });
70
+ };
75
71
  this._testConfig = testConfig;
76
72
  this._jestConfig = {};
77
73
  this.userJestConfig = testConfig.jest;
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var app_exports = {};
30
20
  __export(app_exports, {
@@ -35,24 +25,21 @@ __export(app_exports, {
35
25
  });
36
26
  module.exports = __toCommonJS(app_exports);
37
27
  var import_async_hooks = require("async_hooks");
38
- var import_node_path = __toESM(require("node:path"));
39
28
  var import_prod_server = require("@modern-js/prod-server");
40
29
  const store = new import_async_hooks.AsyncLocalStorage();
41
30
  const isInHandler = () => Boolean(store.getStore());
42
- let server;
31
+ let server = null;
43
32
  const createApp = async (pwd, config, plugins, routes) => {
44
33
  if (!server) {
45
34
  config.output.path = "./";
46
- server = await (0, import_prod_server.createProdServer)({
35
+ server = new import_prod_server.Server({
36
+ apiOnly: true,
47
37
  pwd,
48
38
  config,
49
39
  internalPlugins: plugins,
50
- routes,
51
- appContext: {
52
- apiDirectory: import_node_path.default.join(pwd, "api"),
53
- lambdaDirectory: import_node_path.default.join(pwd, "api", "lambda")
54
- }
40
+ routes
55
41
  });
42
+ await server.init();
56
43
  }
57
44
  const app = server.getRequestHandler();
58
45
  return app;
@@ -67,7 +54,7 @@ const closeServer = async () => {
67
54
  if (!server) {
68
55
  throw new Error("please createApp first");
69
56
  }
70
- server.close();
57
+ await server.close();
71
58
  };
72
59
  // Annotate the CommonJS export names for ESM import in node:
73
60
  0 && (module.exports = {
@@ -32,14 +32,15 @@ __export(bff_exports, {
32
32
  testingBffPlugin: () => testingBffPlugin
33
33
  });
34
34
  module.exports = __toCommonJS(bff_exports);
35
+ var import_path = __toESM(require("path"));
35
36
  var import_utils = require("@modern-js/utils");
36
37
  var import_base = require("../../base");
37
38
  var import_constant = require("./constant");
38
39
  var import_utils2 = require("./utils");
39
- const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils, appContext }) => {
40
+ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils }) => {
40
41
  var _userConfig_source;
41
42
  const bffConfig = {
42
- rootDir: appContext.apiDirectory,
43
+ rootDir: import_path.default.join(pwd, "./api"),
43
44
  setupFilesAfterEnv: [
44
45
  require.resolve("./setup")
45
46
  ],
@@ -55,8 +56,7 @@ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils, ap
55
56
  appDir: pwd,
56
57
  modernUserConfig: userConfig,
57
58
  plugins,
58
- routes,
59
- appContext
59
+ routes
60
60
  }
61
61
  }
62
62
  };
@@ -140,8 +140,7 @@ const testingBffPlugin = () => ({
140
140
  routes: appContext.serverRoutes,
141
141
  // Todo need use collect server internalPlugins
142
142
  plugins: appContext.serverInternalPlugins,
143
- utils,
144
- appContext
143
+ utils
145
144
  });
146
145
  return next(utils);
147
146
  }
@@ -31,7 +31,6 @@ __export(app_exports, {
31
31
  default: () => app_default
32
32
  });
33
33
  module.exports = __toCommonJS(app_exports);
34
- var import_define_property = require("@swc/helpers/_/_define_property");
35
34
  var import_runtime = require("@modern-js/runtime");
36
35
  var import_constant = require("../constant");
37
36
  var import_resolvePlugins = __toESM(require("./resolvePlugins"));
@@ -61,7 +60,6 @@ class ModernRuntime {
61
60
  })(Component);
62
61
  }
63
62
  constructor(options) {
64
- (0, import_define_property._)(this, "options", void 0);
65
63
  this.options = options;
66
64
  }
67
65
  }
@@ -1,30 +1,53 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
2
  import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
3
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
5
4
  import { merge } from "@modern-js/utils/lodash";
6
5
  var TestConfigOperator = /* @__PURE__ */ function() {
7
6
  "use strict";
8
7
  function TestConfigOperator2(testConfig) {
9
8
  _class_call_check(this, TestConfigOperator2);
10
- _define_property(this, "_testConfig", void 0);
11
- _define_property(this, "_jestConfig", void 0);
12
- _define_property(this, "userJestConfig", void 0);
13
- _define_property(this, "defaultTestConfig", {
9
+ this.defaultTestConfig = {
14
10
  transformer: "babel-jest"
15
- });
11
+ };
16
12
  this._testConfig = testConfig;
17
13
  this._jestConfig = {};
18
14
  this.userJestConfig = testConfig.jest;
19
15
  this.initial();
20
16
  }
21
- _create_class(TestConfigOperator2, [
22
- {
23
- key: "initial",
24
- value: function initial() {
25
- this._testConfig = merge({}, this.defaultTestConfig, this.testConfig);
17
+ var _proto = TestConfigOperator2.prototype;
18
+ _proto.initial = function initial() {
19
+ this._testConfig = merge({}, this.defaultTestConfig, this.testConfig);
20
+ };
21
+ _proto.mergeJestConfig = function mergeJestConfig(sourceConfig) {
22
+ this._jestConfig = merge({}, this._jestConfig, sourceConfig);
23
+ };
24
+ _proto.setJestUserConfig = function setJestUserConfig() {
25
+ var userJestConfig = this.userJestConfig;
26
+ if (typeof userJestConfig === "object") {
27
+ this.setJestConfig(userJestConfig);
28
+ }
29
+ };
30
+ _proto.setJestConfig = function setJestConfig(sourceConfig, options) {
31
+ if (options) {
32
+ var force = options.force;
33
+ if (force) {
34
+ this._jestConfig = sourceConfig;
35
+ return;
26
36
  }
27
- },
37
+ }
38
+ this._jestConfig = _object_spread({}, this._jestConfig, sourceConfig);
39
+ };
40
+ _proto.getFinalConfig = function getFinalConfig() {
41
+ var userJestConfig = this.userJestConfig;
42
+ if (!userJestConfig) {
43
+ return this._jestConfig;
44
+ }
45
+ if (typeof userJestConfig === "function") {
46
+ return userJestConfig(this._jestConfig);
47
+ }
48
+ return this.jestConfig;
49
+ };
50
+ _create_class(TestConfigOperator2, [
28
51
  {
29
52
  key: "jestConfig",
30
53
  get: function get() {
@@ -36,47 +59,6 @@ var TestConfigOperator = /* @__PURE__ */ function() {
36
59
  get: function get() {
37
60
  return this._testConfig;
38
61
  }
39
- },
40
- {
41
- key: "mergeJestConfig",
42
- value: function mergeJestConfig(sourceConfig) {
43
- this._jestConfig = merge({}, this._jestConfig, sourceConfig);
44
- }
45
- },
46
- {
47
- key: "setJestUserConfig",
48
- value: function setJestUserConfig() {
49
- var userJestConfig = this.userJestConfig;
50
- if (typeof userJestConfig === "object") {
51
- this.setJestConfig(userJestConfig);
52
- }
53
- }
54
- },
55
- {
56
- key: "setJestConfig",
57
- value: function setJestConfig(sourceConfig, options) {
58
- if (options) {
59
- var force = options.force;
60
- if (force) {
61
- this._jestConfig = sourceConfig;
62
- return;
63
- }
64
- }
65
- this._jestConfig = _object_spread({}, this._jestConfig, sourceConfig);
66
- }
67
- },
68
- {
69
- key: "getFinalConfig",
70
- value: function getFinalConfig() {
71
- var userJestConfig = this.userJestConfig;
72
- if (!userJestConfig) {
73
- return this._jestConfig;
74
- }
75
- if (typeof userJestConfig === "function") {
76
- return userJestConfig(this._jestConfig);
77
- }
78
- return this.jestConfig;
79
- }
80
62
  }
81
63
  ]);
82
64
  return TestConfigOperator2;
@@ -1,13 +1,12 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
3
3
  import { AsyncLocalStorage } from "async_hooks";
4
- import path from "node:path";
5
- import { createProdServer } from "@modern-js/prod-server";
4
+ import { Server } from "@modern-js/prod-server";
6
5
  var store = new AsyncLocalStorage();
7
6
  var isInHandler = function() {
8
7
  return Boolean(store.getStore());
9
8
  };
10
- var server;
9
+ var server = null;
11
10
  var createApp = function() {
12
11
  var _ref = _async_to_generator(function(pwd, config, plugins, routes) {
13
12
  var app;
@@ -20,21 +19,19 @@ var createApp = function() {
20
19
  2
21
20
  ];
22
21
  config.output.path = "./";
22
+ server = new Server({
23
+ apiOnly: true,
24
+ pwd,
25
+ config,
26
+ internalPlugins: plugins,
27
+ routes
28
+ });
23
29
  return [
24
30
  4,
25
- createProdServer({
26
- pwd,
27
- config,
28
- internalPlugins: plugins,
29
- routes,
30
- appContext: {
31
- apiDirectory: path.join(pwd, "api"),
32
- lambdaDirectory: path.join(pwd, "api", "lambda")
33
- }
34
- })
31
+ server.init()
35
32
  ];
36
33
  case 1:
37
- server = _state.sent();
34
+ _state.sent();
38
35
  _state.label = 2;
39
36
  case 2:
40
37
  app = server.getRequestHandler();
@@ -58,13 +55,21 @@ var getApp = function() {
58
55
  var closeServer = function() {
59
56
  var _ref = _async_to_generator(function() {
60
57
  return _ts_generator(this, function(_state) {
61
- if (!server) {
62
- throw new Error("please createApp first");
58
+ switch (_state.label) {
59
+ case 0:
60
+ if (!server) {
61
+ throw new Error("please createApp first");
62
+ }
63
+ return [
64
+ 4,
65
+ server.close()
66
+ ];
67
+ case 1:
68
+ _state.sent();
69
+ return [
70
+ 2
71
+ ];
63
72
  }
64
- server.close();
65
- return [
66
- 2
67
- ];
68
73
  });
69
74
  });
70
75
  return function closeServer2() {
@@ -2,19 +2,20 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
3
3
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
4
4
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
5
+ import path from "path";
5
6
  import { isApiOnly } from "@modern-js/utils";
6
7
  import { getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../../base";
7
8
  import { bff_info_key } from "./constant";
8
9
  import { isBFFProject } from "./utils";
9
10
  var setJestConfigForBFF = function() {
10
11
  var _ref = _async_to_generator(function(param) {
11
- var pwd, userConfig, plugins, routes, utils, appContext, _userConfig_source, bffConfig, jestConfig, alias, aliasMapper, moduleNameMapper, transform, apiOnly, mergedModuleNameMapper, resolver, configFields, commonConfig;
12
+ var pwd, userConfig, plugins, routes, utils, _userConfig_source, bffConfig, jestConfig, alias, aliasMapper, moduleNameMapper, transform, apiOnly, mergedModuleNameMapper, resolver, configFields, commonConfig;
12
13
  return _ts_generator(this, function(_state) {
13
14
  switch (_state.label) {
14
15
  case 0:
15
- pwd = param.pwd, userConfig = param.userConfig, plugins = param.plugins, routes = param.routes, utils = param.utils, appContext = param.appContext;
16
+ pwd = param.pwd, userConfig = param.userConfig, plugins = param.plugins, routes = param.routes, utils = param.utils;
16
17
  bffConfig = {
17
- rootDir: appContext.apiDirectory,
18
+ rootDir: path.join(pwd, "./api"),
18
19
  setupFilesAfterEnv: [
19
20
  require.resolve("./setup")
20
21
  ],
@@ -29,8 +30,7 @@ var setJestConfigForBFF = function() {
29
30
  appDir: pwd,
30
31
  modernUserConfig: userConfig,
31
32
  plugins,
32
- routes,
33
- appContext
33
+ routes
34
34
  })
35
35
  };
36
36
  jestConfig = utils.jestConfig;
@@ -131,8 +131,7 @@ var testingBffPlugin = function() {
131
131
  routes: appContext.serverRoutes,
132
132
  // Todo need use collect server internalPlugins
133
133
  plugins: appContext.serverInternalPlugins,
134
- utils,
135
- appContext
134
+ utils
136
135
  })
137
136
  ];
138
137
  case 1:
@@ -1,6 +1,4 @@
1
1
  import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
2
- import { _ as _create_class } from "@swc/helpers/_/_create_class";
3
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
4
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
5
3
  import { createApp } from "@modern-js/runtime";
6
4
  import { MODERNJS_CONFIG_KEY } from "../constant";
@@ -9,38 +7,30 @@ var ModernRuntime = /* @__PURE__ */ function() {
9
7
  "use strict";
10
8
  function ModernRuntime2(options) {
11
9
  _class_call_check(this, ModernRuntime2);
12
- _define_property(this, "options", void 0);
13
10
  this.options = options;
14
11
  }
15
- _create_class(ModernRuntime2, [
16
- {
17
- key: "init",
18
- value: function init(options) {
19
- this.options = options;
20
- }
21
- },
22
- {
23
- key: "createApp",
24
- value: function createApp1(props) {
25
- var _this_options;
26
- var _ref = props || {}, entry = _ref.entry, children = _ref.children;
27
- var runtimeFeatures = (_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.runtime;
28
- if (entry) {
29
- var _this_options_runtimeByEntries;
30
- runtimeFeatures = _object_spread({}, runtimeFeatures || {}, (_this_options_runtimeByEntries = this.options.runtimeByEntries) === null || _this_options_runtimeByEntries === void 0 ? void 0 : _this_options_runtimeByEntries[entry]);
31
- }
32
- var Component = function() {
33
- if (!children) {
34
- return null;
35
- }
36
- return children;
37
- };
38
- return createApp({
39
- plugins: resolvePlugins(runtimeFeatures || {})
40
- })(Component);
41
- }
12
+ var _proto = ModernRuntime2.prototype;
13
+ _proto.init = function init(options) {
14
+ this.options = options;
15
+ };
16
+ _proto.createApp = function createApp1(props) {
17
+ var _this_options;
18
+ var _ref = props || {}, entry = _ref.entry, children = _ref.children;
19
+ var runtimeFeatures = (_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.runtime;
20
+ if (entry) {
21
+ var _this_options_runtimeByEntries;
22
+ runtimeFeatures = _object_spread({}, runtimeFeatures || {}, (_this_options_runtimeByEntries = this.options.runtimeByEntries) === null || _this_options_runtimeByEntries === void 0 ? void 0 : _this_options_runtimeByEntries[entry]);
42
23
  }
43
- ]);
24
+ var Component = function() {
25
+ if (!children) {
26
+ return null;
27
+ }
28
+ return children;
29
+ };
30
+ return createApp({
31
+ plugins: resolvePlugins(runtimeFeatures || {})
32
+ })(Component);
33
+ };
44
34
  return ModernRuntime2;
45
35
  }();
46
36
  var app_default = new ModernRuntime(global[MODERNJS_CONFIG_KEY] || {});
@@ -1,4 +1,3 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import { merge } from "@modern-js/utils/lodash";
3
2
  class TestConfigOperator {
4
3
  initial() {
@@ -43,12 +42,9 @@ class TestConfigOperator {
43
42
  return this.jestConfig;
44
43
  }
45
44
  constructor(testConfig) {
46
- _define_property(this, "_testConfig", void 0);
47
- _define_property(this, "_jestConfig", void 0);
48
- _define_property(this, "userJestConfig", void 0);
49
- _define_property(this, "defaultTestConfig", {
45
+ this.defaultTestConfig = {
50
46
  transformer: "babel-jest"
51
- });
47
+ };
52
48
  this._testConfig = testConfig;
53
49
  this._jestConfig = {};
54
50
  this.userJestConfig = testConfig.jest;
@@ -1,22 +1,19 @@
1
1
  import { AsyncLocalStorage } from "async_hooks";
2
- import path from "node:path";
3
- import { createProdServer } from "@modern-js/prod-server";
2
+ import { Server } from "@modern-js/prod-server";
4
3
  const store = new AsyncLocalStorage();
5
4
  const isInHandler = () => Boolean(store.getStore());
6
- let server;
5
+ let server = null;
7
6
  const createApp = async (pwd, config, plugins, routes) => {
8
7
  if (!server) {
9
8
  config.output.path = "./";
10
- server = await createProdServer({
9
+ server = new Server({
10
+ apiOnly: true,
11
11
  pwd,
12
12
  config,
13
13
  internalPlugins: plugins,
14
- routes,
15
- appContext: {
16
- apiDirectory: path.join(pwd, "api"),
17
- lambdaDirectory: path.join(pwd, "api", "lambda")
18
- }
14
+ routes
19
15
  });
16
+ await server.init();
20
17
  }
21
18
  const app = server.getRequestHandler();
22
19
  return app;
@@ -31,7 +28,7 @@ const closeServer = async () => {
31
28
  if (!server) {
32
29
  throw new Error("please createApp first");
33
30
  }
34
- server.close();
31
+ await server.close();
35
32
  };
36
33
  export {
37
34
  closeServer,
@@ -1,11 +1,12 @@
1
+ import path from "path";
1
2
  import { isApiOnly } from "@modern-js/utils";
2
3
  import { getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../../base";
3
4
  import { bff_info_key } from "./constant";
4
5
  import { isBFFProject } from "./utils";
5
- const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils, appContext }) => {
6
+ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils }) => {
6
7
  var _userConfig_source;
7
8
  const bffConfig = {
8
- rootDir: appContext.apiDirectory,
9
+ rootDir: path.join(pwd, "./api"),
9
10
  setupFilesAfterEnv: [
10
11
  require.resolve("./setup")
11
12
  ],
@@ -21,8 +22,7 @@ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils, ap
21
22
  appDir: pwd,
22
23
  modernUserConfig: userConfig,
23
24
  plugins,
24
- routes,
25
- appContext
25
+ routes
26
26
  }
27
27
  }
28
28
  };
@@ -106,8 +106,7 @@ const testingBffPlugin = () => ({
106
106
  routes: appContext.serverRoutes,
107
107
  // Todo need use collect server internalPlugins
108
108
  plugins: appContext.serverInternalPlugins,
109
- utils,
110
- appContext
109
+ utils
111
110
  });
112
111
  return next(utils);
113
112
  }
@@ -1,4 +1,3 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import { createApp } from "@modern-js/runtime";
3
2
  import { MODERNJS_CONFIG_KEY } from "../constant";
4
3
  import resolvePlugins from "./resolvePlugins";
@@ -28,7 +27,6 @@ class ModernRuntime {
28
27
  })(Component);
29
28
  }
30
29
  constructor(options) {
31
- _define_property(this, "options", void 0);
32
30
  this.options = options;
33
31
  }
34
32
  }
@@ -1,9 +1,9 @@
1
- /// <reference path="../../../../../../server/core/dist/types/core/server.d.ts" />
2
1
  /// <reference types="node" />
3
2
  /// <reference types="node/http" />
3
+ /// <reference types="@modern-js/prod-server/src/type" />
4
4
  import { InternalPlugins } from '@modern-js/types';
5
5
  export declare const isInHandler: () => boolean;
6
- declare const createApp: (pwd: string, config: any, plugins: InternalPlugins, routes: any[]) => Promise<(req: import("http").IncomingMessage, res: import("http").ServerResponse) => Promise<void>>;
7
- declare const getApp: () => (req: import("http").IncomingMessage, res: import("http").ServerResponse) => Promise<void>;
6
+ declare const createApp: (pwd: string, config: any, plugins: InternalPlugins, routes: any[]) => Promise<(req: import("http").IncomingMessage, res: import("http").ServerResponse, next?: (() => void) | undefined) => void>;
7
+ declare const getApp: () => (req: import("http").IncomingMessage, res: import("http").ServerResponse, next?: (() => void) | undefined) => void;
8
8
  declare const closeServer: () => Promise<void>;
9
9
  export { createApp, getApp, closeServer };
@@ -1,15 +1,14 @@
1
- import type { CliPlugin, IAppContext } from '@modern-js/core';
1
+ import type { CliPlugin } from '@modern-js/core';
2
2
  import { InternalPlugins } from '@modern-js/types';
3
3
  import { UserConfig } from '../../base/config';
4
4
  import { TestConfigOperator } from '../../base';
5
5
  import type { Hooks } from '../../base/hook';
6
- export declare const setJestConfigForBFF: ({ pwd, userConfig, plugins, routes, utils, appContext, }: {
6
+ export declare const setJestConfigForBFF: ({ pwd, userConfig, plugins, routes, utils, }: {
7
7
  pwd: string;
8
8
  userConfig: any;
9
9
  plugins: InternalPlugins;
10
10
  routes: any[];
11
11
  utils: TestConfigOperator;
12
- appContext: IAppContext;
13
12
  }) => Promise<void>;
14
13
  export declare const testingBffPlugin: () => CliPlugin<{
15
14
  hooks: Hooks;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20240307035738",
18
+ "version": "0.0.0-next-20240313080222",
19
19
  "jsnext:source": "./src/cli/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "main": "./dist/cjs/cli/index.js",
@@ -116,7 +116,7 @@
116
116
  "@modern-js-reduck/plugin-effects": "^1.1.10",
117
117
  "@modern-js-reduck/plugin-immutable": "^1.1.10",
118
118
  "@modern-js-reduck/store": "^1.1.10",
119
- "@rsbuild/babel-preset": "0.4.4",
119
+ "@rsbuild/babel-preset": "0.4.15",
120
120
  "@testing-library/jest-dom": "^5.16.1",
121
121
  "@testing-library/react": "^13.4.0",
122
122
  "@types/testing-library__jest-dom": "^5.14.3",
@@ -131,17 +131,17 @@
131
131
  "ts-jest": "^29.1.0",
132
132
  "yargs": "^17.0.1",
133
133
  "@swc/helpers": "0.5.3",
134
- "@modern-js/babel-compiler": "0.0.0-next-20240307035738",
135
- "@modern-js/plugin": "0.0.0-next-20240307035738",
136
- "@modern-js/prod-server": "0.0.0-next-20240307035738",
137
- "@modern-js/utils": "0.0.0-next-20240307035738",
138
- "@modern-js/types": "0.0.0-next-20240307035738",
139
- "@modern-js/bff-core": "0.0.0-next-20240307035738"
134
+ "@modern-js/babel-compiler": "0.0.0-next-20240313080222",
135
+ "@modern-js/prod-server": "0.0.0-next-20240313080222",
136
+ "@modern-js/plugin": "0.0.0-next-20240313080222",
137
+ "@modern-js/types": "0.0.0-next-20240313080222",
138
+ "@modern-js/utils": "0.0.0-next-20240313080222",
139
+ "@modern-js/bff-core": "0.0.0-next-20240313080222"
140
140
  },
141
141
  "peerDependencies": {
142
142
  "react": ">=17",
143
143
  "react-dom": ">=17",
144
- "@modern-js/runtime": "0.0.0-next-20240307035738"
144
+ "@modern-js/runtime": "0.0.0-next-20240313080222"
145
145
  },
146
146
  "peerDependenciesMeta": {
147
147
  "@modern-js/runtime": {
@@ -156,10 +156,10 @@
156
156
  "@types/node": "^14",
157
157
  "@types/yargs": "^17.0.2",
158
158
  "typescript": "^5",
159
- "@modern-js/core": "0.0.0-next-20240307035738",
160
- "@modern-js/runtime": "0.0.0-next-20240307035738",
161
- "@scripts/build": "0.0.0-next-20240307035738",
162
- "@scripts/jest-config": "0.0.0-next-20240307035738"
159
+ "@modern-js/core": "0.0.0-next-20240313080222",
160
+ "@modern-js/runtime": "0.0.0-next-20240313080222",
161
+ "@scripts/build": "0.0.0-next-20240313080222",
162
+ "@scripts/jest-config": "0.0.0-next-20240313080222"
163
163
  },
164
164
  "sideEffects": false,
165
165
  "publishConfig": {