@brimble/models 3.0.5 → 3.0.6
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/compute.ts +1 -1
- package/db-image.ts +5 -5
- package/dist/compute.js +1 -1
- package/dist/db-image.js +5 -5
- package/dist/domain/index.js +2 -2
- package/dist/env.js +1 -1
- package/dist/framework.d.ts +30 -0
- package/dist/framework.js +56 -0
- package/dist/index.d.ts +1 -1
- package/dist/project/index.js +2 -2
- package/dist/region.js +1 -1
- package/dist/server.js +2 -2
- package/dist/subscription.js +1 -1
- package/dist/token.js +1 -1
- package/dist/types/framework.d.ts +19 -0
- package/dist/types/framework.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/domain/index.ts +2 -2
- package/enum/index.ts +3 -3
- package/env.ts +1 -1
- package/framework.ts +60 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/project/index.ts +2 -2
- package/region.ts +1 -1
- package/server.ts +2 -2
- package/subscription.ts +1 -1
- package/token.ts +1 -1
- package/types/db-image.ts +1 -1
- package/types/framework.ts +20 -0
- package/types/index.ts +1 -0
package/compute.ts
CHANGED
|
@@ -64,7 +64,7 @@ const ComputeChangeSchema = new Schema({
|
|
|
64
64
|
type: Boolean,
|
|
65
65
|
default: false,
|
|
66
66
|
},
|
|
67
|
-
storage_pricing_factor: { type: Number, required: false, default: 1}
|
|
67
|
+
storage_pricing_factor: { type: Number, required: false, default: 1 },
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
export default model<IComputeChange>(
|
package/db-image.ts
CHANGED
|
@@ -39,22 +39,22 @@ const dbImageSchema = new Schema(
|
|
|
39
39
|
},
|
|
40
40
|
port: {
|
|
41
41
|
type: Number,
|
|
42
|
-
required: true
|
|
42
|
+
required: true,
|
|
43
43
|
},
|
|
44
44
|
volumePath: {
|
|
45
45
|
type: String,
|
|
46
46
|
required: true,
|
|
47
|
-
default: "/data"
|
|
47
|
+
default: "/data",
|
|
48
48
|
},
|
|
49
49
|
recommendations: {
|
|
50
50
|
required: false,
|
|
51
51
|
type: Array,
|
|
52
|
-
default: []
|
|
52
|
+
default: [],
|
|
53
53
|
},
|
|
54
54
|
protocol: {
|
|
55
55
|
required: true,
|
|
56
|
-
type: String
|
|
57
|
-
}
|
|
56
|
+
type: String,
|
|
57
|
+
},
|
|
58
58
|
},
|
|
59
59
|
{ timestamps: true },
|
|
60
60
|
);
|
package/dist/compute.js
CHANGED
|
@@ -64,6 +64,6 @@ const ComputeChangeSchema = new mongoose_1.Schema({
|
|
|
64
64
|
type: Boolean,
|
|
65
65
|
default: false,
|
|
66
66
|
},
|
|
67
|
-
storage_pricing_factor: { type: Number, required: false, default: 1 }
|
|
67
|
+
storage_pricing_factor: { type: Number, required: false, default: 1 },
|
|
68
68
|
});
|
|
69
69
|
exports.default = (0, mongoose_1.model)("ComputeChange", ComputeChangeSchema, "compute_changes");
|
package/dist/db-image.js
CHANGED
|
@@ -38,21 +38,21 @@ const dbImageSchema = new mongoose_1.Schema({
|
|
|
38
38
|
},
|
|
39
39
|
port: {
|
|
40
40
|
type: Number,
|
|
41
|
-
required: true
|
|
41
|
+
required: true,
|
|
42
42
|
},
|
|
43
43
|
volumePath: {
|
|
44
44
|
type: String,
|
|
45
45
|
required: true,
|
|
46
|
-
default: "/data"
|
|
46
|
+
default: "/data",
|
|
47
47
|
},
|
|
48
48
|
recommendations: {
|
|
49
49
|
required: false,
|
|
50
50
|
type: Array,
|
|
51
|
-
default: []
|
|
51
|
+
default: [],
|
|
52
52
|
},
|
|
53
53
|
protocol: {
|
|
54
54
|
required: true,
|
|
55
|
-
type: String
|
|
56
|
-
}
|
|
55
|
+
type: String,
|
|
56
|
+
},
|
|
57
57
|
}, { timestamps: true });
|
|
58
58
|
exports.default = (0, mongoose_1.model)("DbImage", dbImageSchema);
|
package/dist/domain/index.js
CHANGED
|
@@ -27,12 +27,12 @@ const domainSchema = new mongoose_1.Schema({
|
|
|
27
27
|
},
|
|
28
28
|
provider: {
|
|
29
29
|
type: String,
|
|
30
|
-
required: true
|
|
30
|
+
required: true,
|
|
31
31
|
},
|
|
32
32
|
renewal_duration: {
|
|
33
33
|
type: Number,
|
|
34
34
|
required: false,
|
|
35
|
-
default: 1
|
|
35
|
+
default: 1,
|
|
36
36
|
},
|
|
37
37
|
is_discounted: {
|
|
38
38
|
type: Boolean,
|
package/dist/env.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
import { IFramework } from "./types";
|
|
27
|
+
declare const _default: import("mongoose").Model<IFramework, {}, {}, {}, import("mongoose").Document<unknown, {}, IFramework> & IFramework & {
|
|
28
|
+
_id: import("mongoose").Types.ObjectId;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const frameworkSchema = new mongoose_1.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
slug: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
demo: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
logo: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
tagline: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
website: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
envPrefix: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false,
|
|
36
|
+
},
|
|
37
|
+
detector: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
settings: {
|
|
42
|
+
installCommand: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: false,
|
|
45
|
+
},
|
|
46
|
+
buildCommand: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
outputDirectory: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
}, { timestamps: true });
|
|
56
|
+
exports.default = (0, mongoose_1.model)("Framework", frameworkSchema, "frameworks");
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { default as AutoScalingGroup } from "./auto-scaling";
|
|
|
26
26
|
export { default as ComputeChange } from "./compute";
|
|
27
27
|
export { default as Region } from "./region";
|
|
28
28
|
export { default as Volume } from "./volume";
|
|
29
|
-
export { IUser, IGit, IProject, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, } from "./types";
|
|
29
|
+
export { IUser, IGit, IProject, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, } from "./types";
|
|
30
30
|
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, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, } from "./enum";
|
|
31
31
|
import mongoose from "mongoose";
|
|
32
32
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/project/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
25
25
|
},
|
|
26
26
|
preStartCommand: {
|
|
27
27
|
type: String,
|
|
28
|
-
required: false
|
|
28
|
+
required: false,
|
|
29
29
|
},
|
|
30
30
|
buildCacheEnabled: {
|
|
31
31
|
type: Boolean,
|
|
@@ -112,7 +112,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
112
112
|
},
|
|
113
113
|
hasUpdates: {
|
|
114
114
|
type: Boolean,
|
|
115
|
-
default: false
|
|
115
|
+
default: false,
|
|
116
116
|
},
|
|
117
117
|
lastProcessed: Number,
|
|
118
118
|
tracking_token: String,
|
package/dist/region.js
CHANGED
|
@@ -11,6 +11,6 @@ const regionSchema = new mongoose_1.Schema({
|
|
|
11
11
|
is_paid: { type: Boolean, default: false },
|
|
12
12
|
provider: { type: String, required: true },
|
|
13
13
|
provider_identifier: { type: String, required: true },
|
|
14
|
-
storage_pricing_factor: { type: Number, required: true, default: 0.25 }
|
|
14
|
+
storage_pricing_factor: { type: Number, required: true, default: 0.25 },
|
|
15
15
|
});
|
|
16
16
|
exports.default = (0, mongoose_1.model)("Region", regionSchema, "regions");
|
package/dist/server.js
CHANGED
|
@@ -64,7 +64,7 @@ const serverSchema = new mongoose_1.Schema({
|
|
|
64
64
|
},
|
|
65
65
|
provider: {
|
|
66
66
|
type: String,
|
|
67
|
-
required: true
|
|
67
|
+
required: true,
|
|
68
68
|
},
|
|
69
69
|
provider_location: {
|
|
70
70
|
type: String,
|
|
@@ -76,7 +76,7 @@ const serverSchema = new mongoose_1.Schema({
|
|
|
76
76
|
},
|
|
77
77
|
topology_path: {
|
|
78
78
|
type: String,
|
|
79
|
-
required: false
|
|
79
|
+
required: false,
|
|
80
80
|
},
|
|
81
81
|
specifications: {
|
|
82
82
|
type: Object,
|
package/dist/subscription.js
CHANGED
package/dist/token.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
export interface IFramework extends Document {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
demo?: string;
|
|
6
|
+
logo: string;
|
|
7
|
+
tagline?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
website: string;
|
|
10
|
+
envPrefix?: string;
|
|
11
|
+
detector: string;
|
|
12
|
+
settings: {
|
|
13
|
+
installCommand?: string;
|
|
14
|
+
buildCommand: string;
|
|
15
|
+
outputDirectory: string;
|
|
16
|
+
};
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/domain/index.ts
CHANGED
|
@@ -28,12 +28,12 @@ const domainSchema = new Schema(
|
|
|
28
28
|
},
|
|
29
29
|
provider: {
|
|
30
30
|
type: String,
|
|
31
|
-
required: true
|
|
31
|
+
required: true,
|
|
32
32
|
},
|
|
33
33
|
renewal_duration: {
|
|
34
34
|
type: Number,
|
|
35
35
|
required: false,
|
|
36
|
-
default: 1
|
|
36
|
+
default: 1,
|
|
37
37
|
},
|
|
38
38
|
is_discounted: {
|
|
39
39
|
type: Boolean,
|
package/enum/index.ts
CHANGED
|
@@ -3,12 +3,12 @@ export enum GIT_TYPE {
|
|
|
3
3
|
GITLAB = "GITLAB",
|
|
4
4
|
BITBUCKET = "BITBUCKET",
|
|
5
5
|
DOCKER = "DOCKER",
|
|
6
|
-
HUGGING_FACE = "HUGGINGFACE"
|
|
6
|
+
HUGGING_FACE = "HUGGINGFACE",
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export enum BUILD_DISABLED_BY {
|
|
10
10
|
System = "system",
|
|
11
|
-
User = "user"
|
|
11
|
+
User = "user",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export enum REQUEST_TYPE {
|
|
@@ -60,7 +60,7 @@ export enum PROJECT_STATUS {
|
|
|
60
60
|
PENDING = "PENDING",
|
|
61
61
|
CANCELLED = "CANCELLED",
|
|
62
62
|
DEGRADED = "DEGRADED",
|
|
63
|
-
PAYMENT = "PAYMENT DUE"
|
|
63
|
+
PAYMENT = "PAYMENT DUE",
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export enum SUBSCRIPTION_STATUS {
|
package/env.ts
CHANGED
package/framework.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IFramework } from "./types";
|
|
3
|
+
|
|
4
|
+
const frameworkSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
slug: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
demo: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
logo: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
tagline: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
26
|
+
description: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
website: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
envPrefix: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
detector: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
settings: {
|
|
43
|
+
installCommand: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
buildCommand: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
outputDirectory: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{ timestamps: true },
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export default model<IFramework>("Framework", frameworkSchema, "frameworks");
|
package/index.ts
CHANGED
package/package.json
CHANGED
package/project/index.ts
CHANGED
|
@@ -25,7 +25,7 @@ const projectSchema = new Schema(
|
|
|
25
25
|
},
|
|
26
26
|
preStartCommand: {
|
|
27
27
|
type: String,
|
|
28
|
-
required: false
|
|
28
|
+
required: false,
|
|
29
29
|
},
|
|
30
30
|
buildCacheEnabled: {
|
|
31
31
|
type: Boolean,
|
|
@@ -112,7 +112,7 @@ const projectSchema = new Schema(
|
|
|
112
112
|
},
|
|
113
113
|
hasUpdates: {
|
|
114
114
|
type: Boolean,
|
|
115
|
-
default: false
|
|
115
|
+
default: false,
|
|
116
116
|
},
|
|
117
117
|
lastProcessed: Number,
|
|
118
118
|
tracking_token: String,
|
package/region.ts
CHANGED
|
@@ -11,7 +11,7 @@ const regionSchema = new Schema({
|
|
|
11
11
|
is_paid: { type: Boolean, default: false },
|
|
12
12
|
provider: { type: String, required: true },
|
|
13
13
|
provider_identifier: { type: String, required: true },
|
|
14
|
-
storage_pricing_factor: { type: Number, required: true, default: 0.25 }
|
|
14
|
+
storage_pricing_factor: { type: Number, required: true, default: 0.25 },
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
export default model<IRegion>("Region", regionSchema, "regions");
|
package/server.ts
CHANGED
|
@@ -65,7 +65,7 @@ const serverSchema = new Schema(
|
|
|
65
65
|
},
|
|
66
66
|
provider: {
|
|
67
67
|
type: String,
|
|
68
|
-
required: true
|
|
68
|
+
required: true,
|
|
69
69
|
},
|
|
70
70
|
provider_location: {
|
|
71
71
|
type: String,
|
|
@@ -77,7 +77,7 @@ const serverSchema = new Schema(
|
|
|
77
77
|
},
|
|
78
78
|
topology_path: {
|
|
79
79
|
type: String,
|
|
80
|
-
required: false
|
|
80
|
+
required: false,
|
|
81
81
|
},
|
|
82
82
|
specifications: {
|
|
83
83
|
type: Object,
|
package/subscription.ts
CHANGED
package/token.ts
CHANGED
package/types/db-image.ts
CHANGED
|
@@ -13,5 +13,5 @@ export interface IDbImage extends Document {
|
|
|
13
13
|
port: number;
|
|
14
14
|
volumePath: string;
|
|
15
15
|
protocol: string;
|
|
16
|
-
recommendations?: Array<{ cpu: string; memory: string; storage: string
|
|
16
|
+
recommendations?: Array<{ cpu: string; memory: string; storage: string }>;
|
|
17
17
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IFramework extends Document {
|
|
4
|
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
demo?: string;
|
|
7
|
+
logo: string;
|
|
8
|
+
tagline?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
website: string;
|
|
11
|
+
envPrefix?: string;
|
|
12
|
+
detector: string;
|
|
13
|
+
settings: {
|
|
14
|
+
installCommand?: string;
|
|
15
|
+
buildCommand: string;
|
|
16
|
+
outputDirectory: string;
|
|
17
|
+
};
|
|
18
|
+
createdAt?: Date;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
}
|
package/types/index.ts
CHANGED