MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / requirePath

Function requirePath

apps/desktop/src/cli/commands/notes.ts:212–218  ·  view source on GitHub ↗
(args: ParsedArgs)

Source from the content-addressed store, hash-verified

210/* ---------- helpers -------------------------------------------------- */
211
212function requirePath(args: ParsedArgs): string {
213 const fromFlag = getString(args, 'path')
214 const fromPositional = args.positionals[0]
215 const value = fromFlag ?? fromPositional
216 if (!value) throw new Error('A note path is required.')
217 return value
218}
219
220function emitCreated(meta: NoteMeta, args: ParsedArgs): void {
221 if (getBool(args, 'json')) {

Callers 12

cmdReadFunction · 0.85
cmdWriteFunction · 0.85
cmdAppendFunction · 0.85
cmdPrependFunction · 0.85
cmdRenameFunction · 0.85
cmdMoveFunction · 0.85
cmdArchiveFunction · 0.85
cmdUnarchiveFunction · 0.85
cmdTrashFunction · 0.85
cmdRestoreFunction · 0.85
cmdDeleteFunction · 0.85
cmdDuplicateFunction · 0.85

Calls 1

getStringFunction · 0.85

Tested by

no test coverage detected