@ubercode/dcmtk 0.9.3 → 0.9.4
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-CWZOBvrt.d.ts → index-x98H349Q.d.ts} +1 -1
- package/dist/{index-vXxeheHY.d.cts → index-zdzuZTms.d.cts} +1 -1
- package/dist/index.cjs +2 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -7
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +2 -7
- package/dist/servers.cjs.map +1 -1
- package/dist/servers.d.cts +1 -1
- package/dist/servers.d.ts +1 -1
- package/dist/servers.js +2 -7
- package/dist/servers.js.map +1 -1
- package/package.json +1 -1
package/dist/servers.cjs
CHANGED
|
@@ -3224,7 +3224,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3224
3224
|
this.wireRefusingAssociation(worker);
|
|
3225
3225
|
this.wireOutputCapture(worker);
|
|
3226
3226
|
}
|
|
3227
|
-
/** Wires FILE_RECEIVED from dcmrecv worker
|
|
3227
|
+
/** Wires FILE_RECEIVED from dcmrecv worker — files are processed serially per worker. */
|
|
3228
3228
|
wireFileReceived(worker) {
|
|
3229
3229
|
worker.dcmrecv.onFileReceived((data) => {
|
|
3230
3230
|
const assocId = worker.associationId;
|
|
@@ -3241,7 +3241,6 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
const promise = this.handleFileReceived(worker, data, assocId, assocDir);
|
|
3243
3243
|
worker.pendingFiles.push(promise);
|
|
3244
|
-
void promise.finally(() => removePending(worker.pendingFiles, promise));
|
|
3245
3244
|
});
|
|
3246
3245
|
}
|
|
3247
3246
|
/** Moves a received file, opens it as DicomInstance, and emits FILE_RECEIVED. */
|
|
@@ -3302,7 +3301,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3302
3301
|
}
|
|
3303
3302
|
/** Awaits ALL pending file operations, emits ASSOCIATION_COMPLETE, resets worker state. */
|
|
3304
3303
|
async finalizeAssociation(worker, data) {
|
|
3305
|
-
|
|
3304
|
+
if (worker.pendingFiles.length > 0) {
|
|
3306
3305
|
await Promise.all(worker.pendingFiles);
|
|
3307
3306
|
}
|
|
3308
3307
|
this.emitAssociationComplete(worker, data);
|
|
@@ -3453,10 +3452,6 @@ async function removeDirSafe(dirPath) {
|
|
|
3453
3452
|
} catch {
|
|
3454
3453
|
}
|
|
3455
3454
|
}
|
|
3456
|
-
function removePending(arr, promise) {
|
|
3457
|
-
const idx = arr.indexOf(promise);
|
|
3458
|
-
if (idx !== -1) void arr.splice(idx, 1);
|
|
3459
|
-
}
|
|
3460
3455
|
function delay(ms) {
|
|
3461
3456
|
return new Promise((resolve) => {
|
|
3462
3457
|
setTimeout(resolve, ms);
|