@nginstack/engine-node 71.0.339 → 71.0.473

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.
Files changed (2) hide show
  1. package/lib/Engine.js +13 -5
  2. package/package.json +2 -2
package/lib/Engine.js CHANGED
@@ -475,21 +475,29 @@ class Engine {
475
475
  *
476
476
  * The Engine will be installed on `<root-dir>/.engine/<database-name>` directory. If was not
477
477
  * informed the option `jazSearchPath` it will load all JAZ files inside the
478
- * `<root-dir>/.build` directory. The option `disableIdoSyncToDisk` will be enabled by default.
478
+ * `<root-dir>/.build` directory (or "build" directory if ".build" does not exists). The
479
+ * option `disableIdoSyncToDisk` will be enabled by default.
479
480
  *
480
481
  * See the site https://nginstack.com for the more details about the adopted repository
481
482
  * conventions.
482
- * @param {EngineOptions=} opt_options Advanced Engine options.
483
+ * @param {EngineOptions=} options Advanced Engine options.
483
484
  */
484
- static newUsingWorkspaceConfig(opt_options) {
485
- const options = opt_options || {};
485
+ static newUsingWorkspaceConfig(options) {
486
+ options = options || {};
486
487
  const workspacePath = getWorkspacePath();
487
488
  dotenv.config({
488
489
  path: path.resolve(workspacePath, '.env')
489
490
  });
490
491
 
491
492
  if (!('jazSearchPath' in options)) {
492
- options.jazSearchPath = path.resolve(workspacePath, 'build');
493
+ let jazSearchPath = path.resolve(workspacePath, '.build');
494
+ if (!fs.existsSync(jazSearchPath)) {
495
+ // Compatibility with previous build directory name
496
+ jazSearchPath = path.resolve(workspacePath, 'build');
497
+ }
498
+ if (fs.existsSync(jazSearchPath)) {
499
+ options.jazSearchPath = jazSearchPath;
500
+ }
493
501
  }
494
502
  if (!('disableIdoSyncToDisk' in options)) {
495
503
  options.disableIdoSyncToDisk = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nginstack/engine-node",
3
- "version": "71.0.339",
3
+ "version": "71.0.473",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,5 +24,5 @@
24
24
  "thread-sleep": "^2.2.0",
25
25
  "tmp": "^0.2.1"
26
26
  },
27
- "gitHead": "2208782fbd81adc664f35f4947432225a58b4d7b"
27
+ "gitHead": "57ed27361c31ae0f6c30fde36408475f9bba9042"
28
28
  }