@salesforce/b2c-tooling-sdk / operations/code / WatchOptions
Interface: WatchOptions
Defined in: packages/b2c-tooling-sdk/src/operations/code/watch.ts:20
Options for watching cartridges.
Extends
Properties
debounceTime?
optionaldebounceTime:number
Defined in: packages/b2c-tooling-sdk/src/operations/code/watch.ts:22
Debounce time in ms for batching file changes
exclude?
optionalexclude:string[]
Defined in: packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:28
Cartridge names to exclude
Inherited from
firstMatchOnly?
optionalfirstMatchOnly:boolean
Defined in: packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:48
When true, stop at the first matching cartridge and return only that one. Useful for existence checks (e.g. workspace-type detection) where the full list is not needed — it lets the underlying scan short-circuit instead of enumerating every .project file. Filters from include/exclude are applied while scanning, so the returned cartridge always satisfies them.
Inherited from
FindCartridgesOptions.firstMatchOnly
include?
optionalinclude:string[]
Defined in: packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:26
Cartridge names to include (if empty, all are included)
Inherited from
maxDepth?
optionalmaxDepth:number
Defined in: packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:40
Maximum directory depth to recurse when searching for cartridges, expressed as the number of path segments to the marker file relative to the search directory. A cartridge at cartridges/<name>/.project is depth 3; the equivalent cartridge/*.properties marker at cartridges/<name>/cartridge/<name>.properties is automatically adjusted to depth 4 (maxDepth + 1) so both discovery methods honour the same logical cartridge-nesting bound. When omitted the search is unbounded (default). Bound this for untrusted/broad roots (e.g. an MCP server launched from a home directory) to avoid scanning the whole filesystem.
Inherited from
FindCartridgesOptions.maxDepth
onDelete()?
optionalonDelete: (files) =>void
Defined in: packages/b2c-tooling-sdk/src/operations/code/watch.ts:26
Callback when files are deleted
Parameters
files
string[]
Returns
void
onError()?
optionalonError: (error) =>void
Defined in: packages/b2c-tooling-sdk/src/operations/code/watch.ts:28
Callback on error
Parameters
error
Error
Returns
void
onUpload()?
optionalonUpload: (files) =>void
Defined in: packages/b2c-tooling-sdk/src/operations/code/watch.ts:24
Callback when files are uploaded
Parameters
files
string[]
Returns
void