@forzalabs/remora 0.1.1-nasco.3 → 0.1.2-nasco.3

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/Constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const CONSTANTS = {
4
- cliVersion: '0.1.1-nasco',
4
+ cliVersion: '0.1.2-nasco',
5
5
  lambdaVersion: 1,
6
6
  port: 5069,
7
7
  defaults: {
@@ -17,8 +17,23 @@ const Affirm_1 = __importDefault(require("../../core/Affirm"));
17
17
  const Environment_1 = __importDefault(require("../Environment"));
18
18
  const workerpool_1 = __importDefault(require("workerpool"));
19
19
  const DatasetManager_1 = __importDefault(require("./DatasetManager"));
20
+ const path_1 = __importDefault(require("path"));
20
21
  class ParallelDatasetClass {
21
22
  constructor() {
23
+ this._getWorkerPath = () => {
24
+ // Get the current file's directory
25
+ const currentDir = __dirname;
26
+ // Check if we're already in the .build directory (production)
27
+ if (currentDir.includes('.build')) {
28
+ // We're in production (.build/engines/dataset), go to .build/workers
29
+ const buildDir = currentDir.split('.build')[0] + '.build';
30
+ return path_1.default.join(buildDir, 'workers');
31
+ }
32
+ else {
33
+ // We're in development, workers are in ./.build/workers
34
+ return path_1.default.resolve('./.build/workers');
35
+ }
36
+ };
22
37
  this._scopeWork = (dataset) => {
23
38
  var _a;
24
39
  const datasetCount = dataset.getCount();
@@ -133,9 +148,10 @@ class ParallelDatasetClass {
133
148
  dataset._finishOperation('transform-parallel');
134
149
  return dataset;
135
150
  });
136
- this._filterPool = workerpool_1.default.pool('./.build/workers/FilterWorker.js');
137
- this._projectionPool = workerpool_1.default.pool('./.build/workers/ProjectionWorker.js');
138
- this._transformPool = workerpool_1.default.pool('./.build/workers/TransformWorker.js');
151
+ const workerPath = this._getWorkerPath();
152
+ this._filterPool = workerpool_1.default.pool(path_1.default.join(workerPath, 'FilterWorker.js'));
153
+ this._projectionPool = workerpool_1.default.pool(path_1.default.join(workerPath, 'ProjectionWorker.js'));
154
+ this._transformPool = workerpool_1.default.pool(path_1.default.join(workerPath, 'TransformWorker.js'));
139
155
  }
140
156
  }
141
157
  const ParallelDataset = new ParallelDatasetClass();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "0.1.1-nasco.3",
3
+ "version": "0.1.2-nasco.3",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,