masterrecord 0.3.10 → 0.3.12

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/Migrations/cli.js CHANGED
@@ -622,8 +622,8 @@ program.option('-V', 'output the version');
622
622
  var tableObj = migration.buildUpObject(contextSnapshot.schema, cleanEntities);
623
623
  newMigrationProjectInstance.up(tableObj);
624
624
  }
625
- var snap = {
626
- file : contextSnapshot.contextLocation,
625
+ const snap = {
626
+ file : contextAbs,
627
627
  executedLocation : executedLocation,
628
628
  context : contextInstance,
629
629
  contextEntities : cleanEntities,
@@ -167,9 +167,12 @@ class Migrations{
167
167
 
168
168
 
169
169
  findContext(executedLocation, contextFileName){
170
- var search = `${executedLocation}/**/*${contextFileName}.js`
171
- var files = globSearch.sync(search, executedLocation);
172
- var file = files && files[0];
170
+ var files = globSearch.sync(`**/*${contextFileName}.js`, {
171
+ cwd: executedLocation,
172
+ dot: true,
173
+ windowsPathsNoEscape: true
174
+ });
175
+ var file = files && files[0] ? path.resolve(executedLocation, files[0]) : null;
173
176
  if(!file){
174
177
  return null;
175
178
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "masterrecord",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "description": "An Object-relational mapping for the Master framework. Master Record connects classes to relational database tables to establish a database with almost zero-configuration ",
5
5
  "main": "MasterRecord.js",
6
6
  "bin": {