diff --git a/generators/spring-ai-llamacpp/templates/build-chat.mjs.ejs b/generators/spring-ai-llamacpp/templates/build-chat.mjs.ejs deleted file mode 100644 index f3911a7..0000000 --- a/generators/spring-ai-llamacpp/templates/build-chat.mjs.ejs +++ /dev/null @@ -1,33 +0,0 @@ -import { execSync } from 'child_process'; -import fs from 'fs-extra'; -import path from 'path'; - -async function buildChat() { - try { - const rootDir = process.cwd(); - // Ensure the target/better-chat directory exists - const targetDir = path.join(rootDir, 'target', 'better-chat'); - // Clear the directory if it exists - fs.emptyDirSync(targetDir); - - // Change direcatory to target/better-chat - process.chdir(targetDir); - - // Clone the repository - execSync('git clone https://github.com/hide212131/BetterChatGPT.git .', { stdio: 'inherit' }); - - // Install dependencies and build - execSync('npm install', { stdio: 'inherit' }); - execSync('npm run build', { stdio: 'inherit' }); - - // Copy dist/ to target/classes/static/chat-ui - const distDir = path.join(targetDir, 'dist'); - const staticDir = path.join(rootDir, 'target/classes/static/chat-ui'); - fs.copySync(distDir, staticDir); - } catch (error) { - console.error(`Error occurred: ${error.message}`); - process.exit(1); - } -} - -buildChat(); diff --git a/generators/spring-ai-llamacpp/utils-maven.mjs b/generators/spring-ai-llamacpp/utils-maven.mjs deleted file mode 100644 index 572f446..0000000 --- a/generators/spring-ai-llamacpp/utils-maven.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { XMLParser } from 'fast-xml-parser'; - -/** - * Get the elements of the pom file - * @param {*} pomContent - * @returns {Object} The elements of the pom file - */ -export const getPomElements = pomContent => { - const options = { - stopNodes: ['*.plugin'], - }; - const pom = new XMLParser(options).parse(pomContent); - return { - repositories: pom.project.repositories?.repository || [], - dependencies: pom.project.dependencies?.dependency || [], - dependencyManagement: pom.project.dependencyManagement?.dependencies?.dependency || [], - buildPlugin: pom.project.build?.plugins?.plugin || [], - properties: pom.project.properties || {}, - }; -}; diff --git a/generators/spring-ai-ollama/utils-maven.mjs b/generators/spring-ai-ollama/utils-maven.mjs deleted file mode 100644 index 572f446..0000000 --- a/generators/spring-ai-ollama/utils-maven.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { XMLParser } from 'fast-xml-parser'; - -/** - * Get the elements of the pom file - * @param {*} pomContent - * @returns {Object} The elements of the pom file - */ -export const getPomElements = pomContent => { - const options = { - stopNodes: ['*.plugin'], - }; - const pom = new XMLParser(options).parse(pomContent); - return { - repositories: pom.project.repositories?.repository || [], - dependencies: pom.project.dependencies?.dependency || [], - dependencyManagement: pom.project.dependencyManagement?.dependencies?.dependency || [], - buildPlugin: pom.project.build?.plugins?.plugin || [], - properties: pom.project.properties || {}, - }; -};