@brimble/models 1.4.22 → 1.4.23
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/logs.d.ts +2 -2
- package/dist/logs.js +1 -3
- package/dist/project.d.ts +2 -2
- package/dist/project.js +1 -3
- package/dist/user.d.ts +3 -2
- package/dist/user.js +1 -4
- package/logs.ts +1 -5
- package/package.json +2 -2
- package/project.ts +1 -5
- package/user.ts +1 -5
package/dist/logs.d.ts
CHANGED
package/dist/logs.js
CHANGED
|
@@ -21,6 +21,4 @@ const LogSchema = new mongoose_1.Schema({
|
|
|
21
21
|
startTime: mongoose_1.Schema.Types.Date,
|
|
22
22
|
endTime: mongoose_1.Schema.Types.Date,
|
|
23
23
|
}, { timestamps: true });
|
|
24
|
-
|
|
25
|
-
Log.ensureIndexes({ _id: 1, project: 1 });
|
|
26
|
-
exports.default = Log;
|
|
24
|
+
exports.default = (0, mongoose_1.model)("Log", LogSchema);
|
package/dist/project.d.ts
CHANGED
package/dist/project.js
CHANGED
|
@@ -69,6 +69,4 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
69
69
|
},
|
|
70
70
|
screenshot: String,
|
|
71
71
|
}, { timestamps: true });
|
|
72
|
-
|
|
73
|
-
Project.ensureIndexes({ _id: 1, updatedAt: 1, createdAt: 1 });
|
|
74
|
-
exports.default = Project;
|
|
72
|
+
exports.default = (0, mongoose_1.model)("Project", projectSchema);
|
package/dist/user.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="mongoose" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { IUser } from "./types";
|
|
3
|
+
declare const _default: import("mongoose").Model<IUser, {}, {}>;
|
|
4
|
+
export default _default;
|
package/dist/user.js
CHANGED
|
@@ -54,7 +54,4 @@ const userSchema = new mongoose_1.Schema({
|
|
|
54
54
|
type: String,
|
|
55
55
|
},
|
|
56
56
|
}, { timestamps: true });
|
|
57
|
-
|
|
58
|
-
// Create indexes for _id and email
|
|
59
|
-
User.ensureIndexes({ _id: 1, email: 1 });
|
|
60
|
-
exports.default = User;
|
|
57
|
+
exports.default = (0, mongoose_1.model)("User", userSchema);
|
package/logs.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brimble/models",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.23",
|
|
4
4
|
"description": "Brimble models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"ts-node": "^8.10.2",
|
|
22
22
|
"typescript": "^4.9.4"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "6aa0bcde1e1f06278aa61f5c6f4420a9cfd9ac03"
|
|
25
25
|
}
|
package/project.ts
CHANGED
|
@@ -73,8 +73,4 @@ const projectSchema = new Schema(
|
|
|
73
73
|
{ timestamps: true },
|
|
74
74
|
);
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Project.ensureIndexes({ _id: 1, updatedAt: 1, createdAt: 1 });
|
|
79
|
-
|
|
80
|
-
export default Project;
|
|
76
|
+
export default model<IProject>("Project", projectSchema);
|
package/user.ts
CHANGED
|
@@ -58,9 +58,5 @@ const userSchema: Schema = new Schema(
|
|
|
58
58
|
},
|
|
59
59
|
{ timestamps: true },
|
|
60
60
|
);
|
|
61
|
-
const User = model("User", userSchema);
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
User.ensureIndexes({ _id: 1, email: 1 });
|
|
65
|
-
|
|
66
|
-
export default User;
|
|
62
|
+
export default model<IUser>("User", userSchema);
|