@forzalabs/remora 0.1.2-nasco.3 → 0.1.3-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.
|
@@ -23,11 +23,12 @@ class ParallelDatasetClass {
|
|
|
23
23
|
this._getWorkerPath = () => {
|
|
24
24
|
// Get the current file's directory
|
|
25
25
|
const currentDir = __dirname;
|
|
26
|
-
// Check if we're
|
|
27
|
-
if (currentDir.includes('.build')) {
|
|
28
|
-
// We're in
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
// Check if we're in a published npm package (no .build in path)
|
|
27
|
+
if (!currentDir.includes('.build')) {
|
|
28
|
+
// We're in the published package, workers are relative to package root
|
|
29
|
+
// __dirname is something like: /path/to/package/engines/dataset
|
|
30
|
+
// We need to go up to package root and then to workers
|
|
31
|
+
return path_1.default.join(__dirname, '../../workers');
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
34
|
// We're in development, workers are in ./.build/workers
|