@brimble/models 1.5.38 → 1.5.39

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.
@@ -0,0 +1 @@
1
+ $ rm -rf dist && tsc -p .
package/brimble.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "project": {}
3
+ }
@@ -97,7 +97,7 @@ const projectSchema = new mongoose_1.Schema({
97
97
  from: mongoose_1.Schema.Types.ObjectId,
98
98
  container_stats_schedule_id: {
99
99
  type: String,
100
- default: null
100
+ default: null,
101
101
  },
102
102
  previews: [
103
103
  {
@@ -109,6 +109,7 @@ const projectSchema = new mongoose_1.Schema({
109
109
  type: Number,
110
110
  default: 3,
111
111
  },
112
- specs: Object
112
+ specs: Object,
113
+ last_requested: mongoose_1.Schema.Types.Date,
113
114
  }, { timestamps: true });
114
115
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -27,5 +27,6 @@ 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,
30
31
  }, { timestamps: true });
31
32
  exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
package/dist/server.js CHANGED
@@ -31,6 +31,7 @@ const serverSchema = new mongoose_1.Schema({
31
31
  type: Boolean,
32
32
  default: false,
33
33
  },
34
+ region: String,
34
35
  tag: String,
35
36
  }, { timestamps: true });
36
37
  exports.default = (0, mongoose_1.model)("Server", serverSchema);
@@ -58,4 +58,5 @@ export interface IProject extends Document {
58
58
  memory: number;
59
59
  cpu: number;
60
60
  };
61
+ last_requested: Date;
61
62
  }
@@ -15,4 +15,5 @@ export interface IPreview extends Document {
15
15
  issue_comment_id: number;
16
16
  status: PROJECT_STATUS;
17
17
  log: ILog;
18
+ last_requested: Date;
18
19
  }
@@ -7,6 +7,8 @@ export interface IServer extends Document {
7
7
  server_type: string;
8
8
  status: SERVER_STATUS;
9
9
  default: boolean;
10
+ is_custom_provision: boolean;
10
11
  is_downscaled: boolean;
11
12
  tag: string;
13
+ region: string;
12
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.38",
3
+ "version": "1.5.39",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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
 
@@ -97,8 +97,8 @@ const projectSchema = new Schema(
97
97
  tracking_token: String,
98
98
  from: Schema.Types.ObjectId,
99
99
  container_stats_schedule_id: {
100
- type: String,
101
- default: null
100
+ type: String,
101
+ default: null,
102
102
  },
103
103
  previews: [
104
104
  {
@@ -110,7 +110,8 @@ const projectSchema = new Schema(
110
110
  type: Number,
111
111
  default: 3,
112
112
  },
113
- specs: Object
113
+ specs: Object,
114
+ last_requested: Schema.Types.Date,
114
115
  },
115
116
  { timestamps: true },
116
117
  );
@@ -28,6 +28,7 @@ const previewsSchema = new Schema(
28
28
  ref: "Log",
29
29
  type: Schema.Types.ObjectId,
30
30
  },
31
+ last_requested: Schema.Types.Date,
31
32
  },
32
33
  { timestamps: true },
33
34
  );
package/server.ts CHANGED
@@ -40,6 +40,8 @@ const serverSchema = new Schema(
40
40
  default: false,
41
41
  },
42
42
 
43
+ region: String,
44
+
43
45
  tag: String,
44
46
  },
45
47
  { timestamps: true },
@@ -59,4 +59,5 @@ export interface IProject extends Document {
59
59
  memory: number;
60
60
  cpu: number;
61
61
  };
62
+ last_requested: Date;
62
63
  }
@@ -16,4 +16,5 @@ export interface IPreview extends Document {
16
16
  issue_comment_id: number;
17
17
  status: PROJECT_STATUS;
18
18
  log: ILog;
19
+ last_requested: Date;
19
20
  }
package/types/server.ts CHANGED
@@ -14,7 +14,11 @@ export interface IServer extends Document {
14
14
 
15
15
  default: boolean;
16
16
 
17
+ is_custom_provision: boolean;
18
+
17
19
  is_downscaled: boolean;
18
20
 
19
21
  tag: string;
22
+
23
+ region: string;
20
24
  }