@abhinav2203/codeflow-core 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/build.d.ts +1 -1
- package/dist/analyzer/build.js +6 -6
- package/dist/analyzer/index.d.ts +2 -2
- package/dist/analyzer/index.js +2 -2
- package/dist/analyzer/repo.d.ts +1 -1
- package/dist/analyzer/repo.js +2 -2
- package/dist/conflicts/index.d.ts +1 -1
- package/dist/conflicts/index.js +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/export/index.js +4 -4
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/internal/codegen.d.ts +1 -1
- package/dist/internal/codegen.js +1 -1
- package/dist/internal/phases.d.ts +1 -1
- package/dist/internal/phases.js +1 -1
- package/dist/internal/plan.d.ts +1 -1
- package/dist/internal/plan.js +1 -1
- package/dist/internal/prd.d.ts +1 -1
- package/dist/internal/prd.js +2 -2
- package/dist/internal/utils.d.ts +1 -1
- package/dist/internal/utils.js +1 -1
- package/dist/storage/store-paths.js +1 -1
- package/dist/store-paths.d.ts +1 -1
- package/dist/store-paths.js +1 -1
- package/package.json +1 -1
package/dist/analyzer/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BlueprintGraph, BuildBlueprintRequest } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, BuildBlueprintRequest } from "../schema/index.js";
|
|
2
2
|
export declare const buildBlueprintGraph: (request: BuildBlueprintRequest) => Promise<BlueprintGraph>;
|
package/dist/analyzer/build.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { emptyContract } from "../schema/index";
|
|
3
|
-
import { parsePrd } from "../internal/prd";
|
|
4
|
-
import { withSpecDrafts } from "../internal/phases";
|
|
5
|
-
import { analyzeTypeScriptRepo } from "./repo";
|
|
6
|
-
import { createNode, dedupeEdges, mergeContracts, mergeSourceRefs } from "../internal/utils";
|
|
2
|
+
import { emptyContract } from "../schema/index.js";
|
|
3
|
+
import { parsePrd } from "../internal/prd.js";
|
|
4
|
+
import { withSpecDrafts } from "../internal/phases.js";
|
|
5
|
+
import { analyzeTypeScriptRepo } from "./repo.js";
|
|
6
|
+
import { createNode, dedupeEdges, mergeContracts, mergeSourceRefs } from "../internal/utils.js";
|
|
7
7
|
const mergeNodes = (nodes) => {
|
|
8
8
|
const map = new Map();
|
|
9
9
|
for (const node of nodes) {
|
|
10
|
-
const dedupeKey = `${node.kind}:${node.path ?? node.name}`;
|
|
10
|
+
const dedupeKey = `${node.kind}:${node.path ?? ""}:${node.name}`;
|
|
11
11
|
const existing = map.get(dedupeKey);
|
|
12
12
|
if (!existing) {
|
|
13
13
|
map.set(dedupeKey, node);
|
package/dist/analyzer/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildBlueprintGraph } from "./build";
|
|
2
|
-
export { analyzeTypeScriptRepo } from "./repo";
|
|
1
|
+
export { buildBlueprintGraph } from "./build.js";
|
|
2
|
+
export { analyzeTypeScriptRepo } from "./repo.js";
|
package/dist/analyzer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildBlueprintGraph } from "./build";
|
|
2
|
-
export { analyzeTypeScriptRepo } from "./repo";
|
|
1
|
+
export { buildBlueprintGraph } from "./build.js";
|
|
2
|
+
export { analyzeTypeScriptRepo } from "./repo.js";
|
package/dist/analyzer/repo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlueprintGraph } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph } from "../schema/index.js";
|
|
2
2
|
type RepoGraphPart = Omit<BlueprintGraph, "projectName" | "mode" | "generatedAt">;
|
|
3
3
|
export declare const analyzeTypeScriptRepo: (repoPath: string) => Promise<RepoGraphPart>;
|
|
4
4
|
export {};
|
package/dist/analyzer/repo.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { Node, Project, SyntaxKind } from "ts-morph";
|
|
4
|
-
import { emptyContract } from "../schema/index";
|
|
5
|
-
import { createNode, createNodeId, dedupeEdges, mergeContracts, mergeDesignCalls, toPosixPath } from "../internal/utils";
|
|
4
|
+
import { emptyContract } from "../schema/index.js";
|
|
5
|
+
import { createNode, createNodeId, dedupeEdges, mergeContracts, mergeDesignCalls, toPosixPath } from "../internal/utils.js";
|
|
6
6
|
const HTTP_METHODS = new Set(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
7
7
|
const EXCLUDED_SEGMENTS = ["/node_modules/", "/.next/", "/dist/", "/artifacts/", "/coverage/"];
|
|
8
8
|
const hasJsDocSummary = (node) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BlueprintGraph, ConflictReport } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, ConflictReport } from "../schema/index.js";
|
|
2
2
|
export declare const detectGraphConflicts: (graph: BlueprintGraph, repoPath: string) => Promise<ConflictReport>;
|
package/dist/conflicts/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { analyzeTypeScriptRepo } from "../analyzer/repo";
|
|
2
|
+
import { analyzeTypeScriptRepo } from "../analyzer/repo.js";
|
|
3
3
|
const repoKeyForNode = (node) => `${node.kind}:${node.path ?? ""}:${node.name}`;
|
|
4
4
|
export const detectGraphConflicts = async (graph, repoPath) => {
|
|
5
5
|
const repoGraph = await analyzeTypeScriptRepo(path.resolve(repoPath));
|
package/dist/export/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BlueprintGraph, ExecutionReport, ExportResult } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, ExecutionReport, ExportResult } from "../schema/index.js";
|
|
2
2
|
export declare const exportBlueprintArtifacts: (graph: BlueprintGraph, outputDir?: string, executionReport?: ExecutionReport, codeDrafts?: Record<string, string>) => Promise<ExportResult>;
|
package/dist/export/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { generateNodeCode, getNodeStubPath, isCodeBearingNode } from "../internal/codegen";
|
|
4
|
-
import { createRunPlan } from "../internal/plan";
|
|
5
|
-
import { getCodeBearingNodes, getDefaultExecutionTarget } from "../internal/phases";
|
|
6
|
-
import { slugify } from "../internal/utils";
|
|
3
|
+
import { generateNodeCode, getNodeStubPath, isCodeBearingNode } from "../internal/codegen.js";
|
|
4
|
+
import { createRunPlan } from "../internal/plan.js";
|
|
5
|
+
import { getCodeBearingNodes, getDefaultExecutionTarget } from "../internal/phases.js";
|
|
6
|
+
import { slugify } from "../internal/utils.js";
|
|
7
7
|
const ensureDir = async (dirPath) => {
|
|
8
8
|
await fs.mkdir(dirPath, { recursive: true });
|
|
9
9
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./analyzer/index";
|
|
2
|
-
export * from "./schema/index";
|
|
3
|
-
export * from "./export/index";
|
|
4
|
-
export * from "./conflicts/index";
|
|
5
|
-
export * from "./store-paths";
|
|
1
|
+
export * from "./analyzer/index.js";
|
|
2
|
+
export * from "./schema/index.js";
|
|
3
|
+
export * from "./export/index.js";
|
|
4
|
+
export * from "./conflicts/index.js";
|
|
5
|
+
export * from "./store-paths.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./analyzer/index";
|
|
2
|
-
export * from "./schema/index";
|
|
3
|
-
export * from "./export/index";
|
|
4
|
-
export * from "./conflicts/index";
|
|
5
|
-
export * from "./store-paths";
|
|
1
|
+
export * from "./analyzer/index.js";
|
|
2
|
+
export * from "./schema/index.js";
|
|
3
|
+
export * from "./export/index.js";
|
|
4
|
+
export * from "./conflicts/index.js";
|
|
5
|
+
export * from "./store-paths.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlueprintGraph, BlueprintNode } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, BlueprintNode } from "../schema/index.js";
|
|
2
2
|
export declare const isCodeBearingNode: (node: BlueprintNode) => boolean;
|
|
3
3
|
export declare const getNodeStubPath: (node: BlueprintNode) => string | null;
|
|
4
4
|
export declare const getNodeRuntimeExport: (node: BlueprintNode) => string | null;
|
package/dist/internal/codegen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlueprintGraph, BlueprintNode, BlueprintPhase, NodeVerification, ExecutionStep, RuntimeExecutionResult } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, BlueprintNode, BlueprintPhase, NodeVerification, ExecutionStep, RuntimeExecutionResult } from "../schema/index.js";
|
|
2
2
|
export declare const getCodeBearingNodes: (graph: BlueprintGraph) => BlueprintNode[];
|
|
3
3
|
export declare const withSpecDrafts: (graph: BlueprintGraph) => BlueprintGraph;
|
|
4
4
|
export declare const canCompleteSpecPhase: (graph: BlueprintGraph) => boolean;
|
package/dist/internal/phases.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateNodeCode, isCodeBearingNode } from "./codegen";
|
|
1
|
+
import { generateNodeCode, isCodeBearingNode } from "./codegen.js";
|
|
2
2
|
export const getCodeBearingNodes = (graph) => graph.nodes.filter(isCodeBearingNode);
|
|
3
3
|
export const withSpecDrafts = (graph) => ({
|
|
4
4
|
...graph,
|
package/dist/internal/plan.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BlueprintGraph, RunPlan } from "../schema/index";
|
|
1
|
+
import type { BlueprintGraph, RunPlan } from "../schema/index.js";
|
|
2
2
|
export declare const createRunPlan: (graph: BlueprintGraph) => RunPlan;
|
package/dist/internal/plan.js
CHANGED
package/dist/internal/prd.d.ts
CHANGED
package/dist/internal/prd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { emptyContract } from "../schema/index";
|
|
2
|
-
import { createNode, createNodeId, dedupeEdges, mergeContracts, mergeSourceRefs } from "./utils";
|
|
1
|
+
import { emptyContract } from "../schema/index.js";
|
|
2
|
+
import { createNode, createNodeId, dedupeEdges, mergeContracts, mergeSourceRefs } from "./utils.js";
|
|
3
3
|
const HEADING_PATTERN = /^#{1,6}\s+(.+)$/;
|
|
4
4
|
const BULLET_PATTERN = /^[-*+]\s+(.*)$/;
|
|
5
5
|
const WORKFLOW_PATTERN = /(.+?)\s*->\s*(.+)/;
|
package/dist/internal/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlueprintEdge, BlueprintNode, BlueprintNodeKind, CodeContract, ContractField, DesignCall, MethodSpec, SourceRef } from "../schema/index";
|
|
1
|
+
import type { BlueprintEdge, BlueprintNode, BlueprintNodeKind, CodeContract, ContractField, DesignCall, MethodSpec, SourceRef } from "../schema/index.js";
|
|
2
2
|
export declare const slugify: (value: string) => string;
|
|
3
3
|
export declare const toPosixPath: (value: string) => string;
|
|
4
4
|
export declare const createNodeId: (kind: BlueprintNodeKind, name: string, pathHint?: string) => string;
|
package/dist/internal/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { slugify } from "../internal/utils";
|
|
3
|
+
import { slugify } from "../internal/utils.js";
|
|
4
4
|
const resolveDefaultStoreRoot = () => {
|
|
5
5
|
if (process.env.VITEST || process.env.NODE_ENV === "test") {
|
|
6
6
|
return path.join(process.cwd(), ".codeflow-store-test", `worker-${process.env.VITEST_WORKER_ID ?? "0"}`);
|
package/dist/store-paths.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { approvalPath, branchDirForProject, branchPath, checkpointPath, getStoreRoot, latestSessionPath, observabilityPath, runPath, sessionDirForProject, sessionHistoryPath } from "./storage/store-paths";
|
|
1
|
+
export { approvalPath, branchDirForProject, branchPath, checkpointPath, getStoreRoot, latestSessionPath, observabilityPath, runPath, sessionDirForProject, sessionHistoryPath } from "./storage/store-paths.js";
|
package/dist/store-paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { approvalPath, branchDirForProject, branchPath, checkpointPath, getStoreRoot, latestSessionPath, observabilityPath, runPath, sessionDirForProject, sessionHistoryPath } from "./storage/store-paths";
|
|
1
|
+
export { approvalPath, branchDirForProject, branchPath, checkpointPath, getStoreRoot, latestSessionPath, observabilityPath, runPath, sessionDirForProject, sessionHistoryPath } from "./storage/store-paths.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abhinav2203/codeflow-core",
|
|
3
3
|
"description": "Framework-agnostic CodeFlow analysis core for blueprint generation, repository analysis, exports, and conflict detection.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|