wabe 0.6.13 → 0.6.15
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/authentication/OTP.d.ts +10 -6
- package/dist/authentication/interface.d.ts +3 -5
- package/dist/authentication/security.d.ts +1 -2
- package/dist/database/DatabaseController.d.ts +13 -2
- package/dist/database/interface.d.ts +2 -0
- package/dist/file/FileDevAdapter.d.ts +1 -0
- package/dist/graphql/pointerAndRelationFunction.d.ts +6 -0
- package/dist/index.js +4183 -3809
- package/dist/schema/Schema.d.ts +2 -2
- package/dist/server/generateCodegen.d.ts +27 -0
- package/dist/server/index.d.ts +7 -1
- package/dist/utils/objectKeys.d.ts +1 -0
- package/package.json +4 -4
- package/dist/schema/resolvers/sendEmail.d.ts +0 -1
package/dist/schema/Schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WabeConfig, WabeTypes } from "../server";
|
|
2
2
|
import type { HookObject } from "../hooks/HookObject";
|
|
3
3
|
export declare const defaultPrivateFields: unknown;
|
|
4
|
-
export type WabePrimaryTypes = "String" | "Int" | "Float" | "Boolean" | "Email" | "Phone" | "Date" | "File" | "Hash";
|
|
4
|
+
export type WabePrimaryTypes = "String" | "Int" | "Float" | "Boolean" | "Any" | "Email" | "Phone" | "Date" | "File" | "Hash";
|
|
5
5
|
export type WabeCustomTypes = "Array" | "Object";
|
|
6
6
|
export type WabeRelationTypes = "Pointer" | "Relation";
|
|
7
7
|
export type WabeFieldTypes = WabeCustomTypes | WabePrimaryTypes | WabeRelationTypes;
|
|
@@ -119,7 +119,7 @@ type TypeFieldVirtual<
|
|
|
119
119
|
export type TypeField<
|
|
120
120
|
T extends WabeTypes,
|
|
121
121
|
K extends keyof T["types"] = keyof T["types"]
|
|
122
|
-
> = (TypeFieldBase<string, "String"> | TypeFieldBase<number, "Int"> | TypeFieldBase<number, "Float"> | TypeFieldBase<boolean, "Boolean"> | TypeFieldBase<Date, "Date"> | TypeFieldBase<string, "Email"> | TypeFieldBase<string, "Phone"> | TypeFieldBase<string, "Hash"> | TypeFieldArray<T> | TypeFieldObject<T> | TypeFieldPointer<T> | TypeFieldRelation<T> | TypeFieldFile | TypeFieldCustomScalars<T> | TypeFieldCustomEnums<T> | TypeFieldVirtual<T, K>) & FieldBase<T>;
|
|
122
|
+
> = (TypeFieldBase<string, "String"> | TypeFieldBase<number, "Int"> | TypeFieldBase<number, "Float"> | TypeFieldBase<boolean, "Boolean"> | TypeFieldBase<any, "Any"> | TypeFieldBase<Date, "Date"> | TypeFieldBase<string, "Email"> | TypeFieldBase<string, "Phone"> | TypeFieldBase<string, "Hash"> | TypeFieldArray<T> | TypeFieldObject<T> | TypeFieldPointer<T> | TypeFieldRelation<T> | TypeFieldFile | TypeFieldCustomScalars<T> | TypeFieldCustomEnums<T> | TypeFieldVirtual<T, K>) & FieldBase<T>;
|
|
123
123
|
export type SchemaFields<
|
|
124
124
|
T extends WabeTypes,
|
|
125
125
|
K extends keyof T["types"] = keyof T["types"]
|
|
@@ -1 +1,28 @@
|
|
|
1
|
+
import type { ClassInterface, EnumInterface, ScalarInterface } from "../schema";
|
|
2
|
+
import { type DevWabeTypes } from "../utils/helper";
|
|
3
|
+
export type CodegenFormatOptions = {
|
|
4
|
+
indent?: string;
|
|
5
|
+
comma?: boolean;
|
|
6
|
+
semi?: boolean;
|
|
7
|
+
quote?: "single" | "double";
|
|
8
|
+
formatCommand?: string;
|
|
9
|
+
printWidth?: number;
|
|
10
|
+
finalNewline?: boolean;
|
|
11
|
+
semanticCompare?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const getIndent: (options?: CodegenFormatOptions) => string;
|
|
14
|
+
export declare const getEndChar: (options?: CodegenFormatOptions) => string;
|
|
15
|
+
export declare const getQuoteChar: (options?: CodegenFormatOptions) => string;
|
|
16
|
+
export declare const getFileTypeString: (options?: CodegenFormatOptions) => string;
|
|
17
|
+
export declare const wabeTypesToTypescriptTypes: unknown;
|
|
18
|
+
export declare const wabeClassRecordToString: unknown;
|
|
19
|
+
export declare const wabeEnumRecordToString: unknown;
|
|
20
|
+
export declare const wabeScalarRecordToString: unknown;
|
|
21
|
+
export declare const wrapLongGraphqlFieldArguments: unknown;
|
|
22
|
+
export declare const generateWabeDevTypes: ({ scalars, enums, classes, options }: {
|
|
23
|
+
enums?: EnumInterface[];
|
|
24
|
+
scalars?: ScalarInterface[];
|
|
25
|
+
classes: ClassInterface<DevWabeTypes>[];
|
|
26
|
+
options?: CodegenFormatOptions;
|
|
27
|
+
}) => string;
|
|
1
28
|
export declare const generateCodegen: unknown;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { GraphQLSchema } from "graphql";
|
|
|
5
5
|
import type { AuthenticationConfig } from "../authentication/interface";
|
|
6
6
|
import { type WabeRoute } from "./routes";
|
|
7
7
|
import { type Hook } from "../hooks";
|
|
8
|
-
import { generateCodegen } from "./generateCodegen";
|
|
8
|
+
import { CodegenFormatOptions, generateCodegen } from "./generateCodegen";
|
|
9
9
|
import { Wobe } from "wobe";
|
|
10
10
|
import type { Context, CorsOptions, RateLimitOptions } from "wobe";
|
|
11
11
|
import type { WabeContext } from "./interface";
|
|
@@ -22,6 +22,11 @@ type SecurityConfig = {
|
|
|
22
22
|
disableGraphQLDashboard?: boolean;
|
|
23
23
|
disableIntrospection?: boolean;
|
|
24
24
|
maxGraphqlDepth?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum recursion depth for where clauses with AND/OR and Pointer/Relation subqueries.
|
|
27
|
+
* Prevents DoS via deeply nested queries. Default: 10.
|
|
28
|
+
*/
|
|
29
|
+
maxWhereRecursionDepth?: number;
|
|
25
30
|
};
|
|
26
31
|
export * from "./interface";
|
|
27
32
|
export * from "./routes";
|
|
@@ -37,6 +42,7 @@ export interface WabeConfig<T extends WabeTypes> {
|
|
|
37
42
|
codegen?: {
|
|
38
43
|
enabled: true;
|
|
39
44
|
path: string;
|
|
45
|
+
formatOptions?: CodegenFormatOptions;
|
|
40
46
|
} | {
|
|
41
47
|
enabled?: false;
|
|
42
48
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isUnsafeObjectKey: (key: string) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wabe",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "Your backend without vendor lock-in in Typescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"baas",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"get-port": "7.1.0",
|
|
49
49
|
"graphql-request": "6.1.0",
|
|
50
50
|
"uuid": "13.0.0",
|
|
51
|
-
"wabe": "0.6.
|
|
51
|
+
"wabe": "0.6.13",
|
|
52
52
|
"wabe-build": "0.5.0",
|
|
53
|
-
"wabe-mongodb": "0.5.
|
|
54
|
-
"wabe-mongodb-launcher": "0.5.
|
|
53
|
+
"wabe-mongodb": "0.5.5",
|
|
54
|
+
"wabe-mongodb-launcher": "0.5.3",
|
|
55
55
|
"wabe-pluralize": "0.0.1"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sendEmailResolver: unknown;
|