@thisisagile/easy 15.28.0 → 15.28.2

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.
@@ -29,7 +29,7 @@ export declare class RequestOptions extends Enum {
29
29
  bearer: (jwt: Text) => this;
30
30
  basic: (username: Text, password: Text) => this;
31
31
  maxRedirects: (max?: number) => this;
32
- validateStatus: (validate?: ((status: number) => boolean) | undefined) => this;
32
+ validateStatus: (validate?: (status: number) => boolean) => this;
33
33
  timeout: (t?: CacheAge) => this;
34
34
  }
35
35
  export declare const isRequestOptions: (o?: unknown) => o is RequestOptions;
@@ -11,4 +11,4 @@ export type Response = {
11
11
  export declare const isResponse: TypeGuard<Response>;
12
12
  export declare const toResponse: (status: HttpStatus | Code, body?: unknown, headers?: {
13
13
  [key: string]: any;
14
- } | undefined) => Response;
14
+ }) => Response;
@@ -10,7 +10,7 @@ import { Join } from './Join';
10
10
  import { Count } from './Count';
11
11
  export declare class Table extends Mapper {
12
12
  protected readonly map: {
13
- column: <T = unknown>(name: string, options?: PropertyOptions<T> | undefined) => Column;
13
+ column: <T = unknown>(name: string, options?: PropertyOptions<T>) => Column;
14
14
  item: (property: string, options?: PropertyOptions | undefined) => import("../utils").Property<unknown>;
15
15
  ignore: (property?: string) => import("../utils").Mapping;
16
16
  skipIn: (property: string) => import("../utils").Mapping;
@@ -25,7 +25,7 @@ export declare class Table extends Mapper {
25
25
  constructor(options?: MapOptions);
26
26
  get db(): Database;
27
27
  get count(): Count;
28
- prop: <T = unknown>(name: string, options?: PropertyOptions<T> | undefined) => Column;
28
+ prop: <T = unknown>(name: string, options?: PropertyOptions<T>) => Column;
29
29
  select: (...columns: Column[]) => Select;
30
30
  insert: (fields: Json) => Insert;
31
31
  update: (fields: Json) => Update;
@@ -5,7 +5,7 @@ export type Constructor<T = unknown> = {
5
5
  };
6
6
  export type Construct<Out, In = any> = Get<Out, In> | Constructor<Out>;
7
7
  export declare const isConstructor: <T>(c?: unknown) => c is Constructor<T>;
8
- export declare const ofConstruct: <T>(c: Construct<T, any>, ...args: unknown[]) => T;
8
+ export declare const ofConstruct: <T>(c: Construct<T>, ...args: unknown[]) => T;
9
9
  export declare const toName: (subject?: unknown, postfix?: string) => string;
10
10
  export declare const on: <T, R>(t: T, f: (t: T) => R) => R extends Promise<unknown> ? Promise<T> : T;
11
11
  export declare const use: <T, Out>(t: T, f: (t: T) => Out) => Out;
@@ -2,6 +2,6 @@ import { Func } from './Func';
2
2
  export type Get<T = any, Args = any> = Func<T, Args> | T;
3
3
  export type Predicate<Args = unknown> = Get<boolean, Args>;
4
4
  export declare const ofGet: <T, Args = any>(g: Get<T, Args>, ...args: Args[]) => T;
5
- export declare const ifGet: <T>(pred: Get, valid: Get<T, any>, invalid: Get<T, any>) => T;
5
+ export declare const ifGet: <T>(pred: Get, valid: Get<T>, invalid: Get<T>) => T;
6
6
  export type GetProperty<T, Prop> = keyof T | Func<Prop, T>;
7
7
  export declare const ofProperty: <T, Prop>(t: T, p: GetProperty<T, Prop>) => Prop;
@@ -1,5 +1,5 @@
1
1
  import { Constructor } from './Constructor';
2
- export declare const isDefined: <T = unknown>(o?: T | undefined) => o is NonNullable<T>;
2
+ export declare const isDefined: <T = unknown>(o?: T) => o is NonNullable<T>;
3
3
  export declare const isUndefined: (v?: unknown) => v is never;
4
4
  export declare const isEmpty: (o?: unknown) => boolean;
5
5
  export declare const isNotEmpty: <T = unknown>(o?: unknown) => o is NonNullable<T>;
@@ -5,7 +5,7 @@ export declare class Parser<T, V> {
5
5
  protected valid: boolean;
6
6
  if: {
7
7
  equals: (pred?: Predicate<T>) => this;
8
- empty: <U>(pred?: Get<U, T> | undefined) => this;
8
+ empty: <U>(pred?: Get<U, T>) => this;
9
9
  defined: <U_1>(pred?: Get<U_1, T> | undefined) => this;
10
10
  valid: <U_2>(pred?: Get<U_2, T> | undefined) => this;
11
11
  in: (...items: T[]) => this;
@@ -8,8 +8,8 @@ export type Segment = Text & {
8
8
  query?: (value: unknown) => string;
9
9
  };
10
10
  export declare const toSegment: (key?: Text, { segment, query, }?: {
11
- segment?: string | undefined;
12
- query?: ((value: unknown) => string) | undefined;
11
+ segment?: string;
12
+ query?: (value: unknown) => string;
13
13
  }) => Segment;
14
14
  export declare const uri: {
15
15
  host: (key?: string) => Segment;
@@ -4,7 +4,7 @@ type Aw<A> = Awaited<A>;
4
4
  export declare const resolve: <S = unknown>(subject: S | PromiseLike<S>) => Promise<S>;
5
5
  export declare const reject: <S = never>(e: ErrorOrigin) => Promise<S>;
6
6
  export declare const tuple: {
7
- 2: <F, S>(first: Pro<F>, second: Pro<S>) => Promise<[Awaited<F>, Awaited<S>]>;
7
+ 2: <F, S>(first: Pro<F>, second: Pro<S>) => Promise<[Aw<F>, Aw<S>]>;
8
8
  3: <F_1, S_1, T>(first: Pro<F_1>, second: Pro<S_1>, third: Pro<T>) => Promise<[Awaited<F_1>, Awaited<S_1>, Awaited<T>]>;
9
9
  4: <F_2, S_2, T_1, Fo>(first: Pro<F_2>, second: Pro<S_2>, third: Pro<T_1>, forth: Pro<Fo>) => Promise<[Awaited<F_2>, Awaited<S_2>, Awaited<T_1>, Awaited<Fo>]>;
10
10
  5: <F_3, S_3, T_2, Fo_1, Fi>(first: Pro<F_3>, second: Pro<S_3>, third: Pro<T_2>, forth: Pro<Fo_1>, fifth: Pro<Fi>) => Promise<[Awaited<F_3>, Awaited<S_3>, Awaited<T_2>, Awaited<Fo_1>, Awaited<Fi>]>;
@@ -12,8 +12,8 @@ export declare const tuple: {
12
12
  spread: <F_5, S_5>(first: Pro<F_5>, ...second: Pro<S_5>[]) => Promise<[Awaited<F_5>, S_5[]]>;
13
13
  list: <T_3>(list: Pro<T_3>[]) => Promise<List<Awaited<T_3>>>;
14
14
  };
15
- export declare const tuple2: <F, S>(first: Pro<F>, second: Pro<S>) => Promise<[Awaited<F>, Awaited<S>]>;
16
- export declare const tuple3: <F, S, T>(first: Pro<F>, second: Pro<S>, third: Pro<T>) => Promise<[Awaited<F>, Awaited<S>, Awaited<T>]>;
17
- export declare const tuple4: <F, S, T, Fo>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>) => Promise<[Awaited<F>, Awaited<S>, Awaited<T>, Awaited<Fo>]>;
18
- export declare const tuple5: <F, S, T, Fo, Fi>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>, fifth: Pro<Fi>) => Promise<[Awaited<F>, Awaited<S>, Awaited<T>, Awaited<Fo>, Awaited<Fi>]>;
15
+ export declare const tuple2: <F, S>(first: Pro<F>, second: Pro<S>) => Promise<[Aw<F>, Aw<S>]>;
16
+ export declare const tuple3: <F, S, T>(first: Pro<F>, second: Pro<S>, third: Pro<T>) => Promise<[Aw<F>, Aw<S>, Aw<T>]>;
17
+ export declare const tuple4: <F, S, T, Fo>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>) => Promise<[Aw<F>, Aw<S>, Aw<T>, Aw<Fo>]>;
18
+ export declare const tuple5: <F, S, T, Fo, Fi>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>, fifth: Pro<Fi>) => Promise<[Aw<F>, Aw<S>, Aw<T>, Aw<Fo>, Aw<Fi>]>;
19
19
  export {};
@@ -2,6 +2,6 @@ import { Construct } from '../types';
2
2
  export declare class State {
3
3
  protected readonly state: any;
4
4
  constructor(state?: any);
5
- protected get: <T>(key: string, alt?: Construct<T> | undefined) => T;
5
+ protected get: <T>(key: string, alt?: Construct<T>) => T;
6
6
  protected set: <T>(key: string, value: Construct<T>) => T;
7
7
  }
@@ -21,7 +21,7 @@ export declare class View<V = Json> {
21
21
  private reduce;
22
22
  }
23
23
  export declare const isSimpleView: (a: unknown) => a is View<Json>;
24
- export declare const view: <V = Json>(views: Partial<Record<keyof DontInfer<V>, ViewType>>) => View<V>;
24
+ export declare const view: <V = Json>(views: ViewRecord<DontInfer<V>>) => View<V>;
25
25
  export declare const views: {
26
26
  ignore: symbol;
27
27
  keep: symbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisisagile/easy",
3
- "version": "15.28.0",
3
+ "version": "15.28.2",
4
4
  "description": "Straightforward library for building domain-driven microservice architectures",
5
5
  "author": "Sander Hoogendoorn",
6
6
  "license": "MIT",
@@ -34,11 +34,11 @@
34
34
  "access": "public"
35
35
  },
36
36
  "devDependencies": {
37
- "@thisisagile/easy-test": "15.28.0",
37
+ "@thisisagile/easy-test": "15.28.2",
38
38
  "@types/form-urlencoded": "^4.4.0",
39
39
  "@types/jsonwebtoken": "^9.0.6",
40
40
  "@types/luxon": "3.4.2",
41
- "@types/validator": "^13.11.9"
41
+ "@types/validator": "^13.11.10"
42
42
  },
43
43
  "dependencies": {
44
44
  "@types/uuid": "^9.0.8",