Skip to content

Commit d071f0c

Browse files
feat(backend): adding BuildMonitor and remove BuildExecutor (#79)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent c1a8d5e commit d071f0c

28 files changed

+1747
-768
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ models/
1515
*/**/models/
1616

1717
*/**/database.sqlite
18-
./backend/src/database.sqlite
18+
./backend/src/database.sqlite
19+
.codefox

backend/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@types/fs-extra": "^11.0.4",
4242
"@types/normalize-path": "^3.0.2",
4343
"@types/toposort": "^2.0.7",
44+
"toposort": "^2.0.2",
4445
"axios": "^1.7.7",
4546
"bcrypt": "^5.1.1",
4647
"class-validator": "^0.14.1",

backend/src/build-system/__tests__/test-generate-doc.spec.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable no-console */
22
import { BuilderContext } from 'src/build-system/context';
33
import { BuildSequence } from '../types';
4-
import { BuildSequenceExecutor } from '../executor';
54
import * as fs from 'fs';
65
import * as path from 'path';
76
import { writeToFile } from './utils';
@@ -26,8 +25,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
2625
{
2726
id: 'op:PRD',
2827
name: 'PRD Generation Node',
29-
type: 'ANALYSIS',
30-
subType: 'PRD',
3128
},
3229
],
3330
},
@@ -38,8 +35,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
3835
{
3936
id: 'op:UX:SMD',
4037
name: 'UX Sitemap Document Node',
41-
type: 'UX',
42-
subType: 'SITEMAP',
4338
requires: ['op:PRD'],
4439
},
4540
],
@@ -51,8 +46,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
5146
{
5247
id: 'op:UX:SMS',
5348
name: 'UX Sitemap Structure Node',
54-
type: 'UX',
55-
subType: 'VIEWS',
5649
requires: ['op:UX:SMD'],
5750
},
5851
],
@@ -108,7 +101,7 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS', () => {
108101
context.setGlobalContext('platform', 'web');
109102

110103
try {
111-
await BuildSequenceExecutor.executeSequence(sequence, context);
104+
await context.execute();
112105

113106
for (const step of sequence.steps) {
114107
for (const node of step.nodes) {

backend/src/build-system/__tests__/test.backend-code-generator.spec.ts

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable no-console */
22
import { BuilderContext } from 'src/build-system/context';
33
import { BuildSequence } from '../types';
4-
import { BuildSequenceExecutor } from '../executor';
54
import * as fs from 'fs';
65
import * as path from 'path';
76
import { writeToFile } from './utils';
@@ -28,8 +27,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
2827
{
2928
id: 'op:PRD',
3029
name: 'PRD Generation Node',
31-
type: 'ANALYSIS',
32-
subType: 'PRD',
3330
},
3431
],
3532
},
@@ -40,8 +37,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
4037
{
4138
id: 'op:UX:SMD',
4239
name: 'UX Sitemap Document Node',
43-
type: 'UX',
44-
subType: 'SITEMAP',
4540
requires: ['op:PRD'],
4641
},
4742
],
@@ -53,8 +48,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
5348
{
5449
id: 'op:UX:DATAMAP:DOC',
5550
name: 'UX Data Map Document Node',
56-
type: 'UX',
57-
subType: 'DATAMAP',
5851
requires: ['op:UX:SMD'],
5952
},
6053
],
@@ -66,8 +59,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
6659
{
6760
id: 'op:DATABASE_REQ',
6861
name: 'Database Requirements Node',
69-
type: 'DATABASE',
70-
subType: 'SCHEMAS',
7162
requires: ['op:UX:DATAMAP:DOC'],
7263
},
7364
],
@@ -79,8 +70,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
7970
{
8071
id: 'op:DATABASE:SCHEMAS',
8172
name: 'Database Schemas Node',
82-
type: 'DATABASE',
83-
subType: 'SCHEMAS',
8473
requires: ['op:DATABASE_REQ'],
8574
},
8675
],
@@ -92,7 +81,6 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
9281
{
9382
id: 'op:BACKEND:CODE',
9483
name: 'Backend Code Generator Node',
95-
type: 'BACKEND',
9684
requires: ['op:DATABASE:SCHEMAS', 'op:UX:DATAMAP:DOC'],
9785
},
9886
],
@@ -105,7 +93,7 @@ describe('Sequence: PRD -> UXSD -> UXDD -> UXSS -> DBSchemas -> BackendCodeGener
10593

10694
try {
10795
// Execute the build sequence
108-
await BuildSequenceExecutor.executeSequence(sequence, context);
96+
await context.execute();
10997

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

0 commit comments

Comments
 (0)