Files
obsidian-api/packages/n8n-nodes-obsidian-api/nodes/ObsidianApi/propertyOutput.ts
T
daniel156161 e115698e92
Build and Push Docker Container / build-and-push (push) Successful in 3m31s
fix: serialize property writes and expose n8n results
- Serialize property set and remove commands per vault note to avoid lost frontmatter writes.
- Wait briefly for successful property writes to hit disk before releasing the note lock.
- Return property path, name, value, type, operation, and ok status in n8n outputs.
- Include property details on continue-on-fail errors so failed items are visible in n8n.
- Bump obsidian-api to 1.0.7 and n8n-nodes-obsidian-cli-api to 0.2.8.
- Add regression coverage for concurrent property writes to the same note.
2026-09-15 09:43:24 +02:00

35 lines
721 B
TypeScript

import type { IDataObject } from 'n8n-workflow';
function parseArg(arg: string): [string, string] | undefined {
const index = arg.indexOf('=');
if (index <= 0) return undefined;
return [arg.slice(0, index), arg.slice(index + 1)];
}
export function propertyDetailsFromArgs(args: string[]): IDataObject {
const details: IDataObject = {};
for (const arg of args) {
const parsed = parseArg(arg);
if (!parsed) continue;
const [key, value] = parsed;
switch (key) {
case 'path':
details.path = value;
break;
case 'name':
details.property = value;
break;
case 'value':
details.value = value;
break;
case 'type':
details.type = value;
break;
}
}
return details;
}