feat: add web and Electron reverse-engineering workflows
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
import { NATIVE_TOOL_CONTRACTS } from "../src/contracts/nativeToolContracts.js";
|
||||
import { ARTIFACT_TOOL_CONTRACTS } from "../src/contracts/artifactToolContracts.js";
|
||||
import { BROWSER_TOOL_CONTRACTS } from "../src/contracts/browserToolContracts.js";
|
||||
import { ELECTRON_TOOL_CONTRACTS } from "../src/contracts/electronToolContracts.js";
|
||||
|
||||
const readmes = [
|
||||
"README.md",
|
||||
@@ -26,14 +27,15 @@ const expectedToolCounts = [
|
||||
NATIVE_TOOL_CONTRACTS.length,
|
||||
ARTIFACT_TOOL_CONTRACTS.length,
|
||||
BROWSER_TOOL_CONTRACTS.length,
|
||||
ELECTRON_TOOL_CONTRACTS.length,
|
||||
SESSION_TOOL_CONTRACTS.length,
|
||||
] as const;
|
||||
|
||||
const toolCountsFromReadme = (content: string, path: string): number[] => {
|
||||
const lines = content.split(/\r?\n/u);
|
||||
const headingIndex = lines.findIndex((line) => /^## .*70/u.test(line));
|
||||
const headingIndex = lines.findIndex((line) => /^## .*78/u.test(line));
|
||||
if (headingIndex === -1)
|
||||
throw new Error(`Missing 70-tool heading in ${path}`);
|
||||
throw new Error(`Missing 78-tool heading in ${path}`);
|
||||
|
||||
const counts: number[] = [];
|
||||
for (const line of lines.slice(headingIndex + 1)) {
|
||||
|
||||
Reference in New Issue
Block a user