pareto-core 0.1.100 → 0.1.102
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as _pi from "../../interface";
|
|
2
2
|
import { Command_Block } from "./Command_Block";
|
|
3
|
-
export default function command_procedure<Error, Parameters, Command_Resources, Query_Resources>(execution_handler: ($p: Parameters, $cr: Command_Resources, $qr: Query_Resources) => Command_Block<Error>): _pi.Command_Procedure<_pi.Command<Error, Parameters>, Command_Resources, Query_Resources>;
|
|
3
|
+
export default function command_procedure<Error, Parameters, Command_Resources, Query_Resources, Context_Parameters>(execution_handler: ($p: Parameters, $cr: Command_Resources, $qr: Query_Resources, $x: Context_Parameters) => Command_Block<Error>): _pi.Command_Procedure<_pi.Command<Error, Parameters>, Command_Resources, Query_Resources, Context_Parameters>;
|
|
@@ -7,12 +7,12 @@ exports.default = command_procedure;
|
|
|
7
7
|
const command_promise_1 = __importDefault(require("./command_promise"));
|
|
8
8
|
const handle_command_block_1 = __importDefault(require("./handle_command_block"));
|
|
9
9
|
function command_procedure(execution_handler) {
|
|
10
|
-
return ($cr, $qr) => {
|
|
10
|
+
return ($cr, $qr, $x) => {
|
|
11
11
|
return {
|
|
12
12
|
'execute': (parameters, error_transformer) => {
|
|
13
13
|
return (0, command_promise_1.default)({
|
|
14
14
|
'execute': (on_success, on_error) => {
|
|
15
|
-
(0, handle_command_block_1.default)(execution_handler(parameters, $cr, $qr)).__start(on_success, ($) => {
|
|
15
|
+
(0, handle_command_block_1.default)(execution_handler(parameters, $cr, $qr, $x)).__start(on_success, ($) => {
|
|
16
16
|
on_error(error_transformer($));
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -21,4 +21,4 @@ function command_procedure(execution_handler) {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZF9wcm9jZWR1cmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvX19pbnRlcm5hbHMvYXN5bmMvY29tbWFuZF9wcm9jZWR1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFPQSxvQ0FnQ0M7QUFuQ0Qsd0VBQWlEO0FBQ2pELGtGQUEyRDtBQUUzRCxTQUF3QixpQkFBaUIsQ0FDckMsaUJBS3lCO0lBT3pCLE9BQU8sQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEVBQUUsRUFBRSxFQUFFO1FBQ3BCLE9BQU87WUFDSCxTQUFTLEVBQUUsQ0FBQyxVQUFVLEVBQUUsaUJBQWlCLEVBQUUsRUFBRTtnQkFDekMsT0FBTyxJQUFBLHlCQUFpQixFQUFDO29CQUNyQixTQUFTLEVBQUUsQ0FBQyxVQUFVLEVBQUUsUUFBUSxFQUFFLEVBQUU7d0JBRWhDLElBQUEsOEJBQXNCLEVBQUMsaUJBQWlCLENBQUMsVUFBVSxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQ3ZFLFVBQVUsRUFDVixDQUFDLENBQUMsRUFBRSxFQUFFOzRCQUNGLFFBQVEsQ0FDSixpQkFBaUIsQ0FBQyxDQUFDLENBQUMsQ0FDdkIsQ0FBQTt3QkFDTCxDQUFDLENBQ0osQ0FBQTtvQkFDTCxDQUFDO2lCQUNKLENBQUMsQ0FBQTtZQUNOLENBQUM7U0FDSixDQUFBO0lBQ0wsQ0FBQyxDQUFBO0FBQ0wsQ0FBQyJ9
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Transformer } from "./Transformer";
|
|
2
|
-
export type Command_Procedure<Command, Command_Resources, Query_Resources> = ($c: Command_Resources, $q: Query_Resources) => Command;
|
|
3
|
-
export type Command_Creator<Command, Parameters> = ($x: Parameters) => Command;
|
|
2
|
+
export type Command_Procedure<Command, Command_Resources, Query_Resources, Context_Parameters> = ($c: Command_Resources, $q: Query_Resources, $x: Context_Parameters) => Command;
|
|
4
3
|
export type Command<Error, Parameter> = {
|
|
5
4
|
'execute': <Target_Error>(parameters: Parameter, error_transformer: Transformer<Error, Target_Error>) => Command_Promise<Target_Error>;
|
|
6
5
|
};
|