v1.0.12 - Sveltekit migration (#44)
Changed the whole tech stack to SvelteKit which means: - Typescript - SSR - No fastify :( - Beta, but it's fine! Other changes: - Tailwind -> Tailwind JIT - A lot more
This commit is contained in:
11
src/models/Logs/Application.ts
Normal file
11
src/models/Logs/Application.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import mongoose from 'mongoose';
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const ApplicationLogsSchema = new Schema({
|
||||
deployId: { type: String, required: true },
|
||||
event: { type: String, required: true }
|
||||
});
|
||||
|
||||
ApplicationLogsSchema.set('timestamps', true);
|
||||
|
||||
export default mongoose.model('logs-application', ApplicationLogsSchema);
|
||||
17
src/models/Logs/Deployment.ts
Normal file
17
src/models/Logs/Deployment.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import mongoose from 'mongoose';
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const DeploymentSchema = new Schema({
|
||||
deployId: { type: String, required: true },
|
||||
nickname: { type: String, required: true },
|
||||
repoId: { type: Number, required: true },
|
||||
organization: { type: String, required: true },
|
||||
name: { type: String, required: true },
|
||||
branch: { type: String, required: true },
|
||||
domain: { type: String, required: true },
|
||||
progress: { type: String, require: true, default: 'queued' }
|
||||
});
|
||||
|
||||
DeploymentSchema.set('timestamps', true);
|
||||
|
||||
export default mongoose.model('deployment', DeploymentSchema);
|
||||
23
src/models/Logs/Server.ts
Normal file
23
src/models/Logs/Server.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import mongoose from 'mongoose';
|
||||
import { version } from '../../../package.json';
|
||||
const { Schema, Document } = mongoose;
|
||||
|
||||
// export interface ILogsServer extends Document {
|
||||
// version: string;
|
||||
// type: string;
|
||||
// message: string;
|
||||
// stack: string;
|
||||
// seen: Boolean;
|
||||
// }
|
||||
|
||||
const LogsServerSchema = new Schema({
|
||||
version: { type: String, default: version },
|
||||
type: { type: String, required: true },
|
||||
message: { type: String, required: true },
|
||||
stack: { type: String },
|
||||
seen: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
LogsServerSchema.set('timestamps', { createdAt: 'createdAt', updatedAt: false });
|
||||
|
||||
export default mongoose.model('logs-server', LogsServerSchema);
|
||||
17
src/models/Settings.ts
Normal file
17
src/models/Settings.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import mongoose from 'mongoose';
|
||||
const { Schema } = mongoose;
|
||||
export interface ISettings extends Document {
|
||||
applicationName: string;
|
||||
allowRegistration: string;
|
||||
sendErrors: boolean;
|
||||
}
|
||||
|
||||
const SettingsSchema = new Schema({
|
||||
applicationName: { type: String, required: true, default: 'coolify' },
|
||||
allowRegistration: { type: Boolean, required: true, default: false },
|
||||
sendErrors: { type: Boolean, required: true, default: true }
|
||||
});
|
||||
|
||||
SettingsSchema.set('timestamps', true);
|
||||
|
||||
export default mongoose.model('settings', SettingsSchema);
|
||||
17
src/models/User.ts
Normal file
17
src/models/User.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import mongoose from 'mongoose';
|
||||
const { Schema } = mongoose;
|
||||
export interface IUser extends Document {
|
||||
email: string;
|
||||
avatar?: string;
|
||||
uid: string;
|
||||
}
|
||||
|
||||
const UserSchema = new Schema({
|
||||
email: { type: String, required: true, unique: true },
|
||||
avatar: { type: String },
|
||||
uid: { type: String, required: true }
|
||||
});
|
||||
|
||||
UserSchema.set('timestamps', true);
|
||||
|
||||
export default mongoose.model('user', UserSchema);
|
||||
Reference in New Issue
Block a user