exupery-core-types 0.3.31 → 0.3.32
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/Command.d.ts +3 -5
- package/dist/Data_Preparation_Result.d.ts +3 -0
- package/dist/Data_Preparation_Result.js +89 -0
- package/dist/Data_Preparer.d.ts +3 -0
- package/dist/Query.d.ts +2 -25
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -3
- package/package.json +1 -1
- package/dist/Process_Result.d.ts +0 -10
- package/dist/Processor.d.ts +0 -2
- package/dist/Processor.js +0 -2
- package/dist/Refiner.d.ts +0 -14
- package/dist/Refiner.js +0 -2
- /package/dist/{Process_Result.js → Data_Preparer.js} +0 -0
package/dist/Command.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Refinement_Result } from "./Refiner";
|
|
1
|
+
import { Data_Preparation_Result } from "./Data_Preparation_Result";
|
|
3
2
|
export type Command_Procedure<Parameters, Error, Resources> = ($r: Resources) => Command<Parameters, Error>;
|
|
4
3
|
export type Command<Parameters, Error> = {
|
|
5
4
|
'execute': {
|
|
6
|
-
'direct': <
|
|
7
|
-
'
|
|
8
|
-
'refiner': <New_Error>(transform_error: (error: Error) => New_Error, refiner: Refinement_Result<Parameters, New_Error>) => Command_Promise<New_Error>;
|
|
5
|
+
'direct': <Target_Error>(transform_error: (error: Error) => Target_Error, parameters: Parameters) => Command_Promise<Target_Error>;
|
|
6
|
+
'prepare': <Target_Error>(transform_error: (error: Error) => Target_Error, query: Data_Preparation_Result<Parameters, Target_Error>) => Command_Promise<Target_Error>;
|
|
9
7
|
};
|
|
10
8
|
};
|
|
11
9
|
export type Command_Promise<Error> = {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// query_with_result<New_Result>(
|
|
4
|
+
// query: Query<Result, New_Result, Error>
|
|
5
|
+
// ): Query_Promise<New_Result, Error>
|
|
6
|
+
// rework_error_with_new_query<Target_Error, Rework_Query_Error>(
|
|
7
|
+
// query: Query<Error, Target_Error, Rework_Query_Error>,
|
|
8
|
+
// transform_rework_error: (error: Rework_Query_Error) => Target_Error,
|
|
9
|
+
// ): Query_Promise<Result, Target_Error>
|
|
10
|
+
// query<New_Result, Target_Error>(queries: {
|
|
11
|
+
// 'result': Query<Result, New_Result, Target_Error>,
|
|
12
|
+
// 'error': Query<Error, New_Result, Target_Error>,
|
|
13
|
+
// }): Query_Promise<New_Result, Target_Error>
|
|
14
|
+
// process_result<New_Result>(
|
|
15
|
+
// processor: Processor<Result, New_Result, Error>
|
|
16
|
+
// ): Query_Promise<New_Result, Error>
|
|
17
|
+
// process_error<Target_Error>(
|
|
18
|
+
// processor: Processor<Error, Result, Target_Error>
|
|
19
|
+
// ): Query_Promise<Result, Target_Error>
|
|
20
|
+
// process<New_Result, Target_Error>($: {
|
|
21
|
+
// 'result': Processor<Result, New_Result, Target_Error>,
|
|
22
|
+
// 'error': Processor<Error, New_Result, Target_Error>,
|
|
23
|
+
// }): Query_Promise<New_Result, Target_Error>
|
|
24
|
+
// transform_result<New_Result>(
|
|
25
|
+
// transformer: (Transformer_Without_Parameters<Result, New_Result>)
|
|
26
|
+
// ): Query_Promise<New_Result, Error>
|
|
27
|
+
// transform_error<Target_Error>(
|
|
28
|
+
// transformer: Transformer_Without_Parameters<Error, Target_Error>
|
|
29
|
+
// ): Query_Promise<Result, Target_Error>
|
|
30
|
+
// transform<New_Result, Target_Error>($: {
|
|
31
|
+
// 'result': Transformer_Without_Parameters<Result, New_Result>,
|
|
32
|
+
// 'error': Transformer_Without_Parameters<Error, Target_Error>,
|
|
33
|
+
// }): Query_Promise<New_Result, Target_Error>
|
|
34
|
+
// __start(
|
|
35
|
+
// on_success: ($: Result) => void,
|
|
36
|
+
// on_error: ($: Error) => void
|
|
37
|
+
// ): void
|
|
38
|
+
// export interface Process_Result<Output, Error> {
|
|
39
|
+
// 'transform': <New_Output>(
|
|
40
|
+
// transformer: Transformer_Without_Parameters<Output, New_Output>
|
|
41
|
+
// ) => Process_Result<New_Output, Error>
|
|
42
|
+
// 'transform error': <Target_Error>(
|
|
43
|
+
// transformer: Transformer_Without_Parameters<Error, Target_Error>
|
|
44
|
+
// ) => Process_Result<Output, Target_Error>
|
|
45
|
+
// 'transform with parameters': <New_Output, Parameters>(
|
|
46
|
+
// transformer: Transformer_With_Parameters<Output, Parameters, New_Output>,
|
|
47
|
+
// parameters: Parameters
|
|
48
|
+
// ) => Process_Result<New_Output, Error>
|
|
49
|
+
// 'refine': <New_Output, Refine_Error>(
|
|
50
|
+
// refiner: Refiner_Without_Parameters<Output, New_Output, Refine_Error>,
|
|
51
|
+
// map_error: ($: Refine_Error) => Error
|
|
52
|
+
// ) => Process_Result<New_Output, Error>
|
|
53
|
+
// 'refine with parameters': <New_Output, Parameters, Refine_Error>(
|
|
54
|
+
// refiner: Refiner_With_Parameters<Output, Parameters, New_Output, Refine_Error>,
|
|
55
|
+
// parameters: Parameters,
|
|
56
|
+
// map_error: ($: Refine_Error) => Error
|
|
57
|
+
// ) => Process_Result<New_Output, Error>
|
|
58
|
+
// __extract_data: (
|
|
59
|
+
// success: ($: Output) => void,
|
|
60
|
+
// error: ($: Error) => void
|
|
61
|
+
// ) => void
|
|
62
|
+
// }
|
|
63
|
+
// export interface Refinement_Result<T, E> {
|
|
64
|
+
// /**
|
|
65
|
+
// * @param set what to do when the value was set, returns the new type
|
|
66
|
+
// * @param not_set what to do when the value was not set, returns the new type
|
|
67
|
+
// */
|
|
68
|
+
// process(
|
|
69
|
+
// success: ($: T) => void,
|
|
70
|
+
// error: ($: E) => void,
|
|
71
|
+
// ): void
|
|
72
|
+
// map<NT, NE>(
|
|
73
|
+
// handle_value: ($: T) => NT,
|
|
74
|
+
// handle_error: ($: E) => NE
|
|
75
|
+
// ): Refinement_Result<NT, NE>
|
|
76
|
+
// map_result<NT>(
|
|
77
|
+
// handle_value: ($: T) => NT,
|
|
78
|
+
// ): Refinement_Result<NT, E>
|
|
79
|
+
// transform<NT>(
|
|
80
|
+
// handle_value: ($: T) => NT,
|
|
81
|
+
// handle_error: ($: E) => NT
|
|
82
|
+
// ): NT
|
|
83
|
+
// transform_error<NE>(
|
|
84
|
+
// handle_error: ($: E) => NE
|
|
85
|
+
// ): Refinement_Result<T, NE>
|
|
86
|
+
// with_result<NT>(
|
|
87
|
+
// handle_value: ($: T) => Refinement_Result<NT, E>,
|
|
88
|
+
// ): Refinement_Result<NT, E>
|
|
89
|
+
// }
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Data_Preparation_Result } from "./Data_Preparation_Result";
|
|
2
|
+
export type Data_Preparer<Input, Output, Error> = ($: Input) => Data_Preparation_Result<Output, Error>;
|
|
3
|
+
export type Data_Preparer_With_Parameters<Input, Parameters, Output, Error> = ($: Input, $p: Parameters) => Data_Preparation_Result<Output, Error>;
|
package/dist/Query.d.ts
CHANGED
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type Query_Procedure<Parameters, Result, Error, Resources> = ($r: Resources) => Query<Parameters, Result, Error>;
|
|
4
|
-
export type Query<Parameters, Result, Error> = ($: Parameters) => Query_Promise<Result, Error>;
|
|
5
|
-
export type Query_Promise<Result, Error> = {
|
|
6
|
-
query_with_result<New_Result>(query: Query<Result, New_Result, Error>): Query_Promise<New_Result, Error>;
|
|
7
|
-
rework_error_with_new_query<New_Error, Rework_Query_Error>(query: Query<Error, New_Error, Rework_Query_Error>, transform_rework_error: (error: Rework_Query_Error) => New_Error): Query_Promise<Result, New_Error>;
|
|
8
|
-
query<New_Result, New_Error>(queries: {
|
|
9
|
-
'result': Query<Result, New_Result, New_Error>;
|
|
10
|
-
'error': Query<Error, New_Result, New_Error>;
|
|
11
|
-
}): Query_Promise<New_Result, New_Error>;
|
|
12
|
-
process_result<New_Result>(processor: Processor<Result, New_Result, Error>): Query_Promise<New_Result, Error>;
|
|
13
|
-
process_error<New_Error>(processor: Processor<Error, Result, New_Error>): Query_Promise<Result, New_Error>;
|
|
14
|
-
process<New_Result, New_Error>($: {
|
|
15
|
-
'result': Processor<Result, New_Result, New_Error>;
|
|
16
|
-
'error': Processor<Error, New_Result, New_Error>;
|
|
17
|
-
}): Query_Promise<New_Result, New_Error>;
|
|
18
|
-
transform_result<New_Result>(transformer: (Transformer_Without_Parameters<Result, New_Result>)): Query_Promise<New_Result, Error>;
|
|
19
|
-
transform_error<New_Error>(transformer: Transformer_Without_Parameters<Error, New_Error>): Query_Promise<Result, New_Error>;
|
|
20
|
-
transform<New_Result, New_Error>($: {
|
|
21
|
-
'result': Transformer_Without_Parameters<Result, New_Result>;
|
|
22
|
-
'error': Transformer_Without_Parameters<Error, New_Error>;
|
|
23
|
-
}): Query_Promise<New_Result, New_Error>;
|
|
24
|
-
__start(on_success: ($: Result) => void, on_error: ($: Error) => void): void;
|
|
25
|
-
};
|
|
1
|
+
import { Data_Preparer } from "./Data_Preparer";
|
|
2
|
+
export type Query_Procedure<Parameters, Result, Error, Resources> = ($r: Resources) => Data_Preparer<Parameters, Result, Error>;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ export * from "./Dictionary";
|
|
|
4
4
|
export * from "./Lookup";
|
|
5
5
|
export * from "./Optional_Value";
|
|
6
6
|
export * from "./Command";
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./Data_Preparer";
|
|
8
|
+
export * from "./Data_Preparation_Result";
|
|
9
9
|
export * from "./Query";
|
|
10
|
-
export * from "./Refiner";
|
|
11
10
|
export * from "./Transformer";
|
package/dist/index.js
CHANGED
|
@@ -20,8 +20,7 @@ __exportStar(require("./Dictionary"), exports);
|
|
|
20
20
|
__exportStar(require("./Lookup"), exports);
|
|
21
21
|
__exportStar(require("./Optional_Value"), exports);
|
|
22
22
|
__exportStar(require("./Command"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./Data_Preparer"), exports);
|
|
24
|
+
__exportStar(require("./Data_Preparation_Result"), exports);
|
|
25
25
|
__exportStar(require("./Query"), exports);
|
|
26
|
-
__exportStar(require("./Refiner"), exports);
|
|
27
26
|
__exportStar(require("./Transformer"), exports);
|
package/package.json
CHANGED
package/dist/Process_Result.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Refiner_With_Parameters, Refiner_Without_Parameters } from "./Refiner";
|
|
2
|
-
import { Transformer_With_Parameters, Transformer_Without_Parameters } from "./Transformer";
|
|
3
|
-
export interface Process_Result<Output, Error> {
|
|
4
|
-
'transform': <New_Output>(transformer: Transformer_Without_Parameters<Output, New_Output>) => Process_Result<New_Output, Error>;
|
|
5
|
-
'transform error': <New_Error>(transformer: Transformer_Without_Parameters<Error, New_Error>) => Process_Result<Output, New_Error>;
|
|
6
|
-
'transform with parameters': <New_Output, Parameters>(transformer: Transformer_With_Parameters<Output, Parameters, New_Output>, parameters: Parameters) => Process_Result<New_Output, Error>;
|
|
7
|
-
'refine': <New_Output, Refine_Error>(refiner: Refiner_Without_Parameters<Output, New_Output, Refine_Error>, map_error: ($: Refine_Error) => Error) => Process_Result<New_Output, Error>;
|
|
8
|
-
'refine with parameters': <New_Output, Parameters, Refine_Error>(refiner: Refiner_With_Parameters<Output, Parameters, New_Output, Refine_Error>, parameters: Parameters, map_error: ($: Refine_Error) => Error) => Process_Result<New_Output, Error>;
|
|
9
|
-
__extract_data: (success: ($: Output) => void, error: ($: Error) => void) => void;
|
|
10
|
-
}
|
package/dist/Processor.d.ts
DELETED
package/dist/Processor.js
DELETED
package/dist/Refiner.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Refinement_Result<T, E> {
|
|
2
|
-
/**
|
|
3
|
-
* @param set what to do when the value was set, returns the new type
|
|
4
|
-
* @param not_set what to do when the value was not set, returns the new type
|
|
5
|
-
*/
|
|
6
|
-
process(success: ($: T) => void, error: ($: E) => void): void;
|
|
7
|
-
map<NT, NE>(handle_value: ($: T) => NT, handle_error: ($: E) => NE): Refinement_Result<NT, NE>;
|
|
8
|
-
map_result<NT>(handle_value: ($: T) => NT): Refinement_Result<NT, E>;
|
|
9
|
-
transform<NT>(handle_value: ($: T) => NT, handle_error: ($: E) => NT): NT;
|
|
10
|
-
transform_error<NE>(handle_error: ($: E) => NE): Refinement_Result<T, NE>;
|
|
11
|
-
with_result<NT>(handle_value: ($: T) => Refinement_Result<NT, E>): Refinement_Result<NT, E>;
|
|
12
|
-
}
|
|
13
|
-
export type Refiner_With_Parameters<In, Parameters, Out, Error> = ($: In, $p: Parameters) => Refinement_Result<Out, Error>;
|
|
14
|
-
export type Refiner_Without_Parameters<In, Out, Error> = ($: In) => Refinement_Result<Out, Error>;
|
package/dist/Refiner.js
DELETED
|
File without changes
|