@brimble/models 1.5.37 → 1.5.38

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.
@@ -88,13 +88,16 @@ const projectSchema = new mongoose_1.Schema({
88
88
  type: String,
89
89
  default: null,
90
90
  },
91
- screenshot: String,
91
+ screenshot: {
92
+ image: String,
93
+ public_id: String,
94
+ },
92
95
  lastProcessed: Number,
93
96
  tracking_token: String,
94
97
  from: mongoose_1.Schema.Types.ObjectId,
95
98
  container_stats_schedule_id: {
96
99
  type: String,
97
- default: null,
100
+ default: null
98
101
  },
99
102
  previews: [
100
103
  {
@@ -106,7 +109,6 @@ const projectSchema = new mongoose_1.Schema({
106
109
  type: Number,
107
110
  default: 3,
108
111
  },
109
- specs: Object,
110
- last_requested: mongoose_1.Schema.Types.Date,
112
+ specs: Object
111
113
  }, { timestamps: true });
112
114
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -27,6 +27,5 @@ const previewsSchema = new mongoose_1.Schema({
27
27
  ref: "Log",
28
28
  type: mongoose_1.Schema.Types.ObjectId,
29
29
  },
30
- last_requested: mongoose_1.Schema.Types.Date,
31
30
  }, { timestamps: true });
32
31
  exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
@@ -42,7 +42,10 @@ export interface IProject extends Document {
42
42
  passwordEnabled: boolean;
43
43
  disabled: boolean;
44
44
  password: string | null;
45
- screenshot: string;
45
+ screenshot: {
46
+ image: string;
47
+ public_id: string;
48
+ };
46
49
  createdAt: Date;
47
50
  updatedAt: Date;
48
51
  container_stats_schedule_id: string | null;
@@ -55,5 +58,4 @@ export interface IProject extends Document {
55
58
  memory: number;
56
59
  cpu: number;
57
60
  };
58
- last_requested: Date;
59
61
  }
@@ -15,5 +15,4 @@ export interface IPreview extends Document {
15
15
  issue_comment_id: number;
16
16
  status: PROJECT_STATUS;
17
17
  log: ILog;
18
- last_requested: Date;
19
18
  }
@@ -7,7 +7,6 @@ export interface IServer extends Document {
7
7
  server_type: string;
8
8
  status: SERVER_STATUS;
9
9
  default: boolean;
10
- is_custom_provision: boolean;
11
10
  is_downscaled: boolean;
12
11
  tag: string;
13
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.37",
3
+ "version": "1.5.38",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@brimble/utils": "^1.5.22",
12
+ "@brimble/utils": "^1.5.23",
13
13
  "dotenv": "^8.2.0",
14
14
  "mongoose": "^5.8.11",
15
15
  "uuid": "^8.3.2"
package/project/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { model, Schema, } from "mongoose";
1
+ import { model, Schema } from "mongoose";
2
2
  import { PROJECT_STATUS } from "../enum";
3
3
  import { IProject } from "../types";
4
4
 
@@ -89,13 +89,16 @@ const projectSchema = new Schema(
89
89
  type: String,
90
90
  default: null,
91
91
  },
92
- screenshot: String,
92
+ screenshot: {
93
+ image: String,
94
+ public_id: String,
95
+ },
93
96
  lastProcessed: Number,
94
97
  tracking_token: String,
95
98
  from: Schema.Types.ObjectId,
96
99
  container_stats_schedule_id: {
97
- type: String,
98
- default: null,
100
+ type: String,
101
+ default: null
99
102
  },
100
103
  previews: [
101
104
  {
@@ -107,8 +110,7 @@ const projectSchema = new Schema(
107
110
  type: Number,
108
111
  default: 3,
109
112
  },
110
- specs: Object,
111
- last_requested: Schema.Types.Date,
113
+ specs: Object
112
114
  },
113
115
  { timestamps: true },
114
116
  );
@@ -28,7 +28,6 @@ const previewsSchema = new Schema(
28
28
  ref: "Log",
29
29
  type: Schema.Types.ObjectId,
30
30
  },
31
- last_requested: Schema.Types.Date,
32
31
  },
33
32
  { timestamps: true },
34
33
  );
@@ -43,7 +43,10 @@ export interface IProject extends Document {
43
43
  passwordEnabled: boolean;
44
44
  disabled: boolean;
45
45
  password: string | null;
46
- screenshot: string;
46
+ screenshot: {
47
+ image: string,
48
+ public_id: string,
49
+ },
47
50
  createdAt: Date;
48
51
  updatedAt: Date;
49
52
  container_stats_schedule_id: string | null;
@@ -56,5 +59,4 @@ export interface IProject extends Document {
56
59
  memory: number;
57
60
  cpu: number;
58
61
  };
59
- last_requested: Date;
60
62
  }
@@ -16,5 +16,4 @@ export interface IPreview extends Document {
16
16
  issue_comment_id: number;
17
17
  status: PROJECT_STATUS;
18
18
  log: ILog;
19
- last_requested: Date;
20
19
  }
package/types/server.ts CHANGED
@@ -14,8 +14,6 @@ export interface IServer extends Document {
14
14
 
15
15
  default: boolean;
16
16
 
17
- is_custom_provision: boolean;
18
-
19
17
  is_downscaled: boolean;
20
18
 
21
19
  tag: string;
@@ -1 +0,0 @@
1
- $ rm -rf dist && tsc -p .
package/brimble.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "project": {}
3
- }