@ubercode/dcmtk 0.7.0 → 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 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +29 -20
- package/dist/index.js.map +1 -1
- package/dist/tools.cjs +8 -4
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +2 -2
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +8 -4
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/tools.d.cts
CHANGED
|
@@ -1467,8 +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
|
-
/**
|
|
1471
|
-
readonly
|
|
1470
|
+
/** Propose only the file's native transfer syntax. Maps to `-R`/`--required`. */
|
|
1471
|
+
readonly required?: boolean | undefined;
|
|
1472
1472
|
}
|
|
1473
1473
|
/** Result of a successful C-STORE send. */
|
|
1474
1474
|
interface StorescuResult {
|
package/dist/tools.d.ts
CHANGED
|
@@ -1467,8 +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
|
-
/**
|
|
1471
|
-
readonly
|
|
1470
|
+
/** Propose only the file's native transfer syntax. Maps to `-R`/`--required`. */
|
|
1471
|
+
readonly required?: boolean | undefined;
|
|
1472
1472
|
}
|
|
1473
1473
|
/** Result of a successful C-STORE send. */
|
|
1474
1474
|
interface StorescuResult {
|
package/dist/tools.js
CHANGED
|
@@ -2324,7 +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
|
-
|
|
2327
|
+
required: z.boolean().optional(),
|
|
2328
2328
|
proposedTransferSyntax: z.enum([
|
|
2329
2329
|
"uncompressed",
|
|
2330
2330
|
"littleEndian",
|
|
@@ -2340,6 +2340,7 @@ var StorescuOptionsSchema = z.object({
|
|
|
2340
2340
|
]).optional()
|
|
2341
2341
|
}).strict();
|
|
2342
2342
|
var VERBOSITY_FLAGS20 = { verbose: "-v", debug: "-d" };
|
|
2343
|
+
var DIMSE_ERROR_PATTERN = /^E:.*(?:DIMSE Failed|Store Failed)/m;
|
|
2343
2344
|
function pushNetworkArgs3(args, options) {
|
|
2344
2345
|
if (options.verbosity !== void 0) {
|
|
2345
2346
|
args.push(VERBOSITY_FLAGS20[options.verbosity]);
|
|
@@ -2366,9 +2367,6 @@ function pushNetworkArgs3(args, options) {
|
|
|
2366
2367
|
function buildArgs34(options) {
|
|
2367
2368
|
const args = [];
|
|
2368
2369
|
pushNetworkArgs3(args, options);
|
|
2369
|
-
if (options.noUidChecks === true) {
|
|
2370
|
-
args.push("--no-uid-checks");
|
|
2371
|
-
}
|
|
2372
2370
|
if (options.callingAETitle !== void 0) {
|
|
2373
2371
|
args.push("-aet", options.callingAETitle);
|
|
2374
2372
|
}
|
|
@@ -2384,6 +2382,9 @@ function buildArgs34(options) {
|
|
|
2384
2382
|
if (options.proposedTransferSyntax !== void 0) {
|
|
2385
2383
|
args.push(PROPOSED_TS_FLAG_MAP[options.proposedTransferSyntax]);
|
|
2386
2384
|
}
|
|
2385
|
+
if (options.required === true) {
|
|
2386
|
+
args.push("-R");
|
|
2387
|
+
}
|
|
2387
2388
|
args.push(options.host, String(options.port));
|
|
2388
2389
|
args.push(...options.files);
|
|
2389
2390
|
return args;
|
|
@@ -2409,6 +2410,9 @@ async function storescu(options) {
|
|
|
2409
2410
|
if (result.value.exitCode !== 0) {
|
|
2410
2411
|
return err(createToolError("storescu", args, result.value.exitCode, result.value.stderr));
|
|
2411
2412
|
}
|
|
2413
|
+
if (DIMSE_ERROR_PATTERN.test(result.value.stderr)) {
|
|
2414
|
+
return err(createToolError("storescu", args, 0, result.value.stderr));
|
|
2415
|
+
}
|
|
2412
2416
|
return ok({ success: true, stdout: result.value.stdout, stderr: result.value.stderr });
|
|
2413
2417
|
}
|
|
2414
2418
|
var QueryModel = {
|