@brimble/models 3.1.4 → 3.1.5
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 +6 -0
- package/dist/enum/index.js +8 -1
- package/dist/framework.js +23 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -2
- package/dist/types/framework.d.ts +19 -0
- package/dist/types/index.d.ts +1 -1
- package/enum/index.ts +7 -0
- package/framework.ts +23 -0
- package/index.ts +3 -0
- package/package.json +1 -1
- package/types/framework.ts +20 -0
- package/types/index.ts +1 -1
package/dist/enum/index.d.ts
CHANGED
package/dist/enum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.GIT_TYPE = void 0;
|
|
3
|
+
exports.FrameworkApplicationType = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.GIT_TYPE = void 0;
|
|
4
4
|
var GIT_TYPE;
|
|
5
5
|
(function (GIT_TYPE) {
|
|
6
6
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -168,3 +168,10 @@ var SCALING_METRIC;
|
|
|
168
168
|
SCALING_METRIC["ResponseTime"] = "RESPONSE_TIME";
|
|
169
169
|
SCALING_METRIC["CustomMetric"] = "CUSTOM_METRIC";
|
|
170
170
|
})(SCALING_METRIC = exports.SCALING_METRIC || (exports.SCALING_METRIC = {}));
|
|
171
|
+
var FrameworkApplicationType;
|
|
172
|
+
(function (FrameworkApplicationType) {
|
|
173
|
+
FrameworkApplicationType["Spa"] = "spa";
|
|
174
|
+
FrameworkApplicationType["Ssr"] = "ssr";
|
|
175
|
+
FrameworkApplicationType["Static"] = "static";
|
|
176
|
+
FrameworkApplicationType["Backend"] = "backend";
|
|
177
|
+
})(FrameworkApplicationType = exports.FrameworkApplicationType || (exports.FrameworkApplicationType = {}));
|
package/dist/framework.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
4
5
|
const frameworkSchema = new mongoose_1.Schema({
|
|
5
6
|
name: {
|
|
6
7
|
type: String,
|
|
@@ -18,6 +19,11 @@ const frameworkSchema = new mongoose_1.Schema({
|
|
|
18
19
|
type: String,
|
|
19
20
|
required: true,
|
|
20
21
|
},
|
|
22
|
+
supported: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: false,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
21
27
|
tagline: {
|
|
22
28
|
type: String,
|
|
23
29
|
required: false,
|
|
@@ -38,6 +44,15 @@ const frameworkSchema = new mongoose_1.Schema({
|
|
|
38
44
|
type: String,
|
|
39
45
|
required: true,
|
|
40
46
|
},
|
|
47
|
+
file_detectors: {
|
|
48
|
+
type: Array,
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
type: String,
|
|
53
|
+
enum: Object.values(enum_1.FrameworkApplicationType),
|
|
54
|
+
required: true,
|
|
55
|
+
},
|
|
41
56
|
settings: {
|
|
42
57
|
installCommand: {
|
|
43
58
|
type: String,
|
|
@@ -51,6 +66,14 @@ const frameworkSchema = new mongoose_1.Schema({
|
|
|
51
66
|
type: String,
|
|
52
67
|
required: true,
|
|
53
68
|
},
|
|
69
|
+
manager: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: false,
|
|
72
|
+
},
|
|
73
|
+
startCommand: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false,
|
|
76
|
+
},
|
|
54
77
|
},
|
|
55
78
|
}, { timestamps: true });
|
|
56
79
|
exports.default = (0, mongoose_1.model)("Framework", frameworkSchema, "frameworks");
|
package/dist/index.d.ts
CHANGED
|
@@ -26,8 +26,9 @@ 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 {
|
|
30
|
-
export {
|
|
29
|
+
export { default as Framework } from "./framework";
|
|
30
|
+
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, BrimbleFrameworkType } from "./types";
|
|
31
|
+
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, FrameworkApplicationType } from "./enum";
|
|
31
32
|
import mongoose from "mongoose";
|
|
32
33
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
33
34
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,8 @@ 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.
|
|
16
|
-
exports.closeMongo = exports.db = void 0;
|
|
15
|
+
exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = 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.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = exports.PlanConfiguration = exports.Liscense = exports.Job = exports.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = 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.ProjectConnection = exports.Preview = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
+
exports.closeMongo = exports.db = exports.connectToMongo = exports.FrameworkApplicationType = void 0;
|
|
17
17
|
var user_1 = require("./user");
|
|
18
18
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
19
19
|
var project_1 = require("./project");
|
|
@@ -71,6 +71,8 @@ var region_1 = require("./region");
|
|
|
71
71
|
Object.defineProperty(exports, "Region", { enumerable: true, get: function () { return __importDefault(region_1).default; } });
|
|
72
72
|
var volume_1 = require("./volume");
|
|
73
73
|
Object.defineProperty(exports, "Volume", { enumerable: true, get: function () { return __importDefault(volume_1).default; } });
|
|
74
|
+
var framework_1 = require("./framework");
|
|
75
|
+
Object.defineProperty(exports, "Framework", { enumerable: true, get: function () { return __importDefault(framework_1).default; } });
|
|
74
76
|
var enum_1 = require("./enum");
|
|
75
77
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
76
78
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
|
@@ -92,6 +94,7 @@ Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function ()
|
|
|
92
94
|
Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
|
|
93
95
|
Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: function () { return enum_1.REGION_CONTINENT; } });
|
|
94
96
|
Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
|
|
97
|
+
Object.defineProperty(exports, "FrameworkApplicationType", { enumerable: true, get: function () { return enum_1.FrameworkApplicationType; } });
|
|
95
98
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
96
99
|
const utils_1 = require("@brimble/utils");
|
|
97
100
|
const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
+
import { FrameworkApplicationType } from "../enum";
|
|
2
3
|
export interface IFramework extends Document {
|
|
3
4
|
name: string;
|
|
4
5
|
slug: string;
|
|
5
6
|
demo?: string;
|
|
6
7
|
logo: string;
|
|
7
8
|
tagline?: string;
|
|
9
|
+
supported: boolean;
|
|
8
10
|
description?: string;
|
|
9
11
|
website: string;
|
|
10
12
|
envPrefix?: string;
|
|
11
13
|
detector: string;
|
|
14
|
+
file_detectors: string[];
|
|
15
|
+
type: FrameworkApplicationType;
|
|
12
16
|
settings: {
|
|
13
17
|
installCommand?: string;
|
|
18
|
+
startCommand?: string;
|
|
14
19
|
buildCommand: string;
|
|
15
20
|
outputDirectory: string;
|
|
21
|
+
manager?: string;
|
|
16
22
|
};
|
|
17
23
|
createdAt?: Date;
|
|
18
24
|
updatedAt?: Date;
|
|
19
25
|
}
|
|
26
|
+
export type BrimbleFrameworkType = {
|
|
27
|
+
name: string;
|
|
28
|
+
slug: string;
|
|
29
|
+
logo: string;
|
|
30
|
+
installCommand: string;
|
|
31
|
+
buildCommand: string;
|
|
32
|
+
startCommand: string;
|
|
33
|
+
outputDirectory: string;
|
|
34
|
+
manager: string | null;
|
|
35
|
+
envPrefix: string;
|
|
36
|
+
supported: boolean;
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -28,4 +28,4 @@ export { IAutoScalingGroup } from "./auto-scaling-group";
|
|
|
28
28
|
export { IComputeChange } from "./compute";
|
|
29
29
|
export { IRegion } from "./region";
|
|
30
30
|
export { IVolume } from "./volume";
|
|
31
|
-
export { IFramework } from "./framework";
|
|
31
|
+
export { IFramework, BrimbleFrameworkType } from "./framework";
|
package/enum/index.ts
CHANGED
package/framework.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { model, Schema } from "mongoose";
|
|
2
2
|
import { IFramework } from "./types";
|
|
3
|
+
import { FrameworkApplicationType } from "./enum";
|
|
3
4
|
|
|
4
5
|
const frameworkSchema: Schema = new Schema(
|
|
5
6
|
{
|
|
@@ -19,6 +20,11 @@ const frameworkSchema: Schema = new Schema(
|
|
|
19
20
|
type: String,
|
|
20
21
|
required: true,
|
|
21
22
|
},
|
|
23
|
+
supported: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: false,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
22
28
|
tagline: {
|
|
23
29
|
type: String,
|
|
24
30
|
required: false,
|
|
@@ -39,6 +45,15 @@ const frameworkSchema: Schema = new Schema(
|
|
|
39
45
|
type: String,
|
|
40
46
|
required: true,
|
|
41
47
|
},
|
|
48
|
+
file_detectors: {
|
|
49
|
+
type: Array,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
type: {
|
|
53
|
+
type: String,
|
|
54
|
+
enum: Object.values(FrameworkApplicationType),
|
|
55
|
+
required: true,
|
|
56
|
+
},
|
|
42
57
|
settings: {
|
|
43
58
|
installCommand: {
|
|
44
59
|
type: String,
|
|
@@ -52,6 +67,14 @@ const frameworkSchema: Schema = new Schema(
|
|
|
52
67
|
type: String,
|
|
53
68
|
required: true,
|
|
54
69
|
},
|
|
70
|
+
manager: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: false,
|
|
73
|
+
},
|
|
74
|
+
startCommand: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: false,
|
|
77
|
+
},
|
|
55
78
|
},
|
|
56
79
|
},
|
|
57
80
|
{ timestamps: true },
|
package/index.ts
CHANGED
|
@@ -26,6 +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 { default as Framework } from "./framework";
|
|
29
30
|
|
|
30
31
|
export {
|
|
31
32
|
IUser,
|
|
@@ -59,6 +60,7 @@ export {
|
|
|
59
60
|
IRegion,
|
|
60
61
|
IVolume,
|
|
61
62
|
IFramework,
|
|
63
|
+
BrimbleFrameworkType
|
|
62
64
|
} from "./types";
|
|
63
65
|
export {
|
|
64
66
|
GIT_TYPE,
|
|
@@ -81,6 +83,7 @@ export {
|
|
|
81
83
|
LicenseStatus,
|
|
82
84
|
REGION_CONTINENT,
|
|
83
85
|
BUILD_DISABLED_BY,
|
|
86
|
+
FrameworkApplicationType
|
|
84
87
|
} from "./enum";
|
|
85
88
|
|
|
86
89
|
import mongoose from "mongoose";
|
package/package.json
CHANGED
package/types/framework.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
+
import { FrameworkApplicationType } from "../enum";
|
|
2
3
|
|
|
3
4
|
export interface IFramework extends Document {
|
|
4
5
|
name: string;
|
|
@@ -6,15 +7,34 @@ export interface IFramework extends Document {
|
|
|
6
7
|
demo?: string;
|
|
7
8
|
logo: string;
|
|
8
9
|
tagline?: string;
|
|
10
|
+
supported: boolean;
|
|
9
11
|
description?: string;
|
|
10
12
|
website: string;
|
|
11
13
|
envPrefix?: string;
|
|
12
14
|
detector: string;
|
|
15
|
+
file_detectors: string[];
|
|
16
|
+
type: FrameworkApplicationType;
|
|
13
17
|
settings: {
|
|
14
18
|
installCommand?: string;
|
|
19
|
+
startCommand?: string;
|
|
15
20
|
buildCommand: string;
|
|
16
21
|
outputDirectory: string;
|
|
22
|
+
manager?: string;
|
|
17
23
|
};
|
|
18
24
|
createdAt?: Date;
|
|
19
25
|
updatedAt?: Date;
|
|
20
26
|
}
|
|
27
|
+
|
|
28
|
+
export type BrimbleFrameworkType = {
|
|
29
|
+
name: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
logo: string;
|
|
32
|
+
installCommand: string;
|
|
33
|
+
buildCommand: string;
|
|
34
|
+
startCommand: string;
|
|
35
|
+
outputDirectory: string;
|
|
36
|
+
manager: string | null;
|
|
37
|
+
envPrefix: string;
|
|
38
|
+
supported: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
package/types/index.ts
CHANGED
|
@@ -28,4 +28,4 @@ export { IAutoScalingGroup } from "./auto-scaling-group";
|
|
|
28
28
|
export { IComputeChange } from "./compute";
|
|
29
29
|
export { IRegion } from "./region";
|
|
30
30
|
export { IVolume } from "./volume";
|
|
31
|
-
export { IFramework } from "./framework";
|
|
31
|
+
export { IFramework, BrimbleFrameworkType } from "./framework";
|