Skip to main content

Function: parseSpecId()

parseSpecId(specId, defaultWorkspace?): object

Defined in: packages/core/src/domain/services/parse-spec-id.ts:11

Splits a spec identifier of the form workspace:capabilityPath into its two components. When the identifier contains no colon, defaultWorkspace is used as the workspace and the entire string is treated as the capability path.

Parameters

specId

string

A spec identifier, e.g. "billing:payments/checkout"

defaultWorkspace?

string = 'default'

Workspace name to use when specId has no colon (default: 'default')

Returns

object

The parsed workspace name and capability path

capPath

capPath: string

workspace

workspace: string