@orion-js/http 4.0.12 → 4.0.14
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/index.d.cts +2 -5
- package/dist/index.d.ts +2 -5
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ declare const startServer: (port?: number, otherOptions?: StartOrionOptions) =>
|
|
|
17
17
|
declare const getApp: () => express.Express;
|
|
18
18
|
declare const getServer: () => any;
|
|
19
19
|
|
|
20
|
-
interface RouteResponseObject<TReturnsSchema extends SchemaFieldType | undefined> {
|
|
20
|
+
interface RouteResponseObject<TReturnsSchema extends SchemaFieldType | undefined = undefined> {
|
|
21
21
|
statusCode?: number;
|
|
22
22
|
headers?: {
|
|
23
23
|
[key: string]: string;
|
|
@@ -32,11 +32,8 @@ type InferPathParam<Path, NextPart> = Path extends `:${infer OptionalParam}?` ?
|
|
|
32
32
|
} & NextPart : Path extends `:${infer Param}` ? {
|
|
33
33
|
[K in Param]: string;
|
|
34
34
|
} & NextPart : NextPart;
|
|
35
|
-
type Simplify<T> = T extends object ? T extends infer O ? {
|
|
36
|
-
[K in keyof O]: Simplify<O[K]>;
|
|
37
|
-
} : never : T;
|
|
38
35
|
type InternalPathParams<Path> = Path extends `${infer Segment}/${infer Rest}` ? InferPathParam<Segment, InferPathParams<Rest>> : InferPathParam<Path, {}>;
|
|
39
|
-
type InferPathParams<Path> =
|
|
36
|
+
type InferPathParams<Path> = InternalPathParams<Path>;
|
|
40
37
|
interface OrionRouteOptions<TPath extends string, TQueryParamsSchema extends Schema | undefined, TBodyParamsSchema extends Schema | undefined, TReturnsSchema extends SchemaFieldType | undefined> {
|
|
41
38
|
/**
|
|
42
39
|
* The path of the requests to match.
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const startServer: (port?: number, otherOptions?: StartOrionOptions) =>
|
|
|
17
17
|
declare const getApp: () => express.Express;
|
|
18
18
|
declare const getServer: () => any;
|
|
19
19
|
|
|
20
|
-
interface RouteResponseObject<TReturnsSchema extends SchemaFieldType | undefined> {
|
|
20
|
+
interface RouteResponseObject<TReturnsSchema extends SchemaFieldType | undefined = undefined> {
|
|
21
21
|
statusCode?: number;
|
|
22
22
|
headers?: {
|
|
23
23
|
[key: string]: string;
|
|
@@ -32,11 +32,8 @@ type InferPathParam<Path, NextPart> = Path extends `:${infer OptionalParam}?` ?
|
|
|
32
32
|
} & NextPart : Path extends `:${infer Param}` ? {
|
|
33
33
|
[K in Param]: string;
|
|
34
34
|
} & NextPart : NextPart;
|
|
35
|
-
type Simplify<T> = T extends object ? T extends infer O ? {
|
|
36
|
-
[K in keyof O]: Simplify<O[K]>;
|
|
37
|
-
} : never : T;
|
|
38
35
|
type InternalPathParams<Path> = Path extends `${infer Segment}/${infer Rest}` ? InferPathParam<Segment, InferPathParams<Rest>> : InferPathParam<Path, {}>;
|
|
39
|
-
type InferPathParams<Path> =
|
|
36
|
+
type InferPathParams<Path> = InternalPathParams<Path>;
|
|
40
37
|
interface OrionRouteOptions<TPath extends string, TQueryParamsSchema extends Schema | undefined, TBodyParamsSchema extends Schema | undefined, TReturnsSchema extends SchemaFieldType | undefined> {
|
|
41
38
|
/**
|
|
42
39
|
* The path of the requests to match.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/http",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.14",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"body-parser": "1.20.3",
|
|
13
13
|
"express": "4.21.2",
|
|
14
|
-
"@orion-js/env": "4.0.
|
|
14
|
+
"@orion-js/env": "4.0.3",
|
|
15
15
|
"@orion-js/helpers": "4.0.1",
|
|
16
16
|
"@orion-js/services": "4.0.2",
|
|
17
|
-
"@orion-js/
|
|
18
|
-
"@orion-js/
|
|
17
|
+
"@orion-js/resolvers": "4.0.10",
|
|
18
|
+
"@orion-js/schema": "4.0.10"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/body-parser": "^1.19.1",
|