@tuyau/core 1.0.0-beta.2 → 1.0.0-beta.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.
|
@@ -39,9 +39,9 @@ type HasKeys<T> = keyof T extends never ? false : true;
|
|
|
39
39
|
*/
|
|
40
40
|
type HasRequiredKeys<T> = T extends Record<string, any> ? keyof T extends never ? false : {} extends Pick<T, keyof T> ? false : true : false;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Request args without ky options
|
|
43
43
|
*/
|
|
44
|
-
type
|
|
44
|
+
type RawRequestArgs<E extends AdonisEndpoint> = (HasKeys<E['types']['params']> extends true ? HasRequiredKeys<E['types']['params']> extends true ? {
|
|
45
45
|
params: E['types']['params'];
|
|
46
46
|
} : {
|
|
47
47
|
params?: E['types']['params'];
|
|
@@ -53,7 +53,11 @@ type RequestArgs<E extends AdonisEndpoint> = (HasKeys<E['types']['params']> exte
|
|
|
53
53
|
body: E['types']['body'];
|
|
54
54
|
} : {
|
|
55
55
|
body?: E['types']['body'];
|
|
56
|
-
})
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Constructs the request arguments type for an endpoint
|
|
59
|
+
*/
|
|
60
|
+
type RequestArgs<E extends AdonisEndpoint> = RawRequestArgs<E> & Omit<Options, 'body' | 'params' | 'searchParams' | 'method' | 'json' | 'prefixUrl'>;
|
|
57
61
|
/**
|
|
58
62
|
* Extracts response type from an endpoint
|
|
59
63
|
*/
|
|
@@ -208,4 +212,4 @@ type RegistryGroupedByMethod<R extends Record<string, AdonisEndpoint>, M extends
|
|
|
208
212
|
};
|
|
209
213
|
};
|
|
210
214
|
|
|
211
|
-
export { type AdonisEndpoint, type AdonisRegistry, type BuildNamed, type CamelCase, type CamelCaseSplit, type EndpointByMethodPattern, type EndpointByName, type Endpoints, type EndpointsByMethod, type HasKeys, type HasRequiredKeys, type MaybeArray, type Method, Path, PathWithRegistry, type PatternsByMethod, type QueryParameters, type RegValues, type RegistryGroupedByMethod, type RequestArgs, type ResponseOf, Route, RouteWithRegistry, type SetAtPath, type Split, type StrKeys, type TuyauConfiguration, type TuyauPlugin, type UnionToIntersection, type UserRegistry, type ValueOf };
|
|
215
|
+
export { type AdonisEndpoint, type AdonisRegistry, type BuildNamed, type CamelCase, type CamelCaseSplit, type EndpointByMethodPattern, type EndpointByName, type Endpoints, type EndpointsByMethod, type HasKeys, type HasRequiredKeys, type MaybeArray, type Method, Path, PathWithRegistry, type PatternsByMethod, type QueryParameters, type RawRequestArgs, type RegValues, type RegistryGroupedByMethod, type RequestArgs, type ResponseOf, Route, RouteWithRegistry, type SetAtPath, type Split, type StrKeys, type TuyauConfiguration, type TuyauPlugin, type UnionToIntersection, type UserRegistry, type ValueOf };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuyau/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"description": "e2e client for AdonisJS",
|
|
6
6
|
"author": "Julien Ripouteau <julien@ripouteau.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"@adonisjs/assembler": "8.0.0-next.19",
|
|
35
35
|
"@adonisjs/core": "^7.0.0-next.10",
|
|
36
36
|
"@adonisjs/http-server": "8.0.0-next.12",
|
|
37
|
-
"@arktype/attest": "^0.53.0",
|
|
38
37
|
"@faker-js/faker": "^10.1.0",
|
|
39
38
|
"@poppinss/ts-exec": "^1.4.1",
|
|
40
39
|
"@types/node": "^24.10.0",
|