@brimble/models 3.1.1 → 3.1.3

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.
@@ -142,3 +142,9 @@ export declare enum SCALING_METRIC {
142
142
  ResponseTime = "RESPONSE_TIME",
143
143
  CustomMetric = "CUSTOM_METRIC"
144
144
  }
145
+ export declare enum FrameworkApplicationType {
146
+ Spa = "spa",
147
+ Ssr = "ssr",
148
+ Static = "static",
149
+ Backend = "backend"
150
+ }
@@ -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";
@@ -167,3 +167,10 @@ var SCALING_METRIC;
167
167
  SCALING_METRIC["ResponseTime"] = "RESPONSE_TIME";
168
168
  SCALING_METRIC["CustomMetric"] = "CUSTOM_METRIC";
169
169
  })(SCALING_METRIC = exports.SCALING_METRIC || (exports.SCALING_METRIC = {}));
170
+ var FrameworkApplicationType;
171
+ (function (FrameworkApplicationType) {
172
+ FrameworkApplicationType["Spa"] = "spa";
173
+ FrameworkApplicationType["Ssr"] = "ssr";
174
+ FrameworkApplicationType["Static"] = "static";
175
+ FrameworkApplicationType["Backend"] = "backend";
176
+ })(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,
@@ -47,6 +48,11 @@ const frameworkSchema = new mongoose_1.Schema({
47
48
  type: Array,
48
49
  required: false
49
50
  },
51
+ type: {
52
+ type: String,
53
+ enum: Object.values(enum_1.FrameworkApplicationType),
54
+ required: true,
55
+ },
50
56
  settings: {
51
57
  installCommand: {
52
58
  type: String,
package/dist/index.d.ts CHANGED
@@ -27,8 +27,8 @@ export { default as ComputeChange } from "./compute";
27
27
  export { default as Region } from "./region";
28
28
  export { default as Volume } from "./volume";
29
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, } 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, } from "./enum";
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";
32
32
  import mongoose from "mongoose";
33
33
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
34
34
  export declare const db: mongoose.Connection;
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
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 = 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");
@@ -94,6 +94,7 @@ Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function ()
94
94
  Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
95
95
  Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: function () { return enum_1.REGION_CONTINENT; } });
96
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; } });
97
98
  const mongoose_1 = __importDefault(require("mongoose"));
98
99
  const utils_1 = require("@brimble/utils");
99
100
  const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,4 +1,5 @@
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;
@@ -11,6 +12,7 @@ export interface IFramework extends Document {
11
12
  envPrefix?: string;
12
13
  detector: string;
13
14
  file_detectors: string[];
15
+ type: FrameworkApplicationType;
14
16
  settings: {
15
17
  installCommand?: string;
16
18
  startCommand?: string;
@@ -21,3 +23,16 @@ export interface IFramework extends Document {
21
23
  createdAt?: Date;
22
24
  updatedAt?: Date;
23
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
+ };
@@ -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
@@ -163,3 +163,10 @@ export enum SCALING_METRIC {
163
163
  ResponseTime = "RESPONSE_TIME",
164
164
  CustomMetric = "CUSTOM_METRIC",
165
165
  }
166
+
167
+ export enum FrameworkApplicationType {
168
+ Spa = 'spa',
169
+ Ssr = 'ssr',
170
+ Static = 'static',
171
+ Backend = 'backend'
172
+ }
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
  {
@@ -48,6 +49,11 @@ const frameworkSchema: Schema = new Schema(
48
49
  type: Array,
49
50
  required: false
50
51
  },
52
+ type: {
53
+ type: String,
54
+ enum: Object.values(FrameworkApplicationType),
55
+ required: true,
56
+ },
51
57
  settings: {
52
58
  installCommand: {
53
59
  type: String,
package/index.ts CHANGED
@@ -60,6 +60,7 @@ export {
60
60
  IRegion,
61
61
  IVolume,
62
62
  IFramework,
63
+ BrimbleFrameworkType
63
64
  } from "./types";
64
65
  export {
65
66
  GIT_TYPE,
@@ -82,6 +83,7 @@ export {
82
83
  LicenseStatus,
83
84
  REGION_CONTINENT,
84
85
  BUILD_DISABLED_BY,
86
+ FrameworkApplicationType
85
87
  } from "./enum";
86
88
 
87
89
  import mongoose from "mongoose";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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;
@@ -12,6 +13,7 @@ export interface IFramework extends Document {
12
13
  envPrefix?: string;
13
14
  detector: string;
14
15
  file_detectors: string[];
16
+ type: FrameworkApplicationType;
15
17
  settings: {
16
18
  installCommand?: string;
17
19
  startCommand?: string;
@@ -22,3 +24,17 @@ export interface IFramework extends Document {
22
24
  createdAt?: Date;
23
25
  updatedAt?: Date;
24
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";