Uploaded Entire Project

This commit is contained in:
2026-03-30 02:49:58 +01:00
commit f0162fd38a
12 changed files with 107 additions and 0 deletions

16
package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "crawler-es6",
"version": "1.0.0",
"description": "Automated flow and selector crawler using ES6 modules",
"type": "module",
"main": "src/pipeline.js",
"scripts": {
"crawl-flows": "node src/pipeline.js crawl-flows",
"crawl-selectors": "node src/pipeline.js crawl-selectors",
"generate-tests": "node src/pipeline.js generate-tests",
"run-tests": "node src/pipeline.js run-tests",
"generate-graph": "node src/pipeline.js generate-graph"
},
"author": "",
"license": "MIT"
}

View File

@@ -0,0 +1,5 @@
import { runFlowGenerator } from './flowGeneratorImpl.js';
export default class FlowGenerator {
run = runFlowGenerator;
}

View File

@@ -0,0 +1,4 @@
export async function runFlowGenerator() {
console.log("Flow generator placeholder.");
// TODO: generate flows.json
}

View File

@@ -0,0 +1,5 @@
import { runGraphGenerator } from './graphGeneratorImpl.js';
export default class GraphGenerator {
run = runGraphGenerator;
}

View File

@@ -0,0 +1,4 @@
export async function runGraphGenerator() {
console.log("Graph generator placeholder.");
// TODO: read flows.json + status.json and generate graph data
}

46
src/pipeline.js Normal file
View File

@@ -0,0 +1,46 @@
import FlowGenerator from './flows/FlowGenerator.js';
import SelectorCrawler from './selectors/SelectorCrawler.js';
import TestGenerator from './tests/TestGenerator.js';
import TestExecutor from './tests/TestExecutor.js';
import GraphGenerator from './graph/GraphGenerator.js';
const command = process.argv[2];
if (!command) {
console.log(`
Usage: node src/pipeline.js <command>
Available commands:
crawl-flows Generate flows.json
crawl-selectors Crawl selectors using flows.json
generate-tests Generate test files
run-tests Execute generated tests
generate-graph Produce graph data from results
`);
process.exit(0);
}
switch (command) {
case 'crawl-flows':
await new FlowGenerator().run();
break;
case 'crawl-selectors':
await new SelectorCrawler().run();
break;
case 'generate-tests':
await new TestGenerator().run();
break;
case 'run-tests':
await new TestExecutor().run();
break;
case 'generate-graph':
await new GraphGenerator().run();
break;
default:
console.log(`Unknown command: ${command}`);
}

View File

@@ -0,0 +1,5 @@
import { runSelectorCrawler } from './selectorCrawlerImpl.js';
export default class SelectorCrawler {
run = runSelectorCrawler;
}

View File

@@ -0,0 +1,4 @@
export async function runSelectorCrawler() {
console.log("Selector crawler placeholder.");
// TODO: read flows.json and crawl selectors
}

View File

@@ -0,0 +1,5 @@
import { runTestExecutor } from './testExecutorImpl.js';
export default class TestExecutor {
run = runTestExecutor;
}

View File

@@ -0,0 +1,5 @@
import { runTestGenerator } from './testGeneratorImpl.js';
export default class TestGenerator {
run = runTestGenerator;
}

View File

@@ -0,0 +1,4 @@
export async function runTestExecutor() {
console.log("Test executor placeholder.");
// TODO: run tests and write status.json
}

View File

@@ -0,0 +1,4 @@
export async function runTestGenerator() {
console.log("Test generator placeholder.");
// TODO: read flows.json + selectors.json and generate tests
}