@ubercode/dcmtk 0.7.3 → 0.8.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/tools.cjs CHANGED
@@ -2204,6 +2204,30 @@ async function echoscu(options) {
2204
2204
  return ok({ success: true, stderr: result.value.stderr });
2205
2205
  }
2206
2206
  var VERBOSITY_FLAGS19 = { verbose: "-v", debug: "-d" };
2207
+ var DECOMPRESS_FLAGS = {
2208
+ never: "--decompress-never",
2209
+ lossless: "--decompress-lossless",
2210
+ lossy: "--decompress-lossy"
2211
+ };
2212
+ function pushSendModeArgs(args, options) {
2213
+ if (options.noHalt === true) {
2214
+ args.push("--no-halt");
2215
+ }
2216
+ if (options.noIllegalProposal === true) {
2217
+ args.push("--no-illegal-proposal");
2218
+ }
2219
+ if (options.decompress !== void 0) {
2220
+ args.push(DECOMPRESS_FLAGS[options.decompress]);
2221
+ }
2222
+ if (options.multiAssociations === true) {
2223
+ args.push("+ma");
2224
+ } else if (options.multiAssociations === false) {
2225
+ args.push("-ma");
2226
+ }
2227
+ if (options.createReportFile !== void 0) {
2228
+ args.push("--create-report-file", options.createReportFile);
2229
+ }
2230
+ }
2207
2231
  var DcmsendOptionsSchema = zod.z.object({
2208
2232
  timeoutMs: zod.z.number().int().positive().optional(),
2209
2233
  signal: zod.z.instanceof(AbortSignal).optional(),
@@ -2213,8 +2237,15 @@ var DcmsendOptionsSchema = zod.z.object({
2213
2237
  callingAETitle: zod.z.string().min(1).max(16).refine(isValidAETitle, { message: "AE Title contains invalid characters" }).optional(),
2214
2238
  calledAETitle: zod.z.string().min(1).max(16).refine(isValidAETitle, { message: "AE Title contains invalid characters" }).optional(),
2215
2239
  scanDirectory: zod.z.boolean().optional(),
2240
+ recurse: zod.z.boolean().optional(),
2241
+ scanPattern: zod.z.string().min(1).optional(),
2216
2242
  verbosity: zod.z.enum(["verbose", "debug"]).optional(),
2217
2243
  noUidChecks: zod.z.boolean().optional(),
2244
+ noHalt: zod.z.boolean().optional(),
2245
+ noIllegalProposal: zod.z.boolean().optional(),
2246
+ decompress: zod.z.enum(["never", "lossless", "lossy"]).optional(),
2247
+ multiAssociations: zod.z.boolean().optional(),
2248
+ createReportFile: zod.z.string().min(1).optional(),
2218
2249
  maxPduReceive: zod.z.number().int().min(4096).max(131072).optional(),
2219
2250
  maxPduSend: zod.z.number().int().min(4096).max(131072).optional(),
2220
2251
  noHostnameLookup: zod.z.boolean().optional(),
@@ -2260,6 +2291,13 @@ function buildArgs33(options) {
2260
2291
  if (options.scanDirectory === true) {
2261
2292
  args.push("--scan-directories");
2262
2293
  }
2294
+ if (options.recurse === true) {
2295
+ args.push("+r");
2296
+ }
2297
+ if (options.scanPattern !== void 0) {
2298
+ args.push("--scan-pattern", options.scanPattern);
2299
+ }
2300
+ pushSendModeArgs(args, options);
2263
2301
  args.push(options.host, String(options.port));
2264
2302
  args.push(...options.files);
2265
2303
  return args;