forest-cli
Version:
The Lumberjacks' toolbelt is the Forest CLI which makes easy to manage your back office application directly from the terminal.
42 lines • 2.13 kB
TypeScript
/**
* Multi-domain orchestration shared by the `layout` commands: diff every domain
* the file declares, and prepare the workflow `steps` graphs (compiled to BPMN,
* uploaded out-of-band on apply). The read path lives in `read.ts`.
*/
import type { DiffResult } from './diff';
import type LayoutManager from './layout-manager';
import type { LayoutDomain, LayoutFileDoc, LayoutScope } from './types';
/** Domains actually present in a parsed file — we only touch what it declares. */
export declare function domainsInFile(local: LayoutFileDoc): LayoutDomain[];
/** Diff every domain present in `local` against `remote`, combined into one plan. */
export declare function diffAllDomains(remote: LayoutFileDoc, local: LayoutFileDoc): DiffResult;
/** A workflow in the file that carries an authored `steps` graph (→ BPMN). */
export type StepWorkflow = {
collectionId: string;
id: string;
name: string;
segmentIds?: string[];
/** Entry step id — must reach the compiler, which otherwise falls back to the first step. */
start?: string;
steps: unknown[];
};
/**
* Workflows in the file that carry an authored `steps` graph. Assigns a uuid id
* to any such workflow that lacks one (mutates the doc) so the shell `add` and
* the subsequent BPMN link target the same id.
*/
export declare function stepWorkflows(local: LayoutFileDoc): StepWorkflow[];
/** A step-workflow's compiled BPMN + whether it differs from what's stored (idempotency). */
export type BpmnPlan = {
bpmn: string;
changed: boolean;
workflow: StepWorkflow;
};
/**
* Compile each step-workflow's BPMN and decide whether it needs uploading, by
* byte-comparing against the version currently stored on the remote workflow.
* Unchanged graphs are skipped — so re-applying a file is a true no-op (the S3
* object is stored verbatim and the compiler is deterministic).
*/
export declare function planWorkflowBpmn(manager: LayoutManager, scope: LayoutScope, workflows: StepWorkflow[], remoteWorkflows: Array<Record<string, unknown>>, renderingId: number): Promise<BpmnPlan[]>;
//# sourceMappingURL=sync.d.ts.map