@elysiajs/eden 1.1.0-rc.1 → 1.1.1
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/fetch.d.mts +1 -1
- package/dist/fetch.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/treaty.d.mts +1 -1
- package/dist/treaty.d.ts +1 -1
- package/dist/treaty2/types.d.ts +3 -2
- package/dist/treaty2.d.mts +3 -2
- package/dist/treaty2.d.ts +3 -2
- package/dist/{types-DNydNaKe.d.mts → types-C41kuZ-K.d.mts} +2 -1
- package/dist/{types-DNydNaKe.d.ts → types-C41kuZ-K.d.ts} +2 -1
- package/dist/types.d.ts +1 -0
- package/package.json +3 -3
package/dist/fetch.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import { T as TreatyToPath, a as IsNever, I as IsUnknown, P as Prettify, M as MapError, E as EdenFetchError } from './types-
|
|
2
|
+
import { T as TreatyToPath, a as IsNever, I as IsUnknown, P as Prettify, M as MapError, E as EdenFetchError } from './types-C41kuZ-K.mjs';
|
|
3
3
|
|
|
4
4
|
declare namespace EdenFetch {
|
|
5
5
|
type Create<App extends Elysia<any, any, any, any, any, any, any, any>> = App extends {
|
package/dist/fetch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import { T as TreatyToPath, a as IsNever, I as IsUnknown, P as Prettify, M as MapError, E as EdenFetchError } from './types-
|
|
2
|
+
import { T as TreatyToPath, a as IsNever, I as IsUnknown, P as Prettify, M as MapError, E as EdenFetchError } from './types-C41kuZ-K.js';
|
|
3
3
|
|
|
4
4
|
declare namespace EdenFetch {
|
|
5
5
|
type Create<App extends Elysia<any, any, any, any, any, any, any, any>> = App extends {
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/treaty.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia, InputSchema } from 'elysia';
|
|
2
|
-
import { P as Prettify, I as IsUnknown, M as MapError, a as IsNever, E as EdenFetchError } from './types-
|
|
2
|
+
import { P as Prettify, I as IsUnknown, M as MapError, a as IsNever, E as EdenFetchError } from './types-C41kuZ-K.mjs';
|
|
3
3
|
|
|
4
4
|
type Files = File | FileList;
|
|
5
5
|
type Replace<RecordType, TargetType, GenericType> = {
|
package/dist/treaty.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia, InputSchema } from 'elysia';
|
|
2
|
-
import { P as Prettify, I as IsUnknown, M as MapError, a as IsNever, E as EdenFetchError } from './types-
|
|
2
|
+
import { P as Prettify, I as IsUnknown, M as MapError, a as IsNever, E as EdenFetchError } from './types-C41kuZ-K.js';
|
|
3
3
|
|
|
4
4
|
type Files = File | FileList;
|
|
5
5
|
type Replace<RecordType, TargetType, GenericType> = {
|
package/dist/treaty2/types.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Elysia } from 'elysia';
|
|
2
2
|
import { EdenWS } from './ws';
|
|
3
|
-
import type { IsNever, Prettify } from '../types';
|
|
3
|
+
import type { IsNever, Not, Prettify } from '../types';
|
|
4
4
|
type Files = File | FileList;
|
|
5
5
|
type ReplaceBlobWithFiles<in out RecordType extends Record<string, unknown>> = {
|
|
6
6
|
[K in keyof RecordType]: RecordType[K] extends Blob | Blob[] ? Files : RecordType[K];
|
|
7
7
|
} & {};
|
|
8
|
+
type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
|
|
8
9
|
type ReplaceGeneratorWithAsyncGenerator<in out RecordType extends Record<string, unknown>> = {
|
|
9
|
-
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? AsyncGenerator<A, B, C> : RecordType[K];
|
|
10
|
+
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K] extends AsyncGenerator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K];
|
|
10
11
|
} & {};
|
|
11
12
|
type MaybeArray<T> = T | T[];
|
|
12
13
|
type MaybePromise<T> = T | Promise<T>;
|
package/dist/treaty2.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputSchema, Elysia } from 'elysia';
|
|
2
|
-
import { P as Prettify, a as IsNever } from './types-
|
|
2
|
+
import { P as Prettify, a as IsNever, N as Not } from './types-C41kuZ-K.mjs';
|
|
3
3
|
|
|
4
4
|
declare class EdenWS<in out Schema extends InputSchema<any> = {}> {
|
|
5
5
|
url: string;
|
|
@@ -18,8 +18,9 @@ type Files = File | FileList;
|
|
|
18
18
|
type ReplaceBlobWithFiles<in out RecordType extends Record<string, unknown>> = {
|
|
19
19
|
[K in keyof RecordType]: RecordType[K] extends Blob | Blob[] ? Files : RecordType[K];
|
|
20
20
|
} & {};
|
|
21
|
+
type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
|
|
21
22
|
type ReplaceGeneratorWithAsyncGenerator<in out RecordType extends Record<string, unknown>> = {
|
|
22
|
-
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? AsyncGenerator<A, B, C> : RecordType[K];
|
|
23
|
+
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K] extends AsyncGenerator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K];
|
|
23
24
|
} & {};
|
|
24
25
|
type MaybeArray<T> = T | T[];
|
|
25
26
|
type MaybePromise<T> = T | Promise<T>;
|
package/dist/treaty2.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputSchema, Elysia } from 'elysia';
|
|
2
|
-
import { P as Prettify, a as IsNever } from './types-
|
|
2
|
+
import { P as Prettify, a as IsNever, N as Not } from './types-C41kuZ-K.js';
|
|
3
3
|
|
|
4
4
|
declare class EdenWS<in out Schema extends InputSchema<any> = {}> {
|
|
5
5
|
url: string;
|
|
@@ -18,8 +18,9 @@ type Files = File | FileList;
|
|
|
18
18
|
type ReplaceBlobWithFiles<in out RecordType extends Record<string, unknown>> = {
|
|
19
19
|
[K in keyof RecordType]: RecordType[K] extends Blob | Blob[] ? Files : RecordType[K];
|
|
20
20
|
} & {};
|
|
21
|
+
type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
|
|
21
22
|
type ReplaceGeneratorWithAsyncGenerator<in out RecordType extends Record<string, unknown>> = {
|
|
22
|
-
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? AsyncGenerator<A, B, C> : RecordType[K];
|
|
23
|
+
[K in keyof RecordType]: RecordType[K] extends Generator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K] extends AsyncGenerator<infer A, infer B, infer C> ? And<Not<IsNever<A>>, void extends B ? true : false> extends true ? AsyncGenerator<A, B, C> : And<IsNever<A>, void extends B ? false : true> extends true ? B : AsyncGenerator<A, B, C> | B : RecordType[K];
|
|
23
24
|
} & {};
|
|
24
25
|
type MaybeArray<T> = T | T[];
|
|
25
26
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -39,5 +39,6 @@ type TreatyToPath<T, Path extends string = ''> = UnionToIntersect<T extends Reco
|
|
|
39
39
|
};
|
|
40
40
|
} : TreatyToPath<T[K], `${Path}/${K & string}`>;
|
|
41
41
|
}[keyof T] : {}>;
|
|
42
|
+
type Not<T> = T extends true ? false : true;
|
|
42
43
|
|
|
43
|
-
export { EdenFetchError as E, type IsUnknown as I, type MapError as M, type Prettify as P, type TreatyToPath as T, type IsNever as a };
|
|
44
|
+
export { EdenFetchError as E, type IsUnknown as I, type MapError as M, type Not as N, type Prettify as P, type TreatyToPath as T, type IsNever as a };
|
|
@@ -39,5 +39,6 @@ type TreatyToPath<T, Path extends string = ''> = UnionToIntersect<T extends Reco
|
|
|
39
39
|
};
|
|
40
40
|
} : TreatyToPath<T[K], `${Path}/${K & string}`>;
|
|
41
41
|
}[keyof T] : {}>;
|
|
42
|
+
type Not<T> = T extends true ? false : true;
|
|
42
43
|
|
|
43
|
-
export { EdenFetchError as E, type IsUnknown as I, type MapError as M, type Prettify as P, type TreatyToPath as T, type IsNever as a };
|
|
44
|
+
export { EdenFetchError as E, type IsUnknown as I, type MapError as M, type Not as N, type Prettify as P, type TreatyToPath as T, type IsNever as a };
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elysiajs/eden",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
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": "
|
|
70
|
+
"elysia": ">= 1.1.0",
|
|
71
71
|
"esbuild": "^0.19.3",
|
|
72
72
|
"eslint": "^8.26.0",
|
|
73
73
|
"expect-type": "^0.17.3",
|