wabe 0.6.8 → 0.6.9

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.
@@ -6,4 +6,5 @@ export interface WabeContext<T extends WabeTypes> {
6
6
  sessionId?: string | null;
7
7
  isRoot: boolean;
8
8
  wabe: Wabe<T>;
9
+ isGraphQLCall?: boolean;
9
10
  }
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Hash a string with Argon2id and PHC format
3
+ * @return : Returns the PHC format of the hashed text
4
+ */
5
+ export declare const hashArgon2: unknown;
6
+ /*
7
+ * Verify if a hash matchs with a string
8
+ * @return : Returns true if the password matchs with the hash, false otherwise
9
+ */
10
+ export declare const verifyArgon2: unknown;
11
+ export declare const isArgon2Hash: (value: string) => boolean;
@@ -1,3 +1,4 @@
1
1
  import type { WabeContext } from "../server/interface";
2
2
  export declare const contextWithRoot: (context: WabeContext<any>) => WabeContext<any>;
3
3
  export declare const notEmpty: <T>(value: T | null | undefined) => value is T;
4
+ export * from "./crypto";
@@ -1,9 +1,21 @@
1
1
  import type { ClassInterface } from "../schema";
2
- import type { WabeTypes, WabeConfig } from "../server";
3
- export declare const toBase32: (stringToEncode: string) => string;
2
+ import type { WabeTypes, WabeConfig, WabeContext } from "../server";
3
+ export declare const contextWithoutGraphQLCall: (context: WabeContext<any>) => WabeContext<any>;
4
+ type Base32Variant = "RFC3548" | "RFC4648" | "RFC4648-HEX" | "Crockford";
5
+ interface Base32Options {
6
+ padding?: boolean;
7
+ }
8
+ /**
9
+ * Convert supported input types to Uint8Array.
10
+ */
11
+ export declare const toUint8Array: (data: string | ArrayBuffer | Uint8Array | Buffer) => Uint8Array;
12
+ /**
13
+ * Encode binary data to base32 using specified variant.
14
+ * Base on https://github.com/LinusU/base32-encode/blob/master/index.js
15
+ */
16
+ export declare const base32Encode: (data: string | ArrayBuffer | Uint8Array | Buffer, variant: Base32Variant, options?: Base32Options) => string;
4
17
  export declare const getNewObjectAfterUpdateNestedProperty: unknown;
5
18
  export declare const getNestedProperty: unknown;
6
- export declare const isArgon2Hash: (value: string) => boolean;
7
19
  export declare const firstLetterInUpperCase: unknown;
8
20
  export declare const firstLetterInLowerCase: unknown;
9
21
  export declare const getClassFromClassName: <T extends WabeTypes>(className: string, config: WabeConfig<any>) => ClassInterface<T>;
@@ -20,3 +32,4 @@ export declare const getCookieInRequestHeaders: unknown;
20
32
  * - trim
21
33
  */
22
34
  export declare const tokenize: unknown;
35
+ export {};
@@ -13,6 +13,7 @@ enum AuthenticationProvider {
13
13
 
14
14
  enum SecondaryFactor {
15
15
  emailOTP
16
+ qrcodeOTP
16
17
  }
17
18
 
18
19
  """Object containing information about the file"""
@@ -1742,7 +1743,7 @@ input SendEmailInput {
1742
1743
  }
1743
1744
 
1744
1745
  type SignInWithOutput {
1745
- id: String
1746
+ user: User
1746
1747
  accessToken: String
1747
1748
  refreshToken: String
1748
1749
  srp: SignInWithOutputSRPOutputSignInWith
package/generated/wabe.ts CHANGED
@@ -12,7 +12,8 @@ export enum AuthenticationProvider {
12
12
  }
13
13
 
14
14
  export enum SecondaryFactor {
15
- emailOTP = "emailOTP"
15
+ emailOTP = "emailOTP",
16
+ qrcodeOTP = "qrcodeOTP"
16
17
  }
17
18
 
18
19
  export type ACLObjectUsersACL = {
package/package.json CHANGED
@@ -1,55 +1,54 @@
1
1
  {
2
- "name": "wabe",
3
- "version": "0.6.8",
4
- "description": "Your backend in minutes not days",
5
- "homepage": "https://wabe.dev",
6
- "author": {
7
- "name": "coratgerl",
8
- "url": "https://github.com/coratgerl"
9
- },
10
- "license": "Apache-2.0",
11
- "keywords": [
12
- "backend",
13
- "wabe",
14
- "graphql",
15
- "baas"
16
- ],
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/palixir/wabe.git"
20
- },
21
- "main": "dist/index.js",
22
- "scripts": {
23
- "build": "bun --filter wabe-build build:package $(pwd)",
24
- "check": "tsc --project $(pwd)/tsconfig.json",
25
- "lint": "biome lint . --no-errors-on-unmatched --config-path=../../",
26
- "ci": "bun generate:codegen && bun lint $(pwd) && bun check && bun test src",
27
- "format": "biome format --write . --config-path=../../",
28
- "dev": "bun run --watch dev/index.ts",
29
- "generate:codegen": "touch generated/wabe.ts && CODEGEN=true bun dev/index.ts"
30
- },
31
- "dependencies": {
32
- "@graphql-yoga/plugin-disable-introspection": "2.10.9",
33
- "@node-rs/argon2": "2.0.2",
34
- "croner": "9.0.0",
35
- "js-srp6a": "1.0.2",
36
- "jsonwebtoken": "9.0.2",
37
- "libphonenumber-js": "1.11.18",
38
- "otplib": "12.0.1",
39
- "p-retry": "6.2.1",
40
- "wobe": "1.1.10",
41
- "wobe-graphql-yoga": "1.2.6"
42
- },
43
- "devDependencies": {
44
- "@types/jsonwebtoken": "9.0.6",
45
- "@types/uuid": "9.0.6",
46
- "graphql-request": "6.1.0",
47
- "get-port": "7.1.0",
48
- "uuid": "10.0.0",
49
- "wabe-mongodb-launcher": "workspace:*",
50
- "wabe-pluralize": "workspace:*",
51
- "wabe-build": "workspace:*",
52
- "wabe-mongodb": "workspace:*",
53
- "wabe": "workspace:*"
54
- }
2
+ "name": "wabe",
3
+ "version": "0.6.9",
4
+ "description": "Your backend in minutes not days",
5
+ "homepage": "https://wabe.dev",
6
+ "author": {
7
+ "name": "coratgerl",
8
+ "url": "https://github.com/coratgerl"
9
+ },
10
+ "license": "Apache-2.0",
11
+ "keywords": [
12
+ "backend",
13
+ "wabe",
14
+ "graphql",
15
+ "baas"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/palixir/wabe.git"
20
+ },
21
+ "main": "dist/index.js",
22
+ "scripts": {
23
+ "build": "bun --filter wabe-build build:package $(pwd)",
24
+ "check": "tsc --project $(pwd)/tsconfig.json",
25
+ "lint": "biome lint . --no-errors-on-unmatched --config-path=../../",
26
+ "ci": "bun generate:codegen && bun lint $(pwd) && bun check && bun test src",
27
+ "format": "biome format --write . --config-path=../../",
28
+ "dev": "bun run --watch dev/index.ts",
29
+ "generate:codegen": "touch generated/wabe.ts && CODEGEN=true bun dev/index.ts"
30
+ },
31
+ "dependencies": {
32
+ "@graphql-yoga/plugin-disable-introspection": "2.10.9",
33
+ "croner": "9.0.0",
34
+ "js-srp6a": "1.0.2",
35
+ "jsonwebtoken": "9.0.2",
36
+ "libphonenumber-js": "1.11.18",
37
+ "otplib": "12.0.1",
38
+ "p-retry": "6.2.1",
39
+ "wobe": "1.1.10",
40
+ "wobe-graphql-yoga": "1.2.6"
41
+ },
42
+ "devDependencies": {
43
+ "@types/jsonwebtoken": "9.0.6",
44
+ "@types/uuid": "9.0.6",
45
+ "graphql-request": "6.1.0",
46
+ "get-port": "7.1.0",
47
+ "uuid": "10.0.0",
48
+ "wabe-mongodb-launcher": "workspace:*",
49
+ "wabe-pluralize": "workspace:*",
50
+ "wabe-build": "workspace:*",
51
+ "wabe-mongodb": "workspace:*",
52
+ "wabe": "workspace:*"
53
+ }
55
54
  }
package/bucket/b.txt DELETED
@@ -1 +0,0 @@
1
- b