@aeriajs/core 0.0.199 → 0.0.201
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.
|
@@ -47,7 +47,11 @@ const preferredRemove = async (targetId, reference, parentContext) => {
|
|
|
47
47
|
const { result: removeAll } = await (0, assets_js_1.getFunction)(reference.referencedCollection, 'removeAll');
|
|
48
48
|
if (removeAll) {
|
|
49
49
|
return removeAll({
|
|
50
|
-
filters:
|
|
50
|
+
filters: {
|
|
51
|
+
_id: {
|
|
52
|
+
$in: nonNullable,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
51
55
|
}, context);
|
|
52
56
|
}
|
|
53
57
|
return coll.deleteMany({
|
|
@@ -44,7 +44,11 @@ export const preferredRemove = async (targetId, reference, parentContext) => {
|
|
|
44
44
|
const { result: removeAll } = await getFunction(reference.referencedCollection, "removeAll");
|
|
45
45
|
if (removeAll) {
|
|
46
46
|
return removeAll({
|
|
47
|
-
filters:
|
|
47
|
+
filters: {
|
|
48
|
+
_id: {
|
|
49
|
+
$in: nonNullable
|
|
50
|
+
}
|
|
51
|
+
}
|
|
48
52
|
}, context);
|
|
49
53
|
}
|
|
50
54
|
return coll.deleteMany({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Context, RemoveAllPayload } from '@aeriajs/types';
|
|
1
|
+
import type { Context, SchemaWithId, RemoveAllPayload } from '@aeriajs/types';
|
|
2
2
|
import { Result, ACError, HTTPStatus } from '@aeriajs/types';
|
|
3
3
|
export type RemoveAllOptions = {
|
|
4
4
|
bypassSecurity?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const removeAll: <TContext extends Context>(payload: RemoveAllPayload
|
|
6
|
+
export declare const removeAll: <TContext extends Context>(payload: RemoveAllPayload<SchemaWithId<TContext["description"]>>, context: TContext, options?: RemoveAllOptions) => Promise<{
|
|
7
7
|
readonly _tag: "Result";
|
|
8
8
|
readonly error: undefined;
|
|
9
9
|
readonly result: import("mongodb").DeleteResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.201",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"aeriaMain": "tests/fixtures/aeriaMain.js",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"mongodb-memory-server": "^9.2.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@aeriajs/builtins": "^0.0.
|
|
46
|
-
"@aeriajs/common": "^0.0.
|
|
47
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
48
|
-
"@aeriajs/http": "^0.0.
|
|
49
|
-
"@aeriajs/security": "^0.0.
|
|
50
|
-
"@aeriajs/types": "^0.0.
|
|
51
|
-
"@aeriajs/validation": "^0.0.
|
|
45
|
+
"@aeriajs/builtins": "^0.0.201",
|
|
46
|
+
"@aeriajs/common": "^0.0.122",
|
|
47
|
+
"@aeriajs/entrypoint": "^0.0.125",
|
|
48
|
+
"@aeriajs/http": "^0.0.141",
|
|
49
|
+
"@aeriajs/security": "^0.0.201",
|
|
50
|
+
"@aeriajs/types": "^0.0.104",
|
|
51
|
+
"@aeriajs/validation": "^0.0.130"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"mongodb": "^6.5.0",
|