@forzalabs/remora 1.0.7 → 1.0.9

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.
@@ -156,7 +156,8 @@ class LocalDestinationDriver {
156
156
  this.move = (fromPath, toName) => __awaiter(this, void 0, void 0, function* () {
157
157
  try {
158
158
  const toFilePath = path_1.default.join(this._path, toName);
159
- yield promises_1.default.rename(fromPath, toFilePath);
159
+ yield promises_1.default.copyFile(fromPath, toFilePath);
160
+ yield promises_1.default.unlink(fromPath);
160
161
  return { bucket: '', key: toFilePath, res: true };
161
162
  }
162
163
  catch (error) {
@@ -150,8 +150,8 @@ class ExecutorOrchestratorClass {
150
150
  if (fileSize < Constants_1.default.defaults.MIN_FILE_SIZE_FOR_PARALLEL) {
151
151
  return [{ start: 0, end: fileSize, isFirstChunk: true, fileUri }];
152
152
  }
153
- // Calculate optimal chunk count based on file size and CPU cores
154
- const cpus = numChunks !== null && numChunks !== void 0 ? numChunks : os_1.default.cpus().length;
153
+ // Calculate optimal chunk count based on file size and CPU cores (-1 cause it is used by the main thread)
154
+ const cpus = numChunks !== null && numChunks !== void 0 ? numChunks : (os_1.default.cpus().length - 1);
155
155
  const maxChunksBySize = Math.floor(fileSize / Constants_1.default.defaults.MIN_CHUNK_SIZE);
156
156
  const effectiveChunks = Math.min(cpus, maxChunksBySize);
157
157
  if (effectiveChunks <= 1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,