diff --git a/backend/src/build-system/__tests__/test-database-schemas.spec.ts b/backend/src/build-system/__tests__/test-database-schemas.spec.ts index a7224af..b95108f 100644 --- a/backend/src/build-system/__tests__/test-database-schemas.spec.ts +++ b/backend/src/build-system/__tests__/test-database-schemas.spec.ts @@ -1,5 +1,5 @@ import { BuilderContext } from 'src/build-system/context'; -import { DBSchemaHandler } from '../node/database-schemas/schemas'; +import { DBSchemaHandler } from '../handlers/database/schemas/schemas'; import { readFileSync } from 'fs'; import markdownToTxt from 'markdown-to-txt'; diff --git a/backend/src/build-system/__tests__/test-file-create.spec.ts b/backend/src/build-system/__tests__/test-file-create.spec.ts index 5c195c2..f2ca5cd 100644 --- a/backend/src/build-system/__tests__/test-file-create.spec.ts +++ b/backend/src/build-system/__tests__/test-file-create.spec.ts @@ -1,6 +1,6 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import { FileGeneratorHandler } from '../node/file-generate'; // Update with actual file path to the handler +import { FileGeneratorHandler } from '../handlers/file-generate'; // Update with actual file path to the handler describe('FileGeneratorHandler', () => { const projectSrcPath = 'src\\build-system\\__tests__\\test-project\\'; diff --git a/backend/src/build-system/__tests__/test.file-arch.spec.ts b/backend/src/build-system/__tests__/test.file-arch.spec.ts index 4aab1e9..7627185 100644 --- a/backend/src/build-system/__tests__/test.file-arch.spec.ts +++ b/backend/src/build-system/__tests__/test.file-arch.spec.ts @@ -1,5 +1,5 @@ import { BuilderContext } from 'src/build-system/context'; -import { FileArchGenerateHandler } from '../node/file-arch'; +import { FileArchGenerateHandler } from '../handlers/file-arch'; import markdownToTxt from 'markdown-to-txt'; import { readFileSync } from 'fs-extra'; diff --git a/backend/src/build-system/__tests__/test.spec.ts b/backend/src/build-system/__tests__/test.spec.ts index 40ea0e6..7e132c6 100644 --- a/backend/src/build-system/__tests__/test.spec.ts +++ b/backend/src/build-system/__tests__/test.spec.ts @@ -2,7 +2,7 @@ import { BuilderContext } from '../context'; import { BuildSequenceExecutor } from '../executor'; import { BuildHandlerManager } from '../hanlder-manager'; -import { ProjectInitHandler } from '../node/project-init'; +import { ProjectInitHandler } from '../handlers/project-init'; import { BuildSequence } from '../types'; describe('Project Init Handler Test', () => { let context: BuilderContext; diff --git a/backend/src/build-system/node/backend-code-generate/index.ts b/backend/src/build-system/handlers/backend/code-generate/index.ts similarity index 100% rename from backend/src/build-system/node/backend-code-generate/index.ts rename to backend/src/build-system/handlers/backend/code-generate/index.ts diff --git a/backend/src/build-system/node/backend-code-generate/prompt.ts b/backend/src/build-system/handlers/backend/code-generate/prompt.ts similarity index 100% rename from backend/src/build-system/node/backend-code-generate/prompt.ts rename to backend/src/build-system/handlers/backend/code-generate/prompt.ts diff --git a/backend/src/build-system/node/backend-requirements-document/index.ts b/backend/src/build-system/handlers/backend/requirements-document/index.ts similarity index 100% rename from backend/src/build-system/node/backend-requirements-document/index.ts rename to backend/src/build-system/handlers/backend/requirements-document/index.ts diff --git a/backend/src/build-system/node/backend-requirements-document/prompt.ts b/backend/src/build-system/handlers/backend/requirements-document/prompt.ts similarity index 100% rename from backend/src/build-system/node/backend-requirements-document/prompt.ts rename to backend/src/build-system/handlers/backend/requirements-document/prompt.ts diff --git a/backend/src/build-system/node/database-requirements-document/index.ts b/backend/src/build-system/handlers/database/requirements-document/index.ts similarity index 100% rename from backend/src/build-system/node/database-requirements-document/index.ts rename to backend/src/build-system/handlers/database/requirements-document/index.ts diff --git a/backend/src/build-system/node/database-requirements-document/prompt.ts b/backend/src/build-system/handlers/database/requirements-document/prompt.ts similarity index 100% rename from backend/src/build-system/node/database-requirements-document/prompt.ts rename to backend/src/build-system/handlers/database/requirements-document/prompt.ts diff --git a/backend/src/build-system/node/database-schemas/prompt.ts b/backend/src/build-system/handlers/database/schemas/prompt.ts similarity index 99% rename from backend/src/build-system/node/database-schemas/prompt.ts rename to backend/src/build-system/handlers/database/schemas/prompt.ts index 8949664..caed72d 100644 --- a/backend/src/build-system/node/database-schemas/prompt.ts +++ b/backend/src/build-system/handlers/database/schemas/prompt.ts @@ -1,5 +1,3 @@ -// src/build-system/prompts.ts - /** * Collection of prompt functions used for various build system operations. */ diff --git a/backend/src/build-system/node/database-schemas/schemas.ts b/backend/src/build-system/handlers/database/schemas/schemas.ts similarity index 99% rename from backend/src/build-system/node/database-schemas/schemas.ts rename to backend/src/build-system/handlers/database/schemas/schemas.ts index 9de4f42..e0b4424 100644 --- a/backend/src/build-system/node/database-schemas/schemas.ts +++ b/backend/src/build-system/handlers/database/schemas/schemas.ts @@ -7,7 +7,7 @@ import { getSupportedDatabaseTypes, isSupportedDatabaseType, parseGenerateTag, -} from '../../utils/database-utils'; +} from '../../../utils/database-utils'; import { writeFile } from 'fs-extra'; import { prompts } from './prompt'; diff --git a/backend/src/build-system/node/file-arch/index.ts b/backend/src/build-system/handlers/file-manager/file-arch/index.ts similarity index 98% rename from backend/src/build-system/node/file-arch/index.ts rename to backend/src/build-system/handlers/file-manager/file-arch/index.ts index 280251b..840b1fc 100644 --- a/backend/src/build-system/node/file-arch/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-arch/index.ts @@ -2,7 +2,7 @@ import { BuildHandler, BuildResult } from 'src/build-system/types'; import { BuilderContext } from 'src/build-system/context'; import { generateFileArchPrompt } from './prompt'; import { Logger } from '@nestjs/common'; -import { FileUtil } from 'src/build-system/util'; +import { FileUtil } from 'src/build-system/utils/util'; export class FileArchGenerateHandler implements BuildHandler { readonly id = 'op:FILE_ARCH::STATE:GENERATE'; diff --git a/backend/src/build-system/node/file-arch/prompt.ts b/backend/src/build-system/handlers/file-manager/file-arch/prompt.ts similarity index 100% rename from backend/src/build-system/node/file-arch/prompt.ts rename to backend/src/build-system/handlers/file-manager/file-arch/prompt.ts diff --git a/backend/src/build-system/node/file-generate/index.ts b/backend/src/build-system/handlers/file-manager/file-generate/index.ts similarity index 98% rename from backend/src/build-system/node/file-generate/index.ts rename to backend/src/build-system/handlers/file-manager/file-generate/index.ts index 446084f..8a5a34e 100644 --- a/backend/src/build-system/node/file-generate/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-generate/index.ts @@ -2,10 +2,10 @@ import * as fs from 'fs/promises'; import * as path from 'path'; import { Logger } from '@nestjs/common'; import * as toposort from 'toposort'; -import { VirtualDirectory } from '../../virtual-dir'; +import { VirtualDirectory } from '../../../virtual-dir'; import { BuilderContext } from 'src/build-system/context'; import { BuildHandler, BuildResult } from 'src/build-system/types'; -import { FileUtil } from 'src/build-system/util'; +import { FileUtil } from 'src/build-system/utils/util'; export class FileGeneratorHandler { private readonly logger = new Logger('FileGeneratorHandler'); diff --git a/backend/src/build-system/node/file-structure/index.ts b/backend/src/build-system/handlers/file-manager/file-structure/index.ts similarity index 100% rename from backend/src/build-system/node/file-structure/index.ts rename to backend/src/build-system/handlers/file-manager/file-structure/index.ts diff --git a/backend/src/build-system/node/file-structure/prompt.ts b/backend/src/build-system/handlers/file-manager/file-structure/prompt.ts similarity index 100% rename from backend/src/build-system/node/file-structure/prompt.ts rename to backend/src/build-system/handlers/file-manager/file-structure/prompt.ts diff --git a/backend/src/build-system/node/frontend-code-generate/prompt.ts b/backend/src/build-system/handlers/frontend-code-generate/prompt.ts similarity index 100% rename from backend/src/build-system/node/frontend-code-generate/prompt.ts rename to backend/src/build-system/handlers/frontend-code-generate/prompt.ts diff --git a/backend/src/build-system/node/product-requirements-document/prd.ts b/backend/src/build-system/handlers/product-manager/product-requirements-document/prd.ts similarity index 97% rename from backend/src/build-system/node/product-requirements-document/prd.ts rename to backend/src/build-system/handlers/product-manager/product-requirements-document/prd.ts index fc386f0..bd65555 100644 --- a/backend/src/build-system/node/product-requirements-document/prd.ts +++ b/backend/src/build-system/handlers/product-manager/product-requirements-document/prd.ts @@ -1,6 +1,6 @@ import { BuildHandler, BuildResult } from 'src/build-system/types'; import { BuilderContext } from 'src/build-system/context'; -import { prompts } from './prompt/prompt'; +import { prompts } from './prompt'; import { ModelProvider } from 'src/common/model-provider'; import { Logger } from '@nestjs/common'; diff --git a/backend/src/build-system/node/product-requirements-document/prompt/prompt.ts b/backend/src/build-system/handlers/product-manager/product-requirements-document/prompt.ts similarity index 100% rename from backend/src/build-system/node/product-requirements-document/prompt/prompt.ts rename to backend/src/build-system/handlers/product-manager/product-requirements-document/prompt.ts diff --git a/backend/src/build-system/node/project-init.ts b/backend/src/build-system/handlers/project-init.ts similarity index 100% rename from backend/src/build-system/node/project-init.ts rename to backend/src/build-system/handlers/project-init.ts diff --git a/backend/src/build-system/node/ux-datamap/index.ts b/backend/src/build-system/handlers/ux/datamap/index.ts similarity index 100% rename from backend/src/build-system/node/ux-datamap/index.ts rename to backend/src/build-system/handlers/ux/datamap/index.ts diff --git a/backend/src/build-system/node/ux-datamap/prompt.ts b/backend/src/build-system/handlers/ux/datamap/prompt.ts similarity index 100% rename from backend/src/build-system/node/ux-datamap/prompt.ts rename to backend/src/build-system/handlers/ux/datamap/prompt.ts diff --git a/backend/src/build-system/node/ux-sitemap-document/prompt/prompt.ts b/backend/src/build-system/handlers/ux/sitemap-document/prompt/prompt.ts similarity index 100% rename from backend/src/build-system/node/ux-sitemap-document/prompt/prompt.ts rename to backend/src/build-system/handlers/ux/sitemap-document/prompt/prompt.ts diff --git a/backend/src/build-system/node/ux-sitemap-document/uxsmd.ts b/backend/src/build-system/handlers/ux/sitemap-document/uxsmd.ts similarity index 100% rename from backend/src/build-system/node/ux-sitemap-document/uxsmd.ts rename to backend/src/build-system/handlers/ux/sitemap-document/uxsmd.ts diff --git a/backend/src/build-system/node/ux-sitemap-structure/index.ts b/backend/src/build-system/handlers/ux/sitemap-structure/index.ts similarity index 100% rename from backend/src/build-system/node/ux-sitemap-structure/index.ts rename to backend/src/build-system/handlers/ux/sitemap-structure/index.ts diff --git a/backend/src/build-system/node/ux-sitemap-structure/prompt.ts b/backend/src/build-system/handlers/ux/sitemap-structure/prompt.ts similarity index 100% rename from backend/src/build-system/node/ux-sitemap-structure/prompt.ts rename to backend/src/build-system/handlers/ux/sitemap-structure/prompt.ts diff --git a/backend/src/build-system/hanlder-manager.ts b/backend/src/build-system/hanlder-manager.ts index b02a585..1e5bd56 100644 --- a/backend/src/build-system/hanlder-manager.ts +++ b/backend/src/build-system/hanlder-manager.ts @@ -1,13 +1,13 @@ -import { ProjectInitHandler } from './node/project-init'; +import { ProjectInitHandler } from './handlers/project-init'; import { BuildHandler } from './types'; -import { PRDHandler } from './node/product-requirements-document/prd'; -import { UXSitemapStructureHandler } from './node/ux-sitemap-structure'; -import { UXDatamapHandler } from './node/ux-datamap'; -import { UXSMDHandler } from './node/ux-sitemap-document/uxsmd'; -import { FileStructureHandler } from './node/file-structure'; -import { FileArchGenerateHandler } from './node/file-arch'; -import { BackendCodeHandler } from './node/backend-code-generate'; -import { DBSchemaHandler } from './node/database-schemas/schemas'; +import { PRDHandler } from './handlers/product-manager/product-requirements-document/prd'; +import { UXSitemapStructureHandler } from './handlers/ux/sitemap-structure'; +import { UXDatamapHandler } from './handlers/ux/datamap'; +import { UXSMDHandler } from './handlers/ux/sitemap-document/uxsmd'; +import { FileStructureHandler } from './handlers/file-manager/file-structure'; +import { FileArchGenerateHandler } from './handlers/file-manager/file-arch'; +import { BackendCodeHandler } from './handlers/backend/code-generate'; +import { DBSchemaHandler } from './handlers/database/schemas/schemas'; export class BuildHandlerManager { private static instance: BuildHandlerManager; diff --git a/backend/src/build-system/util.ts b/backend/src/build-system/utils/util.ts similarity index 100% rename from backend/src/build-system/util.ts rename to backend/src/build-system/utils/util.ts diff --git a/backend/src/build-system/virtual-dir.ts b/backend/src/build-system/virtual-dir/index.ts similarity index 100% rename from backend/src/build-system/virtual-dir.ts rename to backend/src/build-system/virtual-dir/index.ts