@brimble/models 1.3.28 → 1.3.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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -2
- package/dist/invitation.js +4 -0
- package/dist/member.js +5 -0
- package/dist/project.js +9 -0
- package/dist/team.js +0 -6
- package/dist/types/index.d.ts +0 -1
- package/dist/types/invitation.d.ts +2 -0
- package/dist/types/member.d.ts +2 -0
- package/dist/types/team.d.ts +1 -2
- package/index.ts +0 -2
- package/member.ts +5 -0
- package/package.json +1 -1
- package/project.ts +9 -0
- package/team.ts +0 -6
- package/types/index.ts +0 -1
- package/types/member.ts +2 -0
- package/types/team.ts +1 -2
- package/invitation.ts +0 -24
- package/types/invitation.ts +0 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[32m@brimble/models:build: [0mcache hit, replaying output [
|
|
1
|
+
[32m@brimble/models:build: [0mcache hit, replaying output [2m7193f139fb727167[0m
|
|
2
2
|
[32m@brimble/models:build: [0m$ tsc -p .
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ 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 {
|
|
11
|
-
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInvitation, } from "./types";
|
|
10
|
+
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, } from "./types";
|
|
12
11
|
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, } from "./enum";
|
|
13
12
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
14
13
|
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,6 @@ 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 invitation_1 = require("./invitation");
|
|
35
|
-
Object.defineProperty(exports, "Invitation", { enumerable: true, get: function () { return invitation_1.default; } });
|
|
36
34
|
var enum_1 = require("./enum");
|
|
37
35
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
38
36
|
Object.defineProperty(exports, "INTEGRATION_TYPE", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPE; } });
|
package/dist/invitation.js
CHANGED
package/dist/member.js
CHANGED
|
@@ -7,6 +7,7 @@ const memberSchema = new mongoose_1.Schema({
|
|
|
7
7
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
8
|
ref: "User",
|
|
9
9
|
},
|
|
10
|
+
email: String,
|
|
10
11
|
team: {
|
|
11
12
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
12
13
|
ref: "Team",
|
|
@@ -20,6 +21,10 @@ const memberSchema = new mongoose_1.Schema({
|
|
|
20
21
|
type: Boolean,
|
|
21
22
|
default: false,
|
|
22
23
|
},
|
|
24
|
+
invitedBy: {
|
|
25
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
26
|
+
ref: "User",
|
|
27
|
+
},
|
|
23
28
|
}, {
|
|
24
29
|
timestamps: true,
|
|
25
30
|
});
|
package/dist/project.js
CHANGED
|
@@ -29,12 +29,21 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
29
29
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
|
+
team: {
|
|
33
|
+
ref: "Team",
|
|
34
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
35
|
+
},
|
|
32
36
|
pid: Number,
|
|
33
37
|
port: Number,
|
|
34
38
|
dir: String,
|
|
35
39
|
buildCommand: String,
|
|
36
40
|
outputDirectory: String,
|
|
41
|
+
installCommand: String,
|
|
37
42
|
repo: Object,
|
|
38
43
|
rootDir: String,
|
|
44
|
+
isPrivate: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
39
48
|
}, { timestamps: true });
|
|
40
49
|
exports.default = mongoose_1.model("Project", projectSchema);
|
package/dist/team.js
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/member.d.ts
CHANGED
package/dist/types/team.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { IMember, IProject
|
|
1
|
+
import { IMember, IProject } from "./";
|
|
2
2
|
export interface ITeam extends Document {
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
5
|
members: Array<IMember>;
|
|
6
6
|
projects: Array<IProject>;
|
|
7
|
-
invitations: Array<IInvitation>;
|
|
8
7
|
avatar: string;
|
|
9
8
|
isCreator: boolean;
|
|
10
9
|
}
|
package/index.ts
CHANGED
|
@@ -7,7 +7,6 @@ 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 Invitation } from "./invitation";
|
|
11
10
|
export {
|
|
12
11
|
IUser,
|
|
13
12
|
IGit,
|
|
@@ -19,7 +18,6 @@ export {
|
|
|
19
18
|
IToken,
|
|
20
19
|
IMember,
|
|
21
20
|
ITeam,
|
|
22
|
-
IInvitation,
|
|
23
21
|
} from "./types";
|
|
24
22
|
export {
|
|
25
23
|
GIT_TYPE,
|
package/member.ts
CHANGED
|
@@ -8,6 +8,7 @@ const memberSchema: Schema = new Schema(
|
|
|
8
8
|
type: Schema.Types.ObjectId,
|
|
9
9
|
ref: "User",
|
|
10
10
|
},
|
|
11
|
+
email: String,
|
|
11
12
|
team: {
|
|
12
13
|
type: Schema.Types.ObjectId,
|
|
13
14
|
ref: "Team",
|
|
@@ -21,6 +22,10 @@ const memberSchema: Schema = new Schema(
|
|
|
21
22
|
type: Boolean,
|
|
22
23
|
default: false,
|
|
23
24
|
},
|
|
25
|
+
invitedBy: {
|
|
26
|
+
type: Schema.Types.ObjectId,
|
|
27
|
+
ref: "User",
|
|
28
|
+
},
|
|
24
29
|
},
|
|
25
30
|
{
|
|
26
31
|
timestamps: true,
|
package/package.json
CHANGED
package/project.ts
CHANGED
|
@@ -30,13 +30,22 @@ const projectSchema = new Schema(
|
|
|
30
30
|
type: Schema.Types.ObjectId,
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
|
+
team: {
|
|
34
|
+
ref: "Team",
|
|
35
|
+
type: Schema.Types.ObjectId,
|
|
36
|
+
},
|
|
33
37
|
pid: Number,
|
|
34
38
|
port: Number,
|
|
35
39
|
dir: String,
|
|
36
40
|
buildCommand: String,
|
|
37
41
|
outputDirectory: String,
|
|
42
|
+
installCommand: String,
|
|
38
43
|
repo: Object,
|
|
39
44
|
rootDir: String,
|
|
45
|
+
isPrivate: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false,
|
|
48
|
+
},
|
|
40
49
|
},
|
|
41
50
|
{ timestamps: true },
|
|
42
51
|
);
|
package/team.ts
CHANGED
package/types/index.ts
CHANGED
package/types/member.ts
CHANGED
package/types/team.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IMember, IProject
|
|
1
|
+
import { IMember, IProject } from "./";
|
|
2
2
|
|
|
3
3
|
export interface ITeam extends Document {
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
members: Array<IMember>;
|
|
7
7
|
projects: Array<IProject>;
|
|
8
|
-
invitations: Array<IInvitation>;
|
|
9
8
|
avatar: string;
|
|
10
9
|
isCreator: boolean;
|
|
11
10
|
}
|
package/invitation.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IInvitation } from "./types";
|
|
3
|
-
|
|
4
|
-
const invitationSchema: Schema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
email: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
team: {
|
|
11
|
-
type: Schema.Types.ObjectId,
|
|
12
|
-
ref: "Team",
|
|
13
|
-
},
|
|
14
|
-
accepted: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
timestamps: true,
|
|
21
|
-
},
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export default model<IInvitation>("Invitation", invitationSchema);
|