Multipoint

This commit is contained in:
chk
2026-06-17 22:57:52 +02:00
parent 5f8e1a0189
commit eb403dab36
8 changed files with 667 additions and 15 deletions

25
test/fixtures/runAssignMarkerId.mjs vendored Normal file
View File

@@ -0,0 +1,25 @@
/**
* Dünner Runner für assignMarkerId wird von assignMarkerId.test.js per spawnSync aufgerufen.
*
* Argumente:
* node runAssignMarkerId.mjs <robotPath> <paramsJson>
*
* Gibt das Ergebnis als JSON-Zeile auf stdout aus.
* Wirft der Aufruf, erscheint { __error: "<message>" } + Exit 1.
*/
import { assignMarkerId } from '../../server/editRobot.js';
const [, , robotPath, paramsJson] = process.argv;
if (!robotPath || !paramsJson) {
process.stderr.write('Usage: runAssignMarkerId.mjs <robotPath> <paramsJson>\n');
process.exit(2);
}
try {
const params = JSON.parse(paramsJson);
const result = await assignMarkerId(robotPath, params);
process.stdout.write(JSON.stringify(result) + '\n');
} catch (err) {
process.stdout.write(JSON.stringify({ __error: err.message }) + '\n');
process.exit(1);
}