@brimble/models 2.0.8 → 2.0.9
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/db-image.ts +2 -0
- package/dist/db-image.js +2 -0
- package/dist/enum/index.d.ts +8 -0
- package/dist/enum/index.js +10 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/types/db-image.d.ts +2 -1
- package/enum/index.ts +9 -0
- package/index.ts +2 -1
- package/package.json +1 -1
- package/types/db-image.ts +2 -1
package/db-image.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { model, Schema } from "mongoose";
|
|
2
2
|
import { IDbImage } from "./types";
|
|
3
|
+
import { DatabaseEngine } from "./enum";
|
|
3
4
|
|
|
4
5
|
const dbImageSchema = new Schema(
|
|
5
6
|
{
|
|
6
7
|
name: {
|
|
7
8
|
type: String,
|
|
9
|
+
enum: Object.values(DatabaseEngine),
|
|
8
10
|
required: true,
|
|
9
11
|
},
|
|
10
12
|
image_url: {
|
package/dist/db-image.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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 dbImageSchema = new mongoose_1.Schema({
|
|
5
6
|
name: {
|
|
6
7
|
type: String,
|
|
8
|
+
enum: Object.values(enum_1.DatabaseEngine),
|
|
7
9
|
required: true,
|
|
8
10
|
},
|
|
9
11
|
image_url: {
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -91,3 +91,11 @@ export declare enum ServiceType {
|
|
|
91
91
|
Database = "database",
|
|
92
92
|
WebService = "web-service"
|
|
93
93
|
}
|
|
94
|
+
export declare enum DatabaseEngine {
|
|
95
|
+
MySQL = "mysql",
|
|
96
|
+
PostgreSQL = "postgresql",
|
|
97
|
+
MongoDB = "mongodb",
|
|
98
|
+
Redis = "redis",
|
|
99
|
+
WordPress = "wordpress",
|
|
100
|
+
SQLite = "sqlite"
|
|
101
|
+
}
|
package/dist/enum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceType = 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.GIT_TYPE = void 0;
|
|
3
|
+
exports.DatabaseEngine = exports.ServiceType = 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.GIT_TYPE = void 0;
|
|
4
4
|
var GIT_TYPE;
|
|
5
5
|
(function (GIT_TYPE) {
|
|
6
6
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -109,3 +109,12 @@ var ServiceType;
|
|
|
109
109
|
ServiceType["Database"] = "database";
|
|
110
110
|
ServiceType["WebService"] = "web-service";
|
|
111
111
|
})(ServiceType = exports.ServiceType || (exports.ServiceType = {}));
|
|
112
|
+
var DatabaseEngine;
|
|
113
|
+
(function (DatabaseEngine) {
|
|
114
|
+
DatabaseEngine["MySQL"] = "mysql";
|
|
115
|
+
DatabaseEngine["PostgreSQL"] = "postgresql";
|
|
116
|
+
DatabaseEngine["MongoDB"] = "mongodb";
|
|
117
|
+
DatabaseEngine["Redis"] = "redis";
|
|
118
|
+
DatabaseEngine["WordPress"] = "wordpress";
|
|
119
|
+
DatabaseEngine["SQLite"] = "sqlite";
|
|
120
|
+
})(DatabaseEngine = exports.DatabaseEngine || (exports.DatabaseEngine = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { default as Server } from "./server";
|
|
|
19
19
|
export { default as Wallet } from "./wallet";
|
|
20
20
|
export { default as DbImage } from "./db-image";
|
|
21
21
|
export { IUser, IGit, IProject, IPreview, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage } from "./types";
|
|
22
|
-
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 } from "./enum";
|
|
22
|
+
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 } from "./enum";
|
|
23
23
|
import mongoose from "mongoose";
|
|
24
24
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
25
25
|
export declare const db: mongoose.Connection;
|
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.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.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.Preview = exports.Project = exports.User = void 0;
|
|
15
|
+
exports.closeMongo = exports.db = exports.connectToMongo = 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.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.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");
|
|
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "DNS_TYPE", { enumerable: true, get: function ()
|
|
|
69
69
|
Object.defineProperty(exports, "PERMISSION_TYPE", { enumerable: true, get: function () { return enum_1.PERMISSION_TYPE; } });
|
|
70
70
|
Object.defineProperty(exports, "REQUEST_TYPE", { enumerable: true, get: function () { return enum_1.REQUEST_TYPE; } });
|
|
71
71
|
Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return enum_1.ServiceType; } });
|
|
72
|
+
Object.defineProperty(exports, "DatabaseEngine", { enumerable: true, get: function () { return enum_1.DatabaseEngine; } });
|
|
72
73
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
73
74
|
const utils_1 = require("@brimble/utils");
|
|
74
75
|
const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
|
package/dist/types/db-image.d.ts
CHANGED
package/enum/index.ts
CHANGED
|
@@ -104,4 +104,13 @@ export enum PERMISSION_TYPE {
|
|
|
104
104
|
export enum ServiceType {
|
|
105
105
|
Database = 'database',
|
|
106
106
|
WebService = 'web-service',
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export enum DatabaseEngine {
|
|
110
|
+
MySQL = 'mysql',
|
|
111
|
+
PostgreSQL = 'postgresql',
|
|
112
|
+
MongoDB = 'mongodb',
|
|
113
|
+
Redis = 'redis',
|
|
114
|
+
WordPress = 'wordpress',
|
|
115
|
+
SQLite = 'sqlite',
|
|
107
116
|
}
|
package/index.ts
CHANGED
package/package.json
CHANGED