pareto-core 0.1.241 → 0.1.243
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/implementation/__internal/query/query.d.ts +1 -2
- package/dist/implementation/__internal/query/query.js +2 -2
- package/dist/implementation/resource.d.ts +2 -0
- package/dist/implementation/resource.js +3 -0
- package/dist/interface/resource.d.ts +6 -0
- package/dist/interface/resource.js +3 -0
- package/package.json +3 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import * as p_i from "../../../interface/query.js";
|
|
2
2
|
import * as p_di from "../../../interface/data.js";
|
|
3
|
-
export
|
|
4
|
-
export default function __query<Result extends p_di.Value, Error extends p_di.Value, Dynamic_Parameters extends p_di.Value>(handler: Query_Callback<Result, Error, Dynamic_Parameters>): p_i.Query<Result, Error, Dynamic_Parameters>;
|
|
3
|
+
export default function query<Result extends p_di.Value, Error extends p_di.Value, Dynamic_Parameters extends p_di.Value>(handler: ($: Dynamic_Parameters) => p_i.Query_Result<Result, Error>): p_i.Query<Result, Error, Dynamic_Parameters>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as p_i from "../../../interface/query.js";
|
|
2
2
|
import * as p_di from "../../../interface/data.js";
|
|
3
3
|
import query_result from "./query_result.js";
|
|
4
|
-
export default function
|
|
4
|
+
export default function query(handler) {
|
|
5
5
|
return (parameters, error_transformer) => query_result((on_success, on_error) => {
|
|
6
6
|
handler(parameters).__extract_data(on_success, (e) => {
|
|
7
7
|
on_error(error_transformer(e));
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvaW1wbGVtZW50YXRpb24vX19pbnRlcm5hbC9xdWVyeS9xdWVyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssR0FBRyxNQUFNLDZCQUE2QixDQUFBO0FBQ2xELE9BQU8sS0FBSyxJQUFJLE1BQU0sNEJBQTRCLENBQUE7QUFFbEQsT0FBTyxZQUFZLE1BQU0sbUJBQW1CLENBQUE7QUFFNUMsTUFBTSxDQUFDLE9BQU8sVUFBVSxLQUFLLENBS3pCLE9BRW9DO0lBTXBDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsaUJBQWlCLEVBQUUsRUFBRSxDQUFDLFlBQVksQ0FBQyxDQUFDLFVBQVUsRUFBRSxRQUFRLEVBQUUsRUFBRTtRQUM1RSxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsY0FBYyxDQUM5QixVQUFVLEVBQ1YsQ0FBQyxDQUFDLEVBQUUsRUFBRTtZQUNGLFFBQVEsQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQ2xDLENBQUMsQ0FDSixDQUFBO0lBQ0wsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDIn0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from "./__internal/query/query.js";
|
|
2
|
+
export * from "./__internal/command/command.js";
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW1wbGVtZW50YXRpb24vcmVzb3VyY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw2QkFBNkIsQ0FBQTtBQUMzQyxjQUFjLGlDQUFpQyxDQUFBIn0=
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Command } from './command.js';
|
|
2
|
+
import { type Query } from './query.js';
|
|
3
|
+
export type Resource<Commands extends Record<string, Command<any, any>>, Queries extends Record<string, Query<any, any, any>>> = {
|
|
4
|
+
'commands': Commands;
|
|
5
|
+
'queries': Queries;
|
|
6
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {} from './command.js';
|
|
2
|
+
import {} from './query.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW50ZXJmYWNlL3Jlc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBZ0IsTUFBTSxjQUFjLENBQUE7QUFDM0MsT0FBTyxFQUFjLE1BQU0sWUFBWSxDQUFBIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pareto-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.243",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Corno",
|
|
6
6
|
"description": "the core language constructs for the Pareto programming language (in TypeScript)",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"default": "./dist/implementation/*.js"
|
|
28
28
|
},
|
|
29
29
|
"./interface/*": {
|
|
30
|
-
"types": "./dist/interface/*.d.ts"
|
|
30
|
+
"types": "./dist/interface/*.d.ts",
|
|
31
|
+
"default": "./dist/interface/*.js"
|
|
31
32
|
},
|
|
32
33
|
"./temp/*": {
|
|
33
34
|
"types": "./dist/temp/*.d.ts",
|