@forzalabs/remora 1.0.3 → 1.0.6

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.
@@ -149,6 +149,8 @@ class TransformationEngineClass {
149
149
  return value.charAt(0).toUpperCase() + value.slice(1);
150
150
  }
151
151
  if ('substring' in transformations) {
152
+ if (!Algo_1.default.hasVal(value))
153
+ return '';
152
154
  if (typeof value !== 'string')
153
155
  throw new Error(`Cannot take substring of non-string value in field '${field.key}'`);
154
156
  const { start, end } = transformations.substring;
@@ -27,6 +27,7 @@ const TransformationEngine_1 = __importDefault(require("../engines/transform/Tra
27
27
  const RequestExecutor_1 = __importDefault(require("../engines/execution/RequestExecutor"));
28
28
  const Affirm_1 = __importDefault(require("../core/Affirm"));
29
29
  const Constants_1 = __importDefault(require("../Constants"));
30
+ const Algo_1 = __importDefault(require("../core/Algo"));
30
31
  class ConsumerExecutorClass {
31
32
  constructor() {
32
33
  this._getWorkPath = (consumer, executionId) => {
@@ -79,7 +80,7 @@ class ConsumerExecutorClass {
79
80
  // set the fixed default value for the field, or throw error if not present in the producer
80
81
  const dimension = dimensions.find(x => x.name === cField.key);
81
82
  if (!dimension) {
82
- if (cField.fixed && cField.default)
83
+ if (cField.fixed && Algo_1.default.hasVal(cField.default))
83
84
  record[fieldKey] = cField.default;
84
85
  else
85
86
  throw new Error(`The requested field "${cField.key}" from the consumer is not present in the underlying producer "${producer.name}" (${dimensions.map(x => x.name).join(', ')})`);
@@ -151,7 +151,7 @@ class ExecutorOrchestratorClass {
151
151
  return [{ start: 0, end: fileSize, isFirstChunk: true, fileUri }];
152
152
  }
153
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 - 1);
154
+ const cpus = numChunks !== null && numChunks !== void 0 ? numChunks : os_1.default.cpus().length;
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)
@@ -226,9 +226,9 @@ class ExecutorOrchestratorClass {
226
226
  // Check if we're in a published npm package (no .build in path)
227
227
  if (!currentDir.includes('.build')) {
228
228
  // We're in the published package, workers are relative to package root
229
- // __dirname is something like: /path/to/package/engines/dataset
230
- // We need to go up to package root and then to workers
231
- return path_1.default.join(__dirname, '../../workers');
229
+ // __dirname is something like: /path/to/package/executors
230
+ // Workers are at /path/to/package/workers (sibling folder)
231
+ return path_1.default.join(__dirname, '../workers');
232
232
  }
233
233
  else {
234
234
  // We're in development, workers are in ./.build/workers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,
@@ -23,7 +23,7 @@
23
23
  "copy-static-file": "npx tsx ./scripts/CopyStaticFile.js",
24
24
  "build": "npm i && npm run sync && tsc --outDir .build && npm run copy-static-file",
25
25
  "fast-build": "tsc --outDir .build",
26
- "upload": "npm run build && cd .build && npm login && npm publish --access=public"
26
+ "upload": "npm run build && cd .build && npm publish --access=public"
27
27
  },
28
28
  "keywords": [
29
29
  "nextjs",