MCPcopy
hub / github.com/Fission-AI/OpenSpec / validateWorksetName

Function validateWorksetName

src/core/worksets.ts:84–97  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

82}
83
84export function validateWorksetName(name: string): string {
85 if (!isKebabId(name)) {
86 throw new StoreError(
87 `Workset name '${name}' ${KEBAB_ID_DESCRIPTION}.`,
88 'invalid_workset_name',
89 {
90 target: 'workset.name',
91 fix: KEBAB_ID_FIX,
92 }
93 );
94 }
95
96 return name;
97}
98
99/**
100 * Returns a problem description for a member list, or null when valid.

Callers 4

worksets.test.tsFile · 0.85
composeFromFlagsMethod · 0.85
composeInteractivelyFunction · 0.85
validateFunction · 0.85

Calls 1

isKebabIdFunction · 0.85

Tested by

no test coverage detected