@brimble/models 1.3.36 → 1.3.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.
- package/dist/enum/index.d.ts +1 -1
- package/dist/enum/index.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/logs.d.ts +4 -0
- package/dist/logs.js +24 -0
- package/dist/project.js +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/logs.d.ts +20 -0
- package/dist/types/logs.js +2 -0
- package/dist/types/project.d.ts +1 -0
- package/enum/index.ts +1 -1
- package/index.ts +3 -0
- package/logs.ts +28 -0
- package/package.json +1 -1
- package/project.ts +7 -0
- package/types/index.ts +1 -0
- package/types/logs.ts +21 -0
- package/types/project.ts +1 -0
package/dist/enum/index.d.ts
CHANGED
package/dist/enum/index.js
CHANGED
|
@@ -39,5 +39,5 @@ var PROJECT_STATUS;
|
|
|
39
39
|
PROJECT_STATUS["ACTIVE"] = "ACTIVE";
|
|
40
40
|
PROJECT_STATUS["INPROGRESS"] = "INPROGRESS";
|
|
41
41
|
PROJECT_STATUS["FAILED"] = "FAILED";
|
|
42
|
-
PROJECT_STATUS["
|
|
42
|
+
PROJECT_STATUS["PENDING"] = "PENDING";
|
|
43
43
|
})(PROJECT_STATUS = exports.PROJECT_STATUS || (exports.PROJECT_STATUS = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export { default as Env } from "./env";
|
|
|
7
7
|
export { default as Token } from "./token";
|
|
8
8
|
export { default as Team } from "./team";
|
|
9
9
|
export { default as Member } from "./member";
|
|
10
|
-
export {
|
|
10
|
+
export { default as InstalledIntegration } from "./installed_integration";
|
|
11
|
+
export { default as Log } from "./logs";
|
|
12
|
+
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, } from "./types";
|
|
11
13
|
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, PROJECT_STATUS, } from "./enum";
|
|
12
14
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
13
15
|
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,10 @@ var team_1 = require("./team");
|
|
|
31
31
|
Object.defineProperty(exports, "Team", { enumerable: true, get: function () { return team_1.default; } });
|
|
32
32
|
var member_1 = require("./member");
|
|
33
33
|
Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return member_1.default; } });
|
|
34
|
+
var installed_integration_1 = require("./installed_integration");
|
|
35
|
+
Object.defineProperty(exports, "InstalledIntegration", { enumerable: true, get: function () { return installed_integration_1.default; } });
|
|
36
|
+
var logs_1 = require("./logs");
|
|
37
|
+
Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return logs_1.default; } });
|
|
34
38
|
var enum_1 = require("./enum");
|
|
35
39
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
36
40
|
Object.defineProperty(exports, "INTEGRATION_TYPE", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPE; } });
|
package/dist/logs.d.ts
ADDED
package/dist/logs.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const LogSchema = new mongoose_1.Schema({
|
|
6
|
+
logFile: String,
|
|
7
|
+
commit: Object,
|
|
8
|
+
name: String,
|
|
9
|
+
status: {
|
|
10
|
+
type: String,
|
|
11
|
+
enum: Object.values(enum_1.PROJECT_STATUS),
|
|
12
|
+
default: enum_1.PROJECT_STATUS.PENDING,
|
|
13
|
+
},
|
|
14
|
+
project: {
|
|
15
|
+
ref: "Project",
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
17
|
+
},
|
|
18
|
+
user: {
|
|
19
|
+
ref: "User",
|
|
20
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
21
|
+
},
|
|
22
|
+
endTime: Date,
|
|
23
|
+
}, { timestamps: true });
|
|
24
|
+
exports.default = mongoose_1.model("Log", LogSchema);
|
package/dist/project.js
CHANGED
|
@@ -51,6 +51,13 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
51
51
|
enum: Object.values(enum_1.PROJECT_STATUS),
|
|
52
52
|
default: enum_1.PROJECT_STATUS.INPROGRESS,
|
|
53
53
|
},
|
|
54
|
+
framework: String,
|
|
54
55
|
description: String,
|
|
56
|
+
logs: [
|
|
57
|
+
{
|
|
58
|
+
ref: "Log",
|
|
59
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
55
62
|
}, { timestamps: true });
|
|
56
63
|
exports.default = mongoose_1.model("Project", projectSchema);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PROJECT_STATUS } from "../enum";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
export interface ILog extends Document {
|
|
5
|
+
logFile: string;
|
|
6
|
+
name: string;
|
|
7
|
+
commit: {
|
|
8
|
+
sha: string;
|
|
9
|
+
branch: string;
|
|
10
|
+
message: string;
|
|
11
|
+
committer: {
|
|
12
|
+
name: string;
|
|
13
|
+
email: string;
|
|
14
|
+
username: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
status: PROJECT_STATUS;
|
|
18
|
+
project: IProject;
|
|
19
|
+
user?: IUser;
|
|
20
|
+
}
|
package/dist/types/project.d.ts
CHANGED
package/enum/index.ts
CHANGED
package/index.ts
CHANGED
|
@@ -7,6 +7,8 @@ export { default as Env } from "./env";
|
|
|
7
7
|
export { default as Token } from "./token";
|
|
8
8
|
export { default as Team } from "./team";
|
|
9
9
|
export { default as Member } from "./member";
|
|
10
|
+
export { default as InstalledIntegration } from "./installed_integration";
|
|
11
|
+
export { default as Log } from "./logs";
|
|
10
12
|
export {
|
|
11
13
|
IUser,
|
|
12
14
|
IGit,
|
|
@@ -19,6 +21,7 @@ export {
|
|
|
19
21
|
IMember,
|
|
20
22
|
ITeam,
|
|
21
23
|
IInstalledIntegration,
|
|
24
|
+
ILog,
|
|
22
25
|
} from "./types";
|
|
23
26
|
export {
|
|
24
27
|
GIT_TYPE,
|
package/logs.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { PROJECT_STATUS } from "./enum";
|
|
3
|
+
import { ILog } from "./types";
|
|
4
|
+
|
|
5
|
+
const LogSchema = new Schema(
|
|
6
|
+
{
|
|
7
|
+
logFile: String,
|
|
8
|
+
commit: Object,
|
|
9
|
+
name: String,
|
|
10
|
+
status: {
|
|
11
|
+
type: String,
|
|
12
|
+
enum: Object.values(PROJECT_STATUS),
|
|
13
|
+
default: PROJECT_STATUS.PENDING,
|
|
14
|
+
},
|
|
15
|
+
project: {
|
|
16
|
+
ref: "Project",
|
|
17
|
+
type: Schema.Types.ObjectId,
|
|
18
|
+
},
|
|
19
|
+
user: {
|
|
20
|
+
ref: "User",
|
|
21
|
+
type: Schema.Types.ObjectId,
|
|
22
|
+
},
|
|
23
|
+
endTime: String,
|
|
24
|
+
},
|
|
25
|
+
{ timestamps: true },
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export default model<ILog>("Log", LogSchema);
|
package/package.json
CHANGED
package/project.ts
CHANGED
|
@@ -52,7 +52,14 @@ const projectSchema = new Schema(
|
|
|
52
52
|
enum: Object.values(PROJECT_STATUS),
|
|
53
53
|
default: PROJECT_STATUS.INPROGRESS,
|
|
54
54
|
},
|
|
55
|
+
framework: String,
|
|
55
56
|
description: String,
|
|
57
|
+
logs: [
|
|
58
|
+
{
|
|
59
|
+
ref: "Log",
|
|
60
|
+
type: Schema.Types.ObjectId,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
56
63
|
},
|
|
57
64
|
{ timestamps: true },
|
|
58
65
|
);
|
package/types/index.ts
CHANGED
package/types/logs.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PROJECT_STATUS } from "../enum";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
|
|
5
|
+
export interface ILog extends Document {
|
|
6
|
+
logFile: string;
|
|
7
|
+
name: string;
|
|
8
|
+
commit: {
|
|
9
|
+
sha: string;
|
|
10
|
+
branch: string;
|
|
11
|
+
message: string;
|
|
12
|
+
committer: {
|
|
13
|
+
name: string;
|
|
14
|
+
email: string;
|
|
15
|
+
username: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
status: PROJECT_STATUS;
|
|
19
|
+
project: IProject;
|
|
20
|
+
user?: IUser;
|
|
21
|
+
}
|