@aeriajs/core 0.0.166 → 0.0.167
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.
|
@@ -192,6 +192,12 @@ const moveFiles = async (value, ctx) => {
|
|
|
192
192
|
if (!('$ref' in ctx.property) || ctx.property.$ref !== 'file') {
|
|
193
193
|
return value;
|
|
194
194
|
}
|
|
195
|
+
if (!value) {
|
|
196
|
+
if (ctx.root._id && !ctx.isArray) {
|
|
197
|
+
await disposeOldFiles(ctx);
|
|
198
|
+
}
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
195
201
|
if (!isValidTempFile(value)) {
|
|
196
202
|
return types_1.Result.error(types_1.TraverseError.InvalidTempfile);
|
|
197
203
|
}
|
|
@@ -201,12 +207,6 @@ const moveFiles = async (value, ctx) => {
|
|
|
201
207
|
if (!ctx.options.context) {
|
|
202
208
|
throw new Error();
|
|
203
209
|
}
|
|
204
|
-
if (!value) {
|
|
205
|
-
if (ctx.root._id && !ctx.isArray) {
|
|
206
|
-
await disposeOldFiles(ctx);
|
|
207
|
-
}
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
210
|
const tempFile = await ctx.options.context.collections.tempFile.model.findOne({
|
|
211
211
|
_id: new mongodb_1.ObjectId(value.tempId),
|
|
212
212
|
});
|
|
@@ -157,6 +157,12 @@ const moveFiles = async (value, ctx) => {
|
|
|
157
157
|
if (!("$ref" in ctx.property) || ctx.property.$ref !== "file") {
|
|
158
158
|
return value;
|
|
159
159
|
}
|
|
160
|
+
if (!value) {
|
|
161
|
+
if (ctx.root._id && !ctx.isArray) {
|
|
162
|
+
await disposeOldFiles(ctx);
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
160
166
|
if (!isValidTempFile(value)) {
|
|
161
167
|
return Result.error(TraverseError.InvalidTempfile);
|
|
162
168
|
}
|
|
@@ -166,12 +172,6 @@ const moveFiles = async (value, ctx) => {
|
|
|
166
172
|
if (!ctx.options.context) {
|
|
167
173
|
throw new Error();
|
|
168
174
|
}
|
|
169
|
-
if (!value) {
|
|
170
|
-
if (ctx.root._id && !ctx.isArray) {
|
|
171
|
-
await disposeOldFiles(ctx);
|
|
172
|
-
}
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
175
|
const tempFile = await ctx.options.context.collections.tempFile.model.findOne({
|
|
176
176
|
_id: new ObjectId(value.tempId)
|
|
177
177
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.167",
|
|
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.
|
|
45
|
+
"@aeriajs/builtins": "^0.0.167",
|
|
46
|
+
"@aeriajs/common": "^0.0.103",
|
|
47
|
+
"@aeriajs/entrypoint": "^0.0.105",
|
|
48
|
+
"@aeriajs/http": "^0.0.116",
|
|
49
|
+
"@aeriajs/security": "^0.0.167",
|
|
50
50
|
"@aeriajs/types": "^0.0.87",
|
|
51
|
-
"@aeriajs/validation": "^0.0.
|
|
51
|
+
"@aeriajs/validation": "^0.0.106"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"mongodb": "^6.5.0",
|