cloud-ide-model-schema 1.1.28 → 1.1.30

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.
@@ -1,5 +1,4 @@
1
- import * as mongoose from 'mongoose';
2
1
  import 'dotenv/config';
3
2
  declare function connectDB(): Promise<void>;
4
- declare const customUUID: () => mongoose.Types.ObjectId;
3
+ declare const customUUID: () => string;
5
4
  export { connectDB, customUUID };
@@ -67,7 +67,7 @@ function connectDB() {
67
67
  }
68
68
  // Event listner for success and error // pending
69
69
  var customUUID = function () {
70
- var key = new mongoose.Types.ObjectId("".concat(process.env.UUID_PREFIX).concat((0, cloud_ide_lms_model_1.generateRandomAlphanumericString)(21)));
70
+ var key = "".concat(process.env.UUID_PREFIX).concat((0, cloud_ide_lms_model_1.generateRandomAlphanumericString)(21));
71
71
  console.log('Generated custom UUID:', key);
72
72
  return key;
73
73
  };
@@ -7,7 +7,7 @@ var database_1 = require("../../config/database");
7
7
  var core_system_logs = new mongoose_1.Schema({
8
8
  _id: {
9
9
  type: mongoose_1.default.Schema.Types.ObjectId,
10
- default: function () { return (0, database_1.customUUID)(); } // default ObjectId, can be replaced with a custom UUID generator
10
+ default: function () { return new mongoose_1.default.Types.ObjectId((0, database_1.customUUID)()); } // default ObjectId, can be replaced with a custom UUID generator
11
11
  },
12
12
  sylog_id_user: {
13
13
  type: mongoose_1.default.Schema.Types.ObjectId,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript": "^5.8.3"
10
10
  },
11
11
  "name": "cloud-ide-model-schema",
12
- "version": "1.1.28",
12
+ "version": "1.1.30",
13
13
  "description": "Pachage for schema management of Cloud IDEsys LMS",
14
14
  "main": "lib/index.js",
15
15
  "types": "lib/index.d.ts",