@aeriajs/core 0.0.121 → 0.0.123
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/collection/preload.d.ts +3 -2
- package/dist/functions/builtin/insert.js +2 -2
- package/dist/functions/builtin/insert.mjs +3 -3
- package/dist/presets/crud.d.ts +6 -0
- package/dist/presets/crud.js +6 -0
- package/dist/presets/crud.mjs +6 -0
- package/dist/presets/view.d.ts +3 -2
- package/dist/presets/view.js +3 -2
- package/dist/presets/view.mjs +4 -3
- package/package.json +3 -3
|
@@ -57,10 +57,11 @@ export declare const applyPreset: (entry: Partial<Description> | Description["pr
|
|
|
57
57
|
};
|
|
58
58
|
} | {
|
|
59
59
|
readonly individualActions: {
|
|
60
|
-
readonly '
|
|
60
|
+
readonly 'route:/dashboard/crud/:id': {
|
|
61
61
|
readonly label: "action.view";
|
|
62
|
-
readonly icon: "
|
|
62
|
+
readonly icon: "eye";
|
|
63
63
|
readonly translate: true;
|
|
64
|
+
readonly setItem: true;
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
});
|
|
@@ -95,11 +95,11 @@ const insert = async (payload, context, options) => {
|
|
|
95
95
|
code: types_1.ACError.ResourceNotFound,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
const result = (0, common_1.throwIfError)(await (0, index_js_1.traverseDocument)(doc, context.description, {
|
|
98
|
+
const result = (0, index_js_1.fill)((0, common_1.throwIfError)(await (0, index_js_1.traverseDocument)(doc, context.description, {
|
|
99
99
|
getters: true,
|
|
100
100
|
fromProperties: true,
|
|
101
101
|
recurseReferences: true,
|
|
102
|
-
}));
|
|
102
|
+
})), context.description);
|
|
103
103
|
return types_1.Result.result(result);
|
|
104
104
|
};
|
|
105
105
|
exports.insert = insert;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Result, HTTPStatus, ACError, ValidationErrorCode } from "@aeriajs/types";
|
|
3
3
|
import { useSecurity } from "@aeriajs/security";
|
|
4
4
|
import { throwIfError, endpointErrorSchema } from "@aeriajs/common";
|
|
5
|
-
import { traverseDocument, normalizeProjection, prepareInsert } from "../../collection/index.mjs";
|
|
5
|
+
import { traverseDocument, normalizeProjection, prepareInsert, fill } from "../../collection/index.mjs";
|
|
6
6
|
export const insertErrorSchema = () => endpointErrorSchema({
|
|
7
7
|
httpStatus: [
|
|
8
8
|
HTTPStatus.UnprocessableContent,
|
|
@@ -82,10 +82,10 @@ export const insert = async (payload, context, options) => {
|
|
|
82
82
|
code: ACError.ResourceNotFound
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
const result = throwIfError(await traverseDocument(doc, context.description, {
|
|
85
|
+
const result = fill(throwIfError(await traverseDocument(doc, context.description, {
|
|
86
86
|
getters: true,
|
|
87
87
|
fromProperties: true,
|
|
88
88
|
recurseReferences: true
|
|
89
|
-
}));
|
|
89
|
+
})), context.description);
|
|
90
90
|
return Result.result(result);
|
|
91
91
|
};
|
package/dist/presets/crud.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ export declare const crud: {
|
|
|
13
13
|
readonly icon: "pencil-simple";
|
|
14
14
|
readonly translate: true;
|
|
15
15
|
};
|
|
16
|
+
readonly 'route:/dashboard/crud/:id': {
|
|
17
|
+
readonly label: "action.view";
|
|
18
|
+
readonly icon: "eye";
|
|
19
|
+
readonly translate: true;
|
|
20
|
+
readonly setItem: true;
|
|
21
|
+
};
|
|
16
22
|
readonly remove: {
|
|
17
23
|
readonly label: "action.remove";
|
|
18
24
|
readonly icon: "trash";
|
package/dist/presets/crud.js
CHANGED
package/dist/presets/crud.mjs
CHANGED
package/dist/presets/view.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export declare const view: {
|
|
2
2
|
readonly individualActions: {
|
|
3
|
-
readonly '
|
|
3
|
+
readonly 'route:/dashboard/crud/:id': {
|
|
4
4
|
readonly label: "action.view";
|
|
5
|
-
readonly icon: "
|
|
5
|
+
readonly icon: "eye";
|
|
6
6
|
readonly translate: true;
|
|
7
|
+
readonly setItem: true;
|
|
7
8
|
};
|
|
8
9
|
};
|
|
9
10
|
};
|
package/dist/presets/view.js
CHANGED
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.view = void 0;
|
|
4
4
|
exports.view = {
|
|
5
5
|
individualActions: {
|
|
6
|
-
'
|
|
6
|
+
'route:/dashboard/crud/:id': {
|
|
7
7
|
label: 'action.view',
|
|
8
|
-
icon: '
|
|
8
|
+
icon: 'eye',
|
|
9
9
|
translate: true,
|
|
10
|
+
setItem: true,
|
|
10
11
|
},
|
|
11
12
|
},
|
|
12
13
|
};
|
package/dist/presets/view.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
export const view = {
|
|
3
3
|
individualActions: {
|
|
4
|
-
"
|
|
4
|
+
"route:/dashboard/crud/:id": {
|
|
5
5
|
label: "action.view",
|
|
6
|
-
icon: "
|
|
7
|
-
translate: true
|
|
6
|
+
icon: "eye",
|
|
7
|
+
translate: true,
|
|
8
|
+
setItem: true
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.123",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"mongodb-memory-server": "^9.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aeriajs/builtins": "^0.0.
|
|
44
|
+
"@aeriajs/builtins": "^0.0.123",
|
|
45
45
|
"@aeriajs/common": "^0.0.77",
|
|
46
46
|
"@aeriajs/entrypoint": "^0.0.79",
|
|
47
47
|
"@aeriajs/http": "^0.0.88",
|
|
48
|
-
"@aeriajs/security": "^0.0.
|
|
48
|
+
"@aeriajs/security": "^0.0.123",
|
|
49
49
|
"@aeriajs/types": "^0.0.67",
|
|
50
50
|
"@aeriajs/validation": "^0.0.80"
|
|
51
51
|
},
|