Skip to content

Commit

Permalink
feat(backend): adding BuildMonitor and remove BuildExecutor (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
Sma1lboy and autofix-ci[bot] authored Dec 24, 2024
1 parent c1a8d5e commit d071f0c
Show file tree
Hide file tree
Showing 28 changed files with 1,747 additions and 768 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ models/
*/**/models/

*/**/database.sqlite
./backend/src/database.sqlite
./backend/src/database.sqlite
.codefox
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@types/fs-extra": "^11.0.4",
"@types/normalize-path": "^3.0.2",
"@types/toposort": "^2.0.7",
"toposort": "^2.0.2",
"axios": "^1.7.7",
"bcrypt": "^5.1.1",
"class-validator": "^0.14.1",
Expand Down
9 changes: 1 addition & 8 deletions backend/src/build-system/__tests__/test-generate-doc.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-console */
import { BuilderContext } from 'src/build-system/context';
import { BuildSequence } from '../types';
import { BuildSequenceExecutor } from '../executor';
import * as fs from 'fs';
import * as path from 'path';
import { writeToFile } from './utils';
Expand All @@ -26,8 +25,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
{
id: 'op:PRD',
name: 'PRD Generation Node',
type: 'ANALYSIS',
subType: 'PRD',
},
],
},
Expand All @@ -38,8 +35,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
{
id: 'op:UX:SMD',
name: 'UX Sitemap Document Node',
type: 'UX',
subType: 'SITEMAP',
requires: ['op:PRD'],
},
],
Expand All @@ -51,8 +46,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
{
id: 'op:UX:SMS',
name: 'UX Sitemap Structure Node',
type: 'UX',
subType: 'VIEWS',
requires: ['op:UX:SMD'],
},
],
Expand Down Expand Up @@ -108,7 +101,7 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
context.setGlobalContext('platform', 'web');

try {
await BuildSequenceExecutor.executeSequence(sequence, context);
await context.execute();

for (const step of sequence.steps) {
for (const node of step.nodes) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-console */
import { BuilderContext } from 'src/build-system/context';
import { BuildSequence } from '../types';
import { BuildSequenceExecutor } from '../executor';
import * as fs from 'fs';
import * as path from 'path';
import { writeToFile } from './utils';
Expand All @@ -28,8 +27,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:PRD',
name: 'PRD Generation Node',
type: 'ANALYSIS',
subType: 'PRD',
},
],
},
Expand All @@ -40,8 +37,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:UX:SMD',
name: 'UX Sitemap Document Node',
type: 'UX',
subType: 'SITEMAP',
requires: ['op:PRD'],
},
],
Expand All @@ -53,8 +48,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:UX:DATAMAP:DOC',
name: 'UX Data Map Document Node',
type: 'UX',
subType: 'DATAMAP',
requires: ['op:UX:SMD'],
},
],
Expand All @@ -66,8 +59,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:DATABASE_REQ',
name: 'Database Requirements Node',
type: 'DATABASE',
subType: 'SCHEMAS',
requires: ['op:UX:DATAMAP:DOC'],
},
],
Expand All @@ -79,8 +70,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:DATABASE:SCHEMAS',
name: 'Database Schemas Node',
type: 'DATABASE',
subType: 'SCHEMAS',
requires: ['op:DATABASE_REQ'],
},
],
Expand All @@ -92,7 +81,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
{
id: 'op:BACKEND:CODE',
name: 'Backend Code Generator Node',
type: 'BACKEND',
requires: ['op:DATABASE:SCHEMAS', 'op:UX:DATAMAP:DOC'],
},
],
Expand All @@ -105,7 +93,7 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener

try {
// Execute the build sequence
await BuildSequenceExecutor.executeSequence(sequence, context);
await context.execute();

// Iterate through each step and node to retrieve and log results
for (const step of sequence.steps) {
Expand Down
Loading

0 comments on commit d071f0c

Please sign in to comment.