MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / buildFromUserInput

Function buildFromUserInput

src/lib/item-input/misc.ts:47–52  ·  view source on GitHub ↗
(context?: unknown[])

Source from the content-addressed store, hash-verified

45}
46export const optionalStringDef = (name: string, options?: StringDefOptions): InputDefinition<string | undefined> => {
47 const buildFromUserInput = async (context?: unknown[]): Promise<string | undefined> =>
48 optionalStringInput(`${name} (optional)`, {
49 ...options,
50 default: defaultWithContextFn(options?.default, context),
51 validate: validateWithContextFn(options?.validate, context),
52 })
53 const summarizeForEdit = (value: string): string => value
54 const updateFromUserInput = (original: string, context?: unknown[]): Promise<string | undefined> =>
55 optionalStringInput(`${name} (optional)`,

Calls 9

optionalStringInputFunction · 0.85
defaultWithContextFnFunction · 0.85
validateWithContextFnFunction · 0.85
stringInputFunction · 0.85
optionalIntegerInputFunction · 0.85
integerInputFunction · 0.85
booleanInputFunction · 0.85
decideAndSaveFunction · 0.85
updateFromUserInputFunction · 0.70

Tested by

no test coverage detected