@m1212e/rumble 0.16.42 → 0.16.47
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/out/client.cjs.map +1 -1
- package/out/client.mjs.map +1 -1
- package/out/index.cjs +205 -4
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +21 -78
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +21 -78
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +205 -4
- package/out/index.mjs.map +1 -1
- package/package.json +16 -16
package/out/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _$graphql from "graphql";
|
|
2
2
|
import { GraphQLError } from "graphql";
|
|
3
3
|
import { Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
@@ -3509,84 +3509,11 @@ type ParseSchema<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions
|
|
|
3509
3509
|
//#region node_modules/json-schema-to-ts/lib/types/index.d.ts
|
|
3510
3510
|
type FromSchema$1<SCHEMA extends JSONSchema$1, OPTIONS extends FromSchemaOptions = FromSchemaDefaultOptions> = $Resolve<ParseSchema<SCHEMA, ParseOptions<SCHEMA, OPTIONS>>>;
|
|
3511
3511
|
//#endregion
|
|
3512
|
-
//#region node_modules/fets/node_modules/@whatwg-node/fetch/dist/index.d.ts
|
|
3513
|
-
/// <reference lib="dom" />
|
|
3514
|
-
/// <reference lib="dom.iterable" />
|
|
3515
|
-
declare type _URLPattern = typeof URLPattern;
|
|
3516
|
-
declare module '@whatwg-node/fetch' {
|
|
3517
|
-
export const fetch: typeof globalThis.fetch;
|
|
3518
|
-
export const Request: typeof globalThis.Request;
|
|
3519
|
-
export const Response: typeof globalThis.Response & {
|
|
3520
|
-
json(data: any, init?: ResponseInit): globalThis.Response;
|
|
3521
|
-
};
|
|
3522
|
-
export const Headers: typeof globalThis.Headers;
|
|
3523
|
-
export const FormData: typeof globalThis.FormData;
|
|
3524
|
-
export const ReadableStream: typeof globalThis.ReadableStream;
|
|
3525
|
-
export const WritableStream: typeof globalThis.WritableStream;
|
|
3526
|
-
export const TransformStream: typeof globalThis.TransformStream;
|
|
3527
|
-
export const CompressionStream: typeof globalThis.CompressionStream;
|
|
3528
|
-
export const DecompressionStream: typeof globalThis.DecompressionStream;
|
|
3529
|
-
export const TextDecoderStream: typeof globalThis.TextDecoderStream;
|
|
3530
|
-
export const TextEncoderStream: typeof globalThis.TextEncoderStream;
|
|
3531
|
-
export const Blob: typeof globalThis.Blob;
|
|
3532
|
-
export const File: typeof globalThis.File;
|
|
3533
|
-
export const crypto: typeof globalThis.crypto;
|
|
3534
|
-
export const btoa: typeof globalThis.btoa;
|
|
3535
|
-
export const TextDecoder: typeof globalThis.TextDecoder;
|
|
3536
|
-
export const TextEncoder: typeof globalThis.TextEncoder;
|
|
3537
|
-
export const URL: typeof globalThis.URL;
|
|
3538
|
-
export const URLSearchParams: typeof globalThis.URLSearchParams;
|
|
3539
|
-
export const URLPattern: _URLPattern;
|
|
3540
|
-
export interface FormDataLimits {
|
|
3541
|
-
/* Max field name size (in bytes). Default: 100. */
|
|
3542
|
-
fieldNameSize?: number;
|
|
3543
|
-
/* Max field value size (in bytes). Default: 1MB. */
|
|
3544
|
-
fieldSize?: number;
|
|
3545
|
-
/* Max number of fields. Default: Infinity. */
|
|
3546
|
-
fields?: number;
|
|
3547
|
-
/* For multipart forms, the max file size (in bytes). Default: Infinity. */
|
|
3548
|
-
fileSize?: number;
|
|
3549
|
-
/* For multipart forms, the max number of file fields. Default: Infinity. */
|
|
3550
|
-
files?: number;
|
|
3551
|
-
/* For multipart forms, the max number of parts (fields + files). Default: Infinity. */
|
|
3552
|
-
parts?: number;
|
|
3553
|
-
/* For multipart forms, the max number of header key-value pairs to parse. Default: 2000. */
|
|
3554
|
-
headerSize?: number;
|
|
3555
|
-
}
|
|
3556
|
-
export const createFetch: (opts?: {
|
|
3557
|
-
useNodeFetch?: boolean;
|
|
3558
|
-
formDataLimits?: FormDataLimits;
|
|
3559
|
-
skipPonyfill?: boolean;
|
|
3560
|
-
}) => {
|
|
3561
|
-
fetch: typeof fetch;
|
|
3562
|
-
Request: typeof Request;
|
|
3563
|
-
Response: typeof Response;
|
|
3564
|
-
Headers: typeof Headers;
|
|
3565
|
-
FormData: typeof FormData;
|
|
3566
|
-
ReadableStream: typeof ReadableStream;
|
|
3567
|
-
WritableStream: typeof WritableStream;
|
|
3568
|
-
TransformStream: typeof TransformStream;
|
|
3569
|
-
CompressionStream: typeof CompressionStream;
|
|
3570
|
-
DecompressionStream: typeof DecompressionStream;
|
|
3571
|
-
TextDecoderStream: typeof TextDecoderStream;
|
|
3572
|
-
TextEncoderStream: typeof TextEncoderStream;
|
|
3573
|
-
Blob: typeof Blob;
|
|
3574
|
-
File: typeof File;
|
|
3575
|
-
crypto: typeof crypto;
|
|
3576
|
-
btoa: typeof btoa;
|
|
3577
|
-
TextEncoder: typeof TextEncoder;
|
|
3578
|
-
TextDecoder: typeof TextDecoder;
|
|
3579
|
-
URLPattern: typeof URLPattern;
|
|
3580
|
-
URL: typeof URL;
|
|
3581
|
-
URLSearchParams: typeof URLSearchParams;
|
|
3582
|
-
};
|
|
3583
|
-
}
|
|
3584
|
-
//#endregion
|
|
3585
3512
|
//#region node_modules/@whatwg-node/promise-helpers/typings/index.d.cts
|
|
3586
3513
|
type MaybePromise<T> = Promise<T> | T;
|
|
3587
3514
|
type MaybePromiseLike<T> = PromiseLike<T> | T;
|
|
3588
3515
|
//#endregion
|
|
3589
|
-
//#region node_modules
|
|
3516
|
+
//#region node_modules/@whatwg-node/server/typings/utils.d.cts
|
|
3590
3517
|
interface NodeRequest {
|
|
3591
3518
|
protocol?: string | undefined;
|
|
3592
3519
|
hostname?: string | undefined;
|
|
@@ -3604,7 +3531,7 @@ interface NodeRequest {
|
|
|
3604
3531
|
}
|
|
3605
3532
|
type NodeResponse = ServerResponse | Http2ServerResponse;
|
|
3606
3533
|
//#endregion
|
|
3607
|
-
//#region node_modules
|
|
3534
|
+
//#region node_modules/@whatwg-node/server/typings/uwebsockets.d.cts
|
|
3608
3535
|
interface UWSRequest {
|
|
3609
3536
|
getMethod(): string;
|
|
3610
3537
|
forEach(callback: (key: string, value: string) => void): void;
|
|
@@ -3625,7 +3552,7 @@ interface UWSResponse {
|
|
|
3625
3552
|
}
|
|
3626
3553
|
type UWSHandler = (res: UWSResponse, req: UWSRequest) => void | Promise<void>;
|
|
3627
3554
|
//#endregion
|
|
3628
|
-
//#region node_modules
|
|
3555
|
+
//#region node_modules/@whatwg-node/server/typings/types.d.cts
|
|
3629
3556
|
interface FetchEvent extends Event {
|
|
3630
3557
|
waitUntil(f: MaybePromise<void>): void;
|
|
3631
3558
|
request: Request;
|
|
@@ -3676,6 +3603,7 @@ interface ServerAdapterObject<TServerContext> extends EventListenerObject, Async
|
|
|
3676
3603
|
handle(req: NodeRequest, res: NodeResponse, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): Promise<void>;
|
|
3677
3604
|
handle(requestLike: RequestLike, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
|
|
3678
3605
|
handle(request: Request, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
|
|
3606
|
+
handle(request: Request, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
|
|
3679
3607
|
handle(fetchEvent: FetchEvent & Partial<TServerContext & ServerAdapterInitialContext>, ...ctx: Partial<TServerContext>[]): void;
|
|
3680
3608
|
handle(res: UWSResponse, req: UWSRequest, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): Promise<void>;
|
|
3681
3609
|
handle(container: {
|
|
@@ -4102,9 +4030,14 @@ type Circular<TJSONSchema extends JSONSchema> = TJSONSchema extends {
|
|
|
4102
4030
|
properties: {
|
|
4103
4031
|
[key: string]: JSONSchema;
|
|
4104
4032
|
};
|
|
4105
|
-
} ? TJSONSchema extends PropertyValue<TJSONSchema, Property<TJSONSchema>> ? true :
|
|
4033
|
+
} ? TJSONSchema extends PropertyValue<TJSONSchema, Property<TJSONSchema>> ? true : [Extract<PropertyValue<TJSONSchema, Property<TJSONSchema>>, {
|
|
4034
|
+
$id: string;
|
|
4035
|
+
}>] extends [never] ? [ArrayItemValue<PropertyValue<TJSONSchema, Property<TJSONSchema>>>] extends [never] ? Circular<PropertyValue<TJSONSchema, Property<TJSONSchema>>> : ArrayItemValue<PropertyValue<TJSONSchema, Property<TJSONSchema>>> extends TJSONSchema ? true : Circular<PropertyValue<TJSONSchema, Property<TJSONSchema>>> : true : false;
|
|
4106
4036
|
type Property<TJSONSchema extends JSONSchema> = keyof TJSONSchema['properties'];
|
|
4107
4037
|
type PropertyValue<TJSONSchema extends JSONSchema, TProperty extends keyof TJSONSchema['properties']> = TJSONSchema['properties'][TProperty];
|
|
4038
|
+
type ArrayItemValue<TJSONSchema extends JSONSchema> = TJSONSchema extends {
|
|
4039
|
+
items: infer TItems extends JSONSchema;
|
|
4040
|
+
} ? TItems : never;
|
|
4108
4041
|
type FromSchema<T> = T extends {
|
|
4109
4042
|
static: infer U;
|
|
4110
4043
|
} ? U : T extends JSONSchema ? FromSchema$1<T, {
|
|
@@ -4135,8 +4068,12 @@ interface RouterBaseObject<TServerContext, TComponents extends RouterComponentsB
|
|
|
4135
4068
|
handle: ServerAdapterRequestHandler<TServerContext>;
|
|
4136
4069
|
route<const TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequestFromRouteSchemas<TComponents, TRouteSchemas, TMethod, TPath>, TTypedResponse extends TypedResponseFromRouteSchemas<TComponents, TRouteSchemas>>(opts: RouteWithSchemasOpts<TServerContext, TComponents, TRouteSchemas, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
|
|
4137
4070
|
route<TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequest<any, Record<string, FormDataEntryValue | undefined>, Record<string, string | undefined>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>, TTypedResponse extends TypedResponse>(opts: RouteWithTypesOpts<TServerContext, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
|
|
4071
|
+
use<TSubServerContext, TSubComponents extends RouterComponentsBase, TSubRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>>(subRouter: Router<TSubServerContext, TSubComponents, TSubRouterSDK>): Router<TServerContext, TComponents, TRouterSDK & TSubRouterSDK>;
|
|
4072
|
+
use<const TPrefix extends string, TSubServerContext, TSubComponents extends RouterComponentsBase, TSubRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>>(prefix: TPrefix, subRouter: Router<TSubServerContext, TSubComponents, TSubRouterSDK>): Router<TServerContext, TComponents, TRouterSDK & { [TKey in keyof TSubRouterSDK as TKey extends string ? `${TPrefix}${TKey}` : TKey]: TSubRouterSDK[TKey] }>;
|
|
4138
4073
|
__client: TRouterSDK;
|
|
4139
4074
|
__onRouterInitHooks: OnRouterInitHook<TServerContext>[];
|
|
4075
|
+
__routes: RouteWithSchemasOpts<any, RouterComponentsBase, RouteSchemas, HTTPMethod, string, TypedRequest, TypedResponse>[];
|
|
4076
|
+
__base: string;
|
|
4140
4077
|
}
|
|
4141
4078
|
type Router<TServerContext, TComponents extends RouterComponentsBase, TRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>> = ServerAdapter<TServerContext, RouterBaseObject<TServerContext, TComponents, TRouterSDK>>;
|
|
4142
4079
|
type RouteHandler<TServerContext = {}, TTypedRequest extends TypedRequest = TypedRequest, TTypedResponse extends TypedResponse = TypedResponse> = (
|
|
@@ -4848,6 +4785,12 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4848
4785
|
listAction?: Action | undefined;
|
|
4849
4786
|
isAllowed?: ((context: UserContext) => boolean | Promise<boolean>) | undefined;
|
|
4850
4787
|
}) => void;
|
|
4788
|
+
/**
|
|
4789
|
+
* The generated GraphQL schema. You can use this for example to create a GraphQL server with a different library than Yoga or to generate types with codegen.
|
|
4790
|
+
* When calling this function, the schema will be built for the first time and cached for later usage. So you can call this function multiple times without performance issues.
|
|
4791
|
+
* After calling, you cannot adjust the schema via the schema builder
|
|
4792
|
+
*/
|
|
4793
|
+
buildSchema: () => _$graphql.GraphQLSchema;
|
|
4851
4794
|
};
|
|
4852
4795
|
//#endregion
|
|
4853
4796
|
//#region lib/types/rumbleError.d.ts
|