mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove unused files
This commit is contained in:
@@ -2,10 +2,6 @@ import { randomBytes } from "node:crypto";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import type { Domain } from "@/server/services/domain";
|
||||
// import { IS_CLOUD } from "@/server/constants";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { templates } from "../templates";
|
||||
import type { TemplatesKeys } from "../types/templates-data.type";
|
||||
|
||||
export interface Schema {
|
||||
serverIp: string;
|
||||
@@ -48,21 +44,6 @@ export const generateBase64 = (bytes = 32): string => {
|
||||
return randomBytes(bytes).toString("base64");
|
||||
};
|
||||
|
||||
export const loadTemplateModule = async (
|
||||
id: TemplatesKeys,
|
||||
): Promise<(schema: Schema) => Template> => {
|
||||
const templateLoader = templates.find((t) => t.id === id);
|
||||
if (!templateLoader) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: `Template ${id} not found or not implemented yet`,
|
||||
});
|
||||
}
|
||||
|
||||
const generate = await templateLoader.load();
|
||||
return generate;
|
||||
};
|
||||
|
||||
export const readTemplateComposeFile = async (id: string) => {
|
||||
const cwd = process.cwd();
|
||||
const composeFile = await readFile(
|
||||
|
||||
Reference in New Issue
Block a user