@modern-js/bff-runtime 2.58.1 → 2.58.3
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/esm/match.js +1 -1
- package/dist/esm-node/match.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/match.d.ts +4 -4
- package/dist/types/request.d.ts +2 -2
- package/dist/types/types.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cjs/compatible.js +0 -16
- package/dist/esm/compatible.js +0 -0
- package/dist/esm-node/compatible.js +0 -0
- package/dist/types/compatible.d.ts +0 -9
package/dist/esm/match.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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 _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
|
-
import {
|
|
4
|
+
import { NonStrict, Struct, toSchemaCtor } from "farrow-schema";
|
|
5
5
|
import { createSchemaValidator } from "farrow-schema/validator";
|
|
6
6
|
import { HandleSuccess, InputValidationError, OutputValidationError } from "./response";
|
|
7
7
|
var getErrorMessage = function(error) {
|
package/dist/esm-node/match.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonStrict, Struct, toSchemaCtor } from "farrow-schema";
|
|
2
2
|
import { createSchemaValidator } from "farrow-schema/validator";
|
|
3
3
|
import { HandleSuccess, InputValidationError, OutputValidationError } from "./response";
|
|
4
4
|
const getErrorMessage = (error) => {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export { match, isHandler, isSchemaHandler } from './match';
|
|
|
3
3
|
export type { Handler, SchemaHandler } from './match';
|
|
4
4
|
export type { RequestSchema, TypeOfRequestSchema, InputType } from './request';
|
|
5
5
|
export type { HandleResult, HandleSuccess, InputValidationError, OutputValidationError, } from './response';
|
|
6
|
-
export type { RequestOption } from './compatible';
|
package/dist/types/match.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MaybeAsync } from 'farrow-pipeline';
|
|
2
|
+
import { type SchemaCtorInput } from 'farrow-schema';
|
|
3
3
|
import type { TypeOfRouterRequestField } from './types';
|
|
4
|
-
import { RequestSchema, TypeOfRequestSchema
|
|
5
|
-
import { HandleResult } from './response';
|
|
4
|
+
import type { PureTypeOfRequestSchema, RequestSchema, TypeOfRequestSchema } from './request';
|
|
5
|
+
import { type HandleResult } from './response';
|
|
6
6
|
export type NormalHandler = (...args: any[]) => any;
|
|
7
7
|
export type Handler<I, O> = (input: I) => MaybeAsync<O>;
|
|
8
8
|
export type Schema<Req extends RequestSchema, Res extends SchemaCtorInput> = {
|
package/dist/types/request.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MarkReadOnlyDeep, RouterSchemaDescriptor } from './types';
|
|
1
|
+
import type { FieldDescriptor, FieldDescriptors, TypeOfFieldDescriptor, TypeOfFieldDescriptors } from 'farrow-schema';
|
|
2
|
+
import type { MarkReadOnlyDeep, RouterSchemaDescriptor } from './types';
|
|
3
3
|
export type RequestBaseSchema = {
|
|
4
4
|
params?: RouterSchemaDescriptor;
|
|
5
5
|
query?: RouterSchemaDescriptor;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as Schema from 'farrow-schema';
|
|
1
|
+
import type * as Schema from 'farrow-schema';
|
|
2
2
|
type Path = string | RegExp | Array<string | RegExp>;
|
|
3
3
|
export type TypeOfRouterRequestField<T> = T extends string | string[] ? string : T extends Path ? string : T extends Schema.FieldDescriptor ? Schema.TypeOfFieldDescriptor<T> : T extends Schema.FieldDescriptors ? Schema.TypeOfFieldDescriptors<T> : never;
|
|
4
4
|
export type RouterSchemaDescriptor = Schema.FieldDescriptors | (new () => Schema.ObjectType) | (new () => Schema.StructType);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.58.
|
|
18
|
+
"version": "2.58.3",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"jest": "^29",
|
|
43
43
|
"ts-jest": "^29.1.0",
|
|
44
44
|
"typescript": "^5",
|
|
45
|
-
"@scripts/build": "2.58.
|
|
46
|
-
"@scripts/jest-config": "2.58.
|
|
45
|
+
"@scripts/build": "2.58.3",
|
|
46
|
+
"@scripts/jest-config": "2.58.3"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"registry": "https://registry.npmjs.org/",
|
package/dist/cjs/compatible.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var compatible_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(compatible_exports);
|
package/dist/esm/compatible.js
DELETED
|
File without changes
|
|
File without changes
|