@forklaunch/core 0.1.8 → 0.1.9
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/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 forklaunch
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -118,7 +118,7 @@ export interface ForklaunchResponse<ResBody = {
|
|
118
118
|
*/
|
119
119
|
export type MapSchema<SV extends AnySchemaValidator, T extends IdiomaticSchema<SV> | SV['_ValidSchemaObject']> = Schema<T, SV> extends infer U ? {
|
120
120
|
[key: string]: unknown;
|
121
|
-
} extends U ?
|
121
|
+
} extends U ? unknown : U : never;
|
122
122
|
/**
|
123
123
|
* Type representing the next function in a middleware.
|
124
124
|
* @param {unknown} [err] - Optional error parameter.
|
@@ -101,7 +101,7 @@ export interface PathParamHttpContractDetails<SV extends AnySchemaValidator, Par
|
|
101
101
|
* @template BodySchema - A type for the body schema, defaulting to Body.
|
102
102
|
* @template QuerySchemas - A type for query schemas, defaulting to QueryObject.
|
103
103
|
*/
|
104
|
-
export interface HttpContractDetails<SV extends AnySchemaValidator, ParamSchemas extends ParamsObject<SV> = ParamsObject<SV>, ResponseSchemas extends ResponsesObject<SV> = ResponsesObject<SV>, BodySchema extends Body<SV> = Body<SV>, QuerySchemas extends QueryObject<SV> = QueryObject<SV>> extends PathParamHttpContractDetails<SV, ParamSchemas, ResponseSchemas, QuerySchemas> {
|
104
|
+
export interface HttpContractDetails<SV extends AnySchemaValidator, ParamSchemas extends ParamsObject<SV> = ParamsObject<SV>, ResponseSchemas extends ResponsesObject<SV> = ResponsesObject<SV>, BodySchema extends Body<SV> = Body<SV>, QuerySchemas extends QueryObject<SV> = QueryObject<SV>, RequestHeaders extends HeadersObject<SV> = HeadersObject<SV>, ResponseHeaders extends HeadersObject<SV> = HeadersObject<SV>> extends PathParamHttpContractDetails<SV, ParamSchemas, ResponseSchemas, QuerySchemas, RequestHeaders, ResponseHeaders> {
|
105
105
|
/** Optional body schema for the contract */
|
106
106
|
body?: BodySchema;
|
107
107
|
/** Optional content type for the contract */
|
package/package.json
CHANGED
@@ -1,19 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@forklaunch/core",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.9",
|
4
4
|
"description": "forklaunch-js core package. Contains useful building blocks.",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
7
7
|
],
|
8
8
|
"types": "dist/index.d.ts",
|
9
|
-
"scripts": {
|
10
|
-
"test": "jest",
|
11
|
-
"build": "tsc",
|
12
|
-
"docs": "typedoc --out docs *",
|
13
|
-
"lint": "eslint . -c eslint.config.mjs",
|
14
|
-
"lint:fix": "eslint . -c eslint.config.mjs --fix",
|
15
|
-
"format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.ts' --write"
|
16
|
-
},
|
17
9
|
"author": "Rohin Bhargava",
|
18
10
|
"license": "MIT",
|
19
11
|
"repository": {
|
@@ -55,5 +47,13 @@
|
|
55
47
|
"types": "./dist/index.d.ts",
|
56
48
|
"default": "./dist/index.js"
|
57
49
|
}
|
50
|
+
},
|
51
|
+
"scripts": {
|
52
|
+
"test": "jest",
|
53
|
+
"build": "tsc",
|
54
|
+
"docs": "typedoc --out docs *",
|
55
|
+
"lint": "eslint . -c eslint.config.mjs",
|
56
|
+
"lint:fix": "eslint . -c eslint.config.mjs --fix",
|
57
|
+
"format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.ts' --write"
|
58
58
|
}
|
59
59
|
}
|