@modern-js/plugin-testing 0.0.0-next-20230224025154 → 0.0.0-next-20230224054734

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/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # @modern-js/plugin-testing
2
2
 
3
- ## 0.0.0-next-20230224025154
3
+ ## 0.0.0-next-20230224054734
4
+
5
+ ### Minor Changes
6
+
7
+ - 0df4341cfe: feat: support custom apiDir, lambdaDir and style of writing for bff
8
+ feat: 支持定制 api 目录,lambda 目录,bff 的写法
4
9
 
5
10
  ### Patch Changes
6
11
 
@@ -8,13 +13,19 @@
8
13
 
9
14
  chore: 统一文件命名为小驼峰格式
10
15
 
16
+ - 1eea234fdd: chore: make test files naming consistent
17
+
18
+ chore: 统一测试文件命名为小驼峰格式
19
+
11
20
  - Updated dependencies [7fff9020e1]
12
- - @modern-js/babel-preset-app@0.0.0-next-20230224025154
13
- - @modern-js/runtime@0.0.0-next-20230224025154
14
- - @modern-js/prod-server@0.0.0-next-20230224025154
15
- - @modern-js/utils@0.0.0-next-20230224025154
16
- - @modern-js/babel-compiler@0.0.0-next-20230224025154
17
- - @modern-js/plugin@0.0.0-next-20230224025154
21
+ - Updated dependencies [1eea234fdd]
22
+ - Updated dependencies [0df4341cfe]
23
+ - @modern-js/babel-preset-app@0.0.0-next-20230224054734
24
+ - @modern-js/runtime@0.0.0-next-20230224054734
25
+ - @modern-js/prod-server@0.0.0-next-20230224054734
26
+ - @modern-js/utils@0.0.0-next-20230224054734
27
+ - @modern-js/babel-compiler@0.0.0-next-20230224054734
28
+ - @modern-js/plugin@0.0.0-next-20230224054734
18
29
 
19
30
  ## 2.6.0
20
31
 
@@ -27,16 +27,18 @@ var import_mockAPI = __toESM(require("./mockAPI"));
27
27
  var import_app = require("./app");
28
28
  let uped = false;
29
29
  const setup = () => {
30
- var _a, _b;
30
+ var _a, _b, _c, _d;
31
31
  if (uped) {
32
32
  return;
33
33
  }
34
34
  uped = true;
35
35
  const bff_info = global[import_constant.bff_info_key];
36
36
  const prefix = (_b = (_a = bff_info == null ? void 0 : bff_info.modernUserConfig) == null ? void 0 : _a.bff) == null ? void 0 : _b.prefix;
37
+ const httpMethodDecider = (_d = (_c = bff_info == null ? void 0 : bff_info.modernUserConfig) == null ? void 0 : _c.bff) == null ? void 0 : _d.httpMethodDecider;
37
38
  const apiRouter = new import_bff_core.ApiRouter({
38
39
  apiDir: import_path.default.join(bff_info.appDir, "./api"),
39
- prefix
40
+ prefix,
41
+ httpMethodDecider
40
42
  });
41
43
  const apiInfos = apiRouter.getApiHandlers();
42
44
  const apiInfosByFile = apiInfos.reduce(
@@ -129,16 +129,18 @@ import mockAPI from "./mockAPI";
129
129
  import { createApp, closeServer } from "./app";
130
130
  var uped = false;
131
131
  var setup = function() {
132
- var _bff_info_modernUserConfig, _bff_info_modernUserConfig_bff;
132
+ var _bff_info_modernUserConfig, _bff_info_modernUserConfig_bff, _bff_info_modernUserConfig1, _bff_info_modernUserConfig_bff1;
133
133
  if (uped) {
134
134
  return;
135
135
  }
136
136
  uped = true;
137
137
  var bff_info = global[bff_info_key];
138
138
  var prefix = bff_info === null || bff_info === void 0 ? void 0 : (_bff_info_modernUserConfig = bff_info.modernUserConfig) === null || _bff_info_modernUserConfig === void 0 ? void 0 : (_bff_info_modernUserConfig_bff = _bff_info_modernUserConfig.bff) === null || _bff_info_modernUserConfig_bff === void 0 ? void 0 : _bff_info_modernUserConfig_bff.prefix;
139
+ var httpMethodDecider = bff_info === null || bff_info === void 0 ? void 0 : (_bff_info_modernUserConfig1 = bff_info.modernUserConfig) === null || _bff_info_modernUserConfig1 === void 0 ? void 0 : (_bff_info_modernUserConfig_bff1 = _bff_info_modernUserConfig1.bff) === null || _bff_info_modernUserConfig_bff1 === void 0 ? void 0 : _bff_info_modernUserConfig_bff1.httpMethodDecider;
139
140
  var apiRouter = new ApiRouter({
140
141
  apiDir: path.join(bff_info.appDir, "./api"),
141
- prefix: prefix
142
+ prefix: prefix,
143
+ httpMethodDecider: httpMethodDecider
142
144
  });
143
145
  var apiInfos = apiRouter.getApiHandlers();
144
146
  var apiInfosByFile = apiInfos.reduce(function(res, apiInfo) {
@@ -5,16 +5,18 @@ import mockAPI from "./mockAPI";
5
5
  import { createApp, closeServer } from "./app";
6
6
  let uped = false;
7
7
  const setup = () => {
8
- var _a, _b;
8
+ var _a, _b, _c, _d;
9
9
  if (uped) {
10
10
  return;
11
11
  }
12
12
  uped = true;
13
13
  const bff_info = global[bff_info_key];
14
14
  const prefix = (_b = (_a = bff_info == null ? void 0 : bff_info.modernUserConfig) == null ? void 0 : _a.bff) == null ? void 0 : _b.prefix;
15
+ const httpMethodDecider = (_d = (_c = bff_info == null ? void 0 : bff_info.modernUserConfig) == null ? void 0 : _c.bff) == null ? void 0 : _d.httpMethodDecider;
15
16
  const apiRouter = new ApiRouter({
16
17
  apiDir: path.join(bff_info.appDir, "./api"),
17
- prefix
18
+ prefix,
19
+ httpMethodDecider
18
20
  });
19
21
  const apiInfos = apiRouter.getApiHandlers();
20
22
  const apiInfosByFile = apiInfos.reduce(
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20230224025154",
14
+ "version": "0.0.0-next-20230224054734",
15
15
  "jsnext:source": "./src/cli/index.ts",
16
16
  "types": "./dist/types/cli/index.d.ts",
17
17
  "main": "./dist/cjs/cli/index.js",
@@ -106,16 +106,16 @@
106
106
  "jest": "^27.0.6",
107
107
  "ts-jest": "^27.0.4",
108
108
  "yargs": "^17.0.1",
109
- "@modern-js/babel-compiler": "0.0.0-next-20230224025154",
110
- "@modern-js/utils": "0.0.0-next-20230224025154",
111
- "@modern-js/babel-preset-app": "0.0.0-next-20230224025154",
112
- "@modern-js/plugin": "0.0.0-next-20230224025154",
113
- "@modern-js/prod-server": "0.0.0-next-20230224025154"
109
+ "@modern-js/babel-compiler": "0.0.0-next-20230224054734",
110
+ "@modern-js/utils": "0.0.0-next-20230224054734",
111
+ "@modern-js/babel-preset-app": "0.0.0-next-20230224054734",
112
+ "@modern-js/plugin": "0.0.0-next-20230224054734",
113
+ "@modern-js/prod-server": "0.0.0-next-20230224054734"
114
114
  },
115
115
  "peerDependencies": {
116
116
  "react": ">=17",
117
117
  "react-dom": ">=17",
118
- "@modern-js/runtime": "^0.0.0-next-20230224025154"
118
+ "@modern-js/runtime": "^0.0.0-next-20230224054734"
119
119
  },
120
120
  "peerDependenciesMeta": {
121
121
  "@modern-js/runtime": {
@@ -132,12 +132,12 @@
132
132
  "@jest/types": "^27.0.6",
133
133
  "jest": "^27",
134
134
  "typescript": "^4",
135
- "@modern-js/core": "0.0.0-next-20230224025154",
136
- "@modern-js/types": "0.0.0-next-20230224025154",
137
- "@modern-js/runtime": "0.0.0-next-20230224025154",
138
- "@modern-js/bff-core": "0.0.0-next-20230224025154",
139
- "@scripts/build": "0.0.0-next-20230224025154",
140
- "@scripts/jest-config": "0.0.0-next-20230224025154"
135
+ "@modern-js/core": "0.0.0-next-20230224054734",
136
+ "@modern-js/types": "0.0.0-next-20230224054734",
137
+ "@modern-js/runtime": "0.0.0-next-20230224054734",
138
+ "@modern-js/bff-core": "0.0.0-next-20230224054734",
139
+ "@scripts/build": "0.0.0-next-20230224054734",
140
+ "@scripts/jest-config": "0.0.0-next-20230224054734"
141
141
  },
142
142
  "sideEffects": false,
143
143
  "modernConfig": {},