@muhgholy/next-drive 4.21.0 → 4.23.0
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/{chunk-FWX344WM.js → chunk-CR3QW3QN.js} +6 -3
- package/dist/chunk-CR3QW3QN.js.map +1 -0
- package/dist/{chunk-TBBX3C6E.cjs → chunk-EUAHSB2J.cjs} +6 -3
- package/dist/chunk-EUAHSB2J.cjs.map +1 -0
- package/dist/server/controllers/drive.d.ts +1 -0
- package/dist/server/controllers/drive.d.ts.map +1 -1
- package/dist/server/database/mongoose/schema/drive.d.ts +1 -0
- package/dist/server/database/mongoose/schema/drive.d.ts.map +1 -1
- package/dist/server/express.cjs +11 -11
- package/dist/server/express.js +2 -2
- package/dist/server/hono.cjs +11 -11
- package/dist/server/hono.js +2 -2
- package/dist/server/index.cjs +13 -13
- package/dist/server/index.js +1 -1
- package/dist/types/lib/database/drive.d.ts +1 -0
- package/dist/types/lib/database/drive.d.ts.map +1 -1
- package/dist/types/server/express.d.ts +16 -13
- package/dist/types/server/express.d.ts.map +1 -1
- package/dist/types/server/hono.d.ts +16 -13
- package/dist/types/server/hono.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FWX344WM.js.map +0 -1
- package/dist/chunk-TBBX3C6E.cjs.map +0 -1
|
@@ -49,6 +49,7 @@ var DriveSchema = new mongoose.Schema(
|
|
|
49
49
|
information: { type: informationSchema, required: true },
|
|
50
50
|
status: { type: String, enum: ["READY", "PROCESSING", "UPLOADING", "FAILED"], default: "PROCESSING" },
|
|
51
51
|
trashedAt: { type: Date, default: null },
|
|
52
|
+
meta: { type: mongoose.Schema.Types.Mixed, default: {} },
|
|
52
53
|
createdAt: { type: Date, default: Date.now }
|
|
53
54
|
},
|
|
54
55
|
{ minimize: false }
|
|
@@ -72,6 +73,7 @@ DriveSchema.method("toClient", async function() {
|
|
|
72
73
|
information: data.information,
|
|
73
74
|
status: data.status,
|
|
74
75
|
trashedAt: data.trashedAt,
|
|
76
|
+
meta: data.meta,
|
|
75
77
|
createdAt: data.createdAt
|
|
76
78
|
};
|
|
77
79
|
});
|
|
@@ -1642,7 +1644,8 @@ var driveUpload = async (source, key, options) => {
|
|
|
1642
1644
|
parentId: resolvedParentId,
|
|
1643
1645
|
order: await getNextOrderValue(key),
|
|
1644
1646
|
information: { type: "FILE", sizeInBytes: fileSize, mime: mimeType, path: "" },
|
|
1645
|
-
status: "UPLOADING"
|
|
1647
|
+
status: "UPLOADING",
|
|
1648
|
+
meta: options.meta || {}
|
|
1646
1649
|
});
|
|
1647
1650
|
if (provider.name === "LOCAL" && drive.information.type === "FILE") {
|
|
1648
1651
|
drive.information.path = path__default.default.join("file", String(drive._id), "data.bin");
|
|
@@ -2426,5 +2429,5 @@ exports.driveReadFile = driveReadFile;
|
|
|
2426
2429
|
exports.driveUpload = driveUpload;
|
|
2427
2430
|
exports.getDriveConfig = getDriveConfig;
|
|
2428
2431
|
exports.getDriveInformation = getDriveInformation;
|
|
2429
|
-
//# sourceMappingURL=chunk-
|
|
2430
|
-
//# sourceMappingURL=chunk-
|
|
2432
|
+
//# sourceMappingURL=chunk-EUAHSB2J.cjs.map
|
|
2433
|
+
//# sourceMappingURL=chunk-EUAHSB2J.cjs.map
|