@ubercode/dcmtk 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dicom.cjs +45 -33
- package/dist/dicom.cjs.map +1 -1
- package/dist/dicom.js +45 -33
- package/dist/dicom.js.map +1 -1
- package/dist/index.cjs +166 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +166 -61
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +14 -2
- package/dist/servers.cjs.map +1 -1
- package/dist/servers.js +14 -2
- package/dist/servers.js.map +1 -1
- package/dist/tools.cjs +52 -37
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +18 -1
- package/dist/tools.d.ts +18 -1
- package/dist/tools.js +52 -38
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/servers.cjs
CHANGED
|
@@ -527,7 +527,19 @@ function truncate(value, maxLength) {
|
|
|
527
527
|
}
|
|
528
528
|
return `${value.substring(0, maxLength)}...`;
|
|
529
529
|
}
|
|
530
|
-
|
|
530
|
+
var ToolExecutionError = class extends Error {
|
|
531
|
+
constructor(message, details) {
|
|
532
|
+
super(message);
|
|
533
|
+
__publicField(this, "stdout");
|
|
534
|
+
__publicField(this, "stderr");
|
|
535
|
+
__publicField(this, "exitCode");
|
|
536
|
+
this.name = "ToolExecutionError";
|
|
537
|
+
this.stdout = details.stdout;
|
|
538
|
+
this.stderr = details.stderr;
|
|
539
|
+
this.exitCode = details.exitCode;
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
function createToolError(toolName, args, exitCode, stderr6, stdout = "") {
|
|
531
543
|
const argsStr = truncate(args.join(" "), MAX_ARGS_LENGTH);
|
|
532
544
|
const stderrStr = truncate(stderr6.trim(), MAX_STDERR_LENGTH);
|
|
533
545
|
const parts = [`${toolName} failed (exit code ${String(exitCode)})`];
|
|
@@ -537,7 +549,7 @@ function createToolError(toolName, args, exitCode, stderr6) {
|
|
|
537
549
|
if (stderrStr.length > 0) {
|
|
538
550
|
parts.push(`stderr: ${stderrStr}`);
|
|
539
551
|
}
|
|
540
|
-
return new
|
|
552
|
+
return new ToolExecutionError(parts.join(" | "), { stdout, stderr: stderr6, exitCode });
|
|
541
553
|
}
|
|
542
554
|
function createValidationError(toolName, zodError) {
|
|
543
555
|
const parts = [];
|