@modern-js/bff-runtime 1.2.2 → 1.2.5-beta.0
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 +17 -0
- package/dist/js/modern/index.js +5 -4
- package/dist/js/node/index.js +6 -20
- package/dist/js/treeshaking/index.js +5 -4
- package/dist/js/treeshaking/match.js +5 -10
- package/dist/types/index.d.ts +2 -3
- package/package.json +35 -10
- package/.eslintrc.js +0 -8
- package/jest.config.js +0 -7
- package/modern.config.js +0 -2
- package/tsconfig.json +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @modern-js/bff-runtime
|
|
2
2
|
|
|
3
|
+
## 1.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
8
|
+
- Updated dependencies [a1198d509]
|
|
9
|
+
- @modern-js/server-utils@1.2.10
|
|
10
|
+
|
|
11
|
+
## 1.2.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
|
16
|
+
- Updated dependencies [d32f35134]
|
|
17
|
+
- Updated dependencies [1a30be07b]
|
|
18
|
+
- @modern-js/server-utils@1.2.6
|
|
19
|
+
|
|
3
20
|
## 1.2.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from 'farrow-schema';
|
|
2
|
-
export * from 'farrow-
|
|
3
|
-
|
|
4
|
-
export { match, isHandler, isSchemaHandler } from "./match";
|
|
1
|
+
export * from 'farrow-schema'; // export * from 'farrow-api';
|
|
2
|
+
// export * from 'farrow-pipeline';
|
|
3
|
+
|
|
4
|
+
export { match, isHandler, isSchemaHandler } from "./match";
|
|
5
|
+
export * from '@modern-js/bff-core';
|
package/dist/js/node/index.js
CHANGED
|
@@ -41,32 +41,18 @@ Object.keys(_farrowSchema).forEach(function (key) {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _match = require("./match");
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
if (key === "default" || key === "__esModule") return;
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
49
|
-
if (key in exports && exports[key] === _farrowApi[key]) return;
|
|
50
|
-
Object.defineProperty(exports, key, {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function () {
|
|
53
|
-
return _farrowApi[key];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
var _farrowPipeline = require("farrow-pipeline");
|
|
46
|
+
var _bffCore = require("@modern-js/bff-core");
|
|
59
47
|
|
|
60
|
-
Object.keys(
|
|
48
|
+
Object.keys(_bffCore).forEach(function (key) {
|
|
61
49
|
if (key === "default" || key === "__esModule") return;
|
|
62
50
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
63
|
-
if (key in exports && exports[key] ===
|
|
51
|
+
if (key in exports && exports[key] === _bffCore[key]) return;
|
|
64
52
|
Object.defineProperty(exports, key, {
|
|
65
53
|
enumerable: true,
|
|
66
54
|
get: function () {
|
|
67
|
-
return
|
|
55
|
+
return _bffCore[key];
|
|
68
56
|
}
|
|
69
57
|
});
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
var _match = require("./match");
|
|
58
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from 'farrow-schema';
|
|
2
|
-
export * from 'farrow-
|
|
3
|
-
|
|
4
|
-
export { match, isHandler, isSchemaHandler } from "./match";
|
|
1
|
+
export * from 'farrow-schema'; // export * from 'farrow-api';
|
|
2
|
+
// export * from 'farrow-pipeline';
|
|
3
|
+
|
|
4
|
+
export { match, isHandler, isSchemaHandler } from "./match";
|
|
5
|
+
export * from '@modern-js/bff-core';
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
|
-
|
|
7
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
9
4
|
import { toSchemaCtor, Struct, NonStrict } from 'farrow-schema';
|
|
10
5
|
import { createSchemaValidator } from 'farrow-schema/validator';
|
|
11
6
|
import { HandleSuccess, InputValidationError, OutputValidationError } from "./response";
|
|
@@ -32,9 +27,9 @@ export var baseMatch = function baseMatch(schema, handler) {
|
|
|
32
27
|
var validateApiOutput = createSchemaValidator(toSchemaCtor(schema.response));
|
|
33
28
|
|
|
34
29
|
var handle = /*#__PURE__*/function () {
|
|
35
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input) {
|
|
30
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(input) {
|
|
36
31
|
var inputResult, output, outputResult;
|
|
37
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
33
|
while (1) {
|
|
39
34
|
switch (_context.prev = _context.next) {
|
|
40
35
|
case 0:
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export * from 'farrow-schema';
|
|
2
|
-
export * from 'farrow-api';
|
|
3
|
-
export * from 'farrow-pipeline';
|
|
4
2
|
export { match, isHandler, isSchemaHandler } from './match';
|
|
5
3
|
export type { Handler, SchemaHandler } from './match';
|
|
6
4
|
export type { RequestSchema, TypeOfRequestSchema, InputType } from './request';
|
|
7
5
|
export type { HandleResult, HandleSuccess, InputValidationError, OutputValidationError } from './response';
|
|
8
|
-
export type { RequestOption } from './compatible';
|
|
6
|
+
export type { RequestOption } from './compatible';
|
|
7
|
+
export * from '@modern-js/bff-core';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.5-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -29,31 +29,56 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7",
|
|
32
|
-
"@modern-js/
|
|
32
|
+
"@modern-js/bff-core": "^1.0.0",
|
|
33
|
+
"@modern-js/server-utils": "^1.2.6",
|
|
33
34
|
"farrow-api": "^1.10.8",
|
|
34
35
|
"farrow-http": "^1.10.8",
|
|
35
36
|
"farrow-pipeline": "^1.10.6",
|
|
36
37
|
"farrow-schema": "^1.10.8"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@
|
|
40
|
+
"@scripts/build": "0.0.0",
|
|
41
|
+
"@scripts/jest-config": "0.0.0",
|
|
42
|
+
"@types/jest": "^27",
|
|
40
43
|
"@types/node": "^14",
|
|
41
44
|
"@types/react": "^17",
|
|
42
45
|
"@types/react-dom": "^17",
|
|
43
|
-
"ts-jest": "^27.0.5",
|
|
44
|
-
"typescript": "^4",
|
|
45
|
-
"@scripts/build": "0.0.0",
|
|
46
46
|
"jest": "^27",
|
|
47
|
-
"
|
|
47
|
+
"ts-jest": "^27.0.5",
|
|
48
|
+
"typescript": "^4"
|
|
48
49
|
},
|
|
49
50
|
"publishConfig": {
|
|
50
51
|
"registry": "https://registry.npmjs.org/",
|
|
51
|
-
"access": "public"
|
|
52
|
+
"access": "public",
|
|
53
|
+
"types": "./dist/types/index.d.ts"
|
|
54
|
+
},
|
|
55
|
+
"wireit": {
|
|
56
|
+
"build": {
|
|
57
|
+
"command": "modern build",
|
|
58
|
+
"files": [
|
|
59
|
+
"src/**/*",
|
|
60
|
+
"tsconfig.json",
|
|
61
|
+
"package.json"
|
|
62
|
+
],
|
|
63
|
+
"output": [
|
|
64
|
+
"dist/**/*"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"test": {
|
|
68
|
+
"command": "jest --passWithNoTests",
|
|
69
|
+
"files": [
|
|
70
|
+
"src/**/*",
|
|
71
|
+
"tsconfig.json",
|
|
72
|
+
"package.json",
|
|
73
|
+
"tests/**/*"
|
|
74
|
+
],
|
|
75
|
+
"output": []
|
|
76
|
+
}
|
|
52
77
|
},
|
|
53
78
|
"scripts": {
|
|
54
79
|
"new": "modern new",
|
|
55
|
-
"build": "
|
|
56
|
-
"test": "
|
|
80
|
+
"build": "wireit",
|
|
81
|
+
"test": "wireit"
|
|
57
82
|
},
|
|
58
83
|
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
59
84
|
}
|
package/.eslintrc.js
DELETED
package/jest.config.js
DELETED
package/modern.config.js
DELETED