Skip to content

runAddBindingSourceCommand

runAddBindingSourceCommand(options): Promise<{ attributeName?: string; bindingSourceSlug: string; blockSlug?: string; metaKey?: string; metaPath?: string; postMetaSlug?: string; postType?: string; projectDir: string; schemaFile?: string; }>

Defined in: wp-typia-project-tools/src/runtime/add/cli-add-workspace-binding-source.ts:337

Add one block binding source scaffold to an official workspace project.

RunAddBindingSourceCommandOptions

Command options for the binding-source scaffold workflow.

Promise<{ attributeName?: string; bindingSourceSlug: string; blockSlug?: string; metaKey?: string; metaPath?: string; postMetaSlug?: string; postType?: string; projectDir: string; schemaFile?: string; }>

A promise that resolves with the normalized bindingSourceSlug and owning projectDir after the server/editor files, optional target block metadata, and inventory entry have been written successfully. Post-meta backed results additionally include metaKey, metaPath, postMetaSlug, postType, and schemaFile.

When the command is run outside an official workspace, when the slug is invalid, when a binding target is incomplete or unknown, or when a conflicting file or inventory entry exists. Post-meta backed runs also throw when the referenced contract or requested top-level field cannot be resolved.