@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 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
@@ -1,4 +1,5 @@
1
- export * from 'farrow-schema';
2
- export * from 'farrow-api';
3
- export * from 'farrow-pipeline';
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';
@@ -41,32 +41,18 @@ Object.keys(_farrowSchema).forEach(function (key) {
41
41
  });
42
42
  });
43
43
 
44
- var _farrowApi = require("farrow-api");
44
+ var _match = require("./match");
45
45
 
46
- Object.keys(_farrowApi).forEach(function (key) {
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(_farrowPipeline).forEach(function (key) {
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] === _farrowPipeline[key]) return;
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 _farrowPipeline[key];
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-api';
3
- export * from 'farrow-pipeline';
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
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
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:
@@ -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.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/server-utils": "^1.2.3",
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
- "@types/jest": "^26",
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
- "@scripts/jest-config": "0.0.0"
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": "modern build",
56
- "test": "jest --passWithNoTests"
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
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/modern.config.js DELETED
@@ -1,2 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "isolatedModules": true,
8
- "paths": {}
9
- },
10
- "include": ["src"]
11
- }