@dfactory/core
v0.1.1
Published
`@dfactory/core` is the framework-agnostic runtime orchestrator for dFactory.
Readme
@dfactory/core
Purpose
@dfactory/core is the framework-agnostic runtime orchestrator for dFactory.
It owns:
- config loading and validation
- template discovery and registry lifecycle
- runtime plugin/module-loader resolution
- source manifest generation and shared contracts
Usage
Install from workspace context:
pnpm --filter @dfactory/core buildCore exports are consumed by server, CLI, template-kit, adapters, and renderers:
import { createRegistry } from "@dfactory/core";
const registry = await createRegistry({
cwd: process.cwd(),
configPath: "dfactory.config.ts",
});Development
pnpm --filter @dfactory/core typecheck
pnpm --filter @dfactory/core test
pnpm --filter @dfactory/core buildMaintain architecture guardrails:
- keep core independent from React/Vue runtime packages
- keep PDF post-processing in renderer/plugin packages
Troubleshooting
- Discovery returns zero templates: verify
templates.globsand cwd. - Runtime resolver mismatch: check plugin IDs and module loader IDs in config.
- Boundary test failures: inspect
tests/unit/dependency-boundaries.test.ts.
