@elysiajs/eden 1.1.0-rc.0 → 1.1.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/dist/treaty2/types.d.ts +3 -3
- package/dist/treaty2.d.mts +3 -3
- package/dist/treaty2.d.ts +3 -3
- package/package.json +3 -3
package/dist/treaty2/types.d.ts
CHANGED
|
@@ -43,9 +43,9 @@ export declare namespace Treaty {
|
|
|
43
43
|
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : never : CreateParams<Route[K]>;
|
|
44
44
|
};
|
|
45
45
|
type CreateParams<Route extends Record<string, any>> = Extract<keyof Route, `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED
|
|
46
|
-
((params: {
|
|
47
|
-
[param in Path extends `:${infer Param}` ? Param : never]: string | number;
|
|
48
|
-
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>> : never;
|
|
46
|
+
(((params: {
|
|
47
|
+
[param in Path extends `:${infer Param}` ? Param extends `${infer Param}?` ? Param : Param : never]: string | number;
|
|
48
|
+
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>>) & (Path extends `:${string}?` ? CreateParams<Route[Path]> : {}) : never;
|
|
49
49
|
export interface Config {
|
|
50
50
|
fetch?: Omit<RequestInit, 'headers' | 'method'>;
|
|
51
51
|
fetcher?: typeof fetch;
|
package/dist/treaty2.d.mts
CHANGED
|
@@ -56,9 +56,9 @@ declare namespace Treaty {
|
|
|
56
56
|
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : never : CreateParams<Route[K]>;
|
|
57
57
|
};
|
|
58
58
|
type CreateParams<Route extends Record<string, any>> = Extract<keyof Route, `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED
|
|
59
|
-
((params: {
|
|
60
|
-
[param in Path extends `:${infer Param}` ? Param : never]: string | number;
|
|
61
|
-
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>> : never;
|
|
59
|
+
(((params: {
|
|
60
|
+
[param in Path extends `:${infer Param}` ? Param extends `${infer Param}?` ? Param : Param : never]: string | number;
|
|
61
|
+
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>>) & (Path extends `:${string}?` ? CreateParams<Route[Path]> : {}) : never;
|
|
62
62
|
export interface Config {
|
|
63
63
|
fetch?: Omit<RequestInit, 'headers' | 'method'>;
|
|
64
64
|
fetcher?: typeof fetch;
|
package/dist/treaty2.d.ts
CHANGED
|
@@ -56,9 +56,9 @@ declare namespace Treaty {
|
|
|
56
56
|
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<ReplaceGeneratorWithAsyncGenerator<Response>>> : never : CreateParams<Route[K]>;
|
|
57
57
|
};
|
|
58
58
|
type CreateParams<Route extends Record<string, any>> = Extract<keyof Route, `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED
|
|
59
|
-
((params: {
|
|
60
|
-
[param in Path extends `:${infer Param}` ? Param : never]: string | number;
|
|
61
|
-
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>> : never;
|
|
59
|
+
(((params: {
|
|
60
|
+
[param in Path extends `:${infer Param}` ? Param extends `${infer Param}?` ? Param : Param : never]: string | number;
|
|
61
|
+
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>>) & (Path extends `:${string}?` ? CreateParams<Route[Path]> : {}) : never;
|
|
62
62
|
export interface Config {
|
|
63
63
|
fetch?: Omit<RequestInit, 'headers' | 'method'>;
|
|
64
64
|
fetcher?: typeof fetch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elysiajs/eden",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Fully type-safe Elysia client",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "saltyAom",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"release": "npm run build && npm run test && npm publish --access public"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"elysia": ">= 1.1.0
|
|
64
|
+
"elysia": ">= 1.1.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@elysiajs/cors": "0.7.0",
|
|
68
68
|
"@types/bun": "^1.0.3",
|
|
69
69
|
"@types/node": "^18.15.5",
|
|
70
|
-
"elysia": "^1.1.0
|
|
70
|
+
"elysia": "^1.1.0",
|
|
71
71
|
"esbuild": "^0.19.3",
|
|
72
72
|
"eslint": "^8.26.0",
|
|
73
73
|
"expect-type": "^0.17.3",
|