@brimble/models 1.6.6 → 1.6.8
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/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/project/index.js +3 -1
- package/dist/project/preview.js +1 -0
- package/dist/server.js +3 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/project/index.d.ts +3 -1
- package/dist/types/project/preview.d.ts +1 -0
- package/dist/types/wallet.d.ts +4 -0
- package/dist/types/wallet.js +2 -0
- package/dist/wallet.d.ts +4 -0
- package/dist/wallet.js +10 -0
- package/index.ts +3 -1
- package/package.json +1 -1
- package/project/index.ts +3 -2
- package/types/index.ts +2 -1
- package/types/project/index.ts +5 -4
- package/types/wallet.ts +5 -0
- package/wallet.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,8 @@ export { default as Log } from "./logs";
|
|
|
16
16
|
export { default as SubscriptionPlan } from "./subscription";
|
|
17
17
|
export { default as Card } from "./card";
|
|
18
18
|
export { default as Server } from "./server";
|
|
19
|
-
export {
|
|
19
|
+
export { default as Wallet } from "./wallet";
|
|
20
|
+
export { IUser, IGit, IProject, IPreview, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet } from "./types";
|
|
20
21
|
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, PERMISSION_TYPE } from "./enum";
|
|
21
22
|
import mongoose from "mongoose";
|
|
22
23
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.closeMongo = exports.db = exports.connectToMongo = exports.PERMISSION_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.Server = exports.Card = exports.SubscriptionPlan = exports.Log = exports.Role = exports.MemberPermission = exports.Permission = exports.Member = exports.Team = exports.Token = exports.Env = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.Preview = exports.Project = exports.User = void 0;
|
|
15
|
+
exports.closeMongo = exports.db = exports.connectToMongo = exports.PERMISSION_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.Wallet = exports.Server = exports.Card = exports.SubscriptionPlan = exports.Log = exports.Role = exports.MemberPermission = exports.Permission = exports.Member = exports.Team = exports.Token = exports.Env = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.Preview = exports.Project = exports.User = void 0;
|
|
16
16
|
var user_1 = require("./user");
|
|
17
17
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
18
18
|
var project_1 = require("./project");
|
|
@@ -49,6 +49,8 @@ var card_1 = require("./card");
|
|
|
49
49
|
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return __importDefault(card_1).default; } });
|
|
50
50
|
var server_1 = require("./server");
|
|
51
51
|
Object.defineProperty(exports, "Server", { enumerable: true, get: function () { return __importDefault(server_1).default; } });
|
|
52
|
+
var wallet_1 = require("./wallet");
|
|
53
|
+
Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return __importDefault(wallet_1).default; } });
|
|
52
54
|
var enum_1 = require("./enum");
|
|
53
55
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
54
56
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
package/dist/project/index.js
CHANGED
|
@@ -46,9 +46,10 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
46
46
|
port: Number,
|
|
47
47
|
ip: String,
|
|
48
48
|
dir: String,
|
|
49
|
+
installCommand: String,
|
|
49
50
|
buildCommand: String,
|
|
51
|
+
startCommand: String,
|
|
50
52
|
outputDirectory: String,
|
|
51
|
-
installCommand: String,
|
|
52
53
|
repo: Object,
|
|
53
54
|
rootDir: String,
|
|
54
55
|
isPrivate: {
|
|
@@ -111,5 +112,6 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
111
112
|
},
|
|
112
113
|
specs: Object,
|
|
113
114
|
last_requested: mongoose_1.Schema.Types.Date,
|
|
115
|
+
isPaused: Boolean,
|
|
114
116
|
}, { timestamps: true });
|
|
115
117
|
exports.default = (0, mongoose_1.model)("Project", projectSchema);
|
package/dist/project/preview.js
CHANGED
|
@@ -28,5 +28,6 @@ const previewsSchema = new mongoose_1.Schema({
|
|
|
28
28
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
29
29
|
},
|
|
30
30
|
last_requested: mongoose_1.Schema.Types.Date,
|
|
31
|
+
isPaused: Boolean,
|
|
31
32
|
}, { timestamps: true });
|
|
32
33
|
exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
|
package/dist/server.js
CHANGED
|
@@ -4,18 +4,14 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const serverSchema = new mongoose_1.Schema({
|
|
6
6
|
name: {
|
|
7
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
-
ref: "User",
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
url: {
|
|
12
7
|
type: String,
|
|
13
8
|
required: true,
|
|
14
9
|
},
|
|
15
10
|
ip_address: {
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
18
13
|
},
|
|
14
|
+
url: String,
|
|
19
15
|
server_type: String,
|
|
20
16
|
status: {
|
|
21
17
|
type: String,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,9 +16,10 @@ export interface IProject extends Document {
|
|
|
16
16
|
port: number;
|
|
17
17
|
ip: string;
|
|
18
18
|
dir: string;
|
|
19
|
+
installCommand: string;
|
|
19
20
|
buildCommand: string;
|
|
21
|
+
startCommand: string;
|
|
20
22
|
outputDirectory: string;
|
|
21
|
-
installCommand: string;
|
|
22
23
|
user_id: IUser;
|
|
23
24
|
monitor_id: string;
|
|
24
25
|
repo: {
|
|
@@ -59,4 +60,5 @@ export interface IProject extends Document {
|
|
|
59
60
|
cpu: number;
|
|
60
61
|
};
|
|
61
62
|
last_requested: Date;
|
|
63
|
+
isPaused: boolean;
|
|
62
64
|
}
|
package/dist/wallet.d.ts
ADDED
package/dist/wallet.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const walletSchema = new mongoose_1.Schema({
|
|
5
|
+
balance: {
|
|
6
|
+
type: Number,
|
|
7
|
+
required: true
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
exports.default = (0, mongoose_1.model)("Wallet", walletSchema);
|
package/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as Log } from "./logs";
|
|
|
16
16
|
export { default as SubscriptionPlan } from "./subscription";
|
|
17
17
|
export { default as Card } from "./card";
|
|
18
18
|
export { default as Server } from "./server";
|
|
19
|
+
export { default as Wallet } from "./wallet";
|
|
19
20
|
export {
|
|
20
21
|
IUser,
|
|
21
22
|
IGit,
|
|
@@ -36,7 +37,8 @@ export {
|
|
|
36
37
|
IDns,
|
|
37
38
|
IRole,
|
|
38
39
|
IPermission,
|
|
39
|
-
IMemberPermission
|
|
40
|
+
IMemberPermission,
|
|
41
|
+
IWallet
|
|
40
42
|
} from "./types";
|
|
41
43
|
export {
|
|
42
44
|
GIT_TYPE,
|
package/package.json
CHANGED
package/project/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { model, Schema
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
2
|
import { PROJECT_STATUS } from "../enum";
|
|
3
3
|
import { IProject } from "../types";
|
|
4
4
|
|
|
@@ -47,9 +47,10 @@ const projectSchema = new Schema(
|
|
|
47
47
|
port: Number,
|
|
48
48
|
ip: String,
|
|
49
49
|
dir: String,
|
|
50
|
+
installCommand: String,
|
|
50
51
|
buildCommand: String,
|
|
52
|
+
startCommand: String,
|
|
51
53
|
outputDirectory: String,
|
|
52
|
-
installCommand: String,
|
|
53
54
|
repo: Object,
|
|
54
55
|
rootDir: String,
|
|
55
56
|
isPrivate: {
|
package/types/index.ts
CHANGED
|
@@ -17,4 +17,5 @@ export { ICard } from "./card";
|
|
|
17
17
|
export { IServer } from "./server";
|
|
18
18
|
export { IPermission } from "./permission";
|
|
19
19
|
export { IRole } from "./role";
|
|
20
|
-
export { IMemberPermission } from "./member-permission";
|
|
20
|
+
export { IMemberPermission } from "./member-permission";
|
|
21
|
+
export { IWallet } from "./wallet";
|
package/types/project/index.ts
CHANGED
|
@@ -17,9 +17,10 @@ export interface IProject extends Document {
|
|
|
17
17
|
port: number;
|
|
18
18
|
ip: string;
|
|
19
19
|
dir: string;
|
|
20
|
+
installCommand: string;
|
|
20
21
|
buildCommand: string;
|
|
22
|
+
startCommand: string;
|
|
21
23
|
outputDirectory: string;
|
|
22
|
-
installCommand: string;
|
|
23
24
|
user_id: IUser;
|
|
24
25
|
monitor_id: string;
|
|
25
26
|
repo: {
|
|
@@ -44,9 +45,9 @@ export interface IProject extends Document {
|
|
|
44
45
|
disabled: boolean;
|
|
45
46
|
password: string | null;
|
|
46
47
|
screenshot: {
|
|
47
|
-
image: string
|
|
48
|
-
public_id: string
|
|
49
|
-
}
|
|
48
|
+
image: string;
|
|
49
|
+
public_id: string;
|
|
50
|
+
};
|
|
50
51
|
createdAt: Date;
|
|
51
52
|
updatedAt: Date;
|
|
52
53
|
container_stats_schedule_id: string | null;
|
package/types/wallet.ts
ADDED
package/wallet.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IWallet } from "./types/wallet";
|
|
3
|
+
|
|
4
|
+
const walletSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
balance: {
|
|
7
|
+
type: Number,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default model<IWallet>("Wallet", walletSchema);
|