@ubercode/dcmtk 0.7.1 → 0.7.2
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/index.cjs +29 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/dist/tools.cjs +8 -0
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +2 -0
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +8 -0
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/tools.d.cts
CHANGED
|
@@ -1467,6 +1467,8 @@ interface StorescuOptions extends ToolBaseOptions {
|
|
|
1467
1467
|
readonly dimseTimeout?: number | undefined;
|
|
1468
1468
|
/** Disable hostname lookup for incoming associations. Maps to `-nh`. */
|
|
1469
1469
|
readonly noHostnameLookup?: boolean | undefined;
|
|
1470
|
+
/** Propose only the file's native transfer syntax. Maps to `-R`/`--required`. */
|
|
1471
|
+
readonly required?: boolean | undefined;
|
|
1470
1472
|
}
|
|
1471
1473
|
/** Result of a successful C-STORE send. */
|
|
1472
1474
|
interface StorescuResult {
|
package/dist/tools.d.ts
CHANGED
|
@@ -1467,6 +1467,8 @@ interface StorescuOptions extends ToolBaseOptions {
|
|
|
1467
1467
|
readonly dimseTimeout?: number | undefined;
|
|
1468
1468
|
/** Disable hostname lookup for incoming associations. Maps to `-nh`. */
|
|
1469
1469
|
readonly noHostnameLookup?: boolean | undefined;
|
|
1470
|
+
/** Propose only the file's native transfer syntax. Maps to `-R`/`--required`. */
|
|
1471
|
+
readonly required?: boolean | undefined;
|
|
1470
1472
|
}
|
|
1471
1473
|
/** Result of a successful C-STORE send. */
|
|
1472
1474
|
interface StorescuResult {
|
package/dist/tools.js
CHANGED
|
@@ -2324,6 +2324,7 @@ var StorescuOptionsSchema = z.object({
|
|
|
2324
2324
|
acseTimeout: z.number().int().positive().optional(),
|
|
2325
2325
|
dimseTimeout: z.number().int().positive().optional(),
|
|
2326
2326
|
noHostnameLookup: z.boolean().optional(),
|
|
2327
|
+
required: z.boolean().optional(),
|
|
2327
2328
|
proposedTransferSyntax: z.enum([
|
|
2328
2329
|
"uncompressed",
|
|
2329
2330
|
"littleEndian",
|
|
@@ -2339,6 +2340,7 @@ var StorescuOptionsSchema = z.object({
|
|
|
2339
2340
|
]).optional()
|
|
2340
2341
|
}).strict();
|
|
2341
2342
|
var VERBOSITY_FLAGS20 = { verbose: "-v", debug: "-d" };
|
|
2343
|
+
var DIMSE_ERROR_PATTERN = /^E:.*(?:DIMSE Failed|Store Failed)/m;
|
|
2342
2344
|
function pushNetworkArgs3(args, options) {
|
|
2343
2345
|
if (options.verbosity !== void 0) {
|
|
2344
2346
|
args.push(VERBOSITY_FLAGS20[options.verbosity]);
|
|
@@ -2380,6 +2382,9 @@ function buildArgs34(options) {
|
|
|
2380
2382
|
if (options.proposedTransferSyntax !== void 0) {
|
|
2381
2383
|
args.push(PROPOSED_TS_FLAG_MAP[options.proposedTransferSyntax]);
|
|
2382
2384
|
}
|
|
2385
|
+
if (options.required === true) {
|
|
2386
|
+
args.push("-R");
|
|
2387
|
+
}
|
|
2383
2388
|
args.push(options.host, String(options.port));
|
|
2384
2389
|
args.push(...options.files);
|
|
2385
2390
|
return args;
|
|
@@ -2405,6 +2410,9 @@ async function storescu(options) {
|
|
|
2405
2410
|
if (result.value.exitCode !== 0) {
|
|
2406
2411
|
return err(createToolError("storescu", args, result.value.exitCode, result.value.stderr));
|
|
2407
2412
|
}
|
|
2413
|
+
if (DIMSE_ERROR_PATTERN.test(result.value.stderr)) {
|
|
2414
|
+
return err(createToolError("storescu", args, 0, result.value.stderr));
|
|
2415
|
+
}
|
|
2408
2416
|
return ok({ success: true, stdout: result.value.stdout, stderr: result.value.stderr });
|
|
2409
2417
|
}
|
|
2410
2418
|
var QueryModel = {
|