feat(workflow-utils): add withDryRun role wrapper #255
Reference in New Issue
Block a user
Delete Branch "feat/254-with-dry-run"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extracts repeated dry-run skip + try/catch error handling into
withDryRun(role, { label, dryRunMeta, failMeta }).4 tests added, all passing.
Closes #254
@@ -0,0 +8,4 @@/** Meta returned when dry-run skips execution. */dryRunMeta: M;/** Meta returned when the inner role throws. */failMeta: M;failMeta 应该不是 withDryRun 考虑的,或许应该是另外一个decorator。
或许我们是不是应该搞个 decorator chain, e.g.
@@ -0,0 +1,168 @@# RFC-004: Package Architecture — Shareable Workflows, Roles & Senses这个应该是另一个 PR 吧?
@@ -0,0 +65,4 @@// onFail — catch errors and return a structured failure result// ---------------------------------------------------------------------------export type OnFailOptions<M> = {如果这样,这个文件还叫 with-dry-run 就不太合适了。