runAddHookedBlockCommand
runAddHookedBlockCommand(
options):Promise<{anchorBlockName:string;blockSlug:string;position:"before"|"after"|"firstChild"|"lastChild";projectDir:string; }>
Defined in: wp-typia-project-tools/src/runtime/cli-add-workspace.ts:1135
Add one blockHooks entry to an existing official workspace block.
Parameters
Section titled “Parameters”options
Section titled “options”RunAddHookedBlockCommandOptions
Command options for the hooked-block workflow.
Returns
Section titled “Returns”Promise<{ anchorBlockName: string; blockSlug: string; position: "before" | "after" | "firstChild" | "lastChild"; projectDir: string; }>
A promise that resolves with the normalized target block slug, anchor
block name, position, and owning project directory after block.json is written.
Throws
Section titled “Throws”When the command is run outside an official workspace, when the target block is unknown, when required flags are missing, or when the block already defines a hook for the requested anchor.