@ostro/filesystem 1.0.2 → 1.0.4

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/adapter/local.js CHANGED
@@ -97,7 +97,7 @@ class Local extends CoreAdapter {
97
97
  } else {
98
98
  callback(error, {
99
99
  'type': 'file',
100
- 'path': location,
100
+ 'path': $path,
101
101
  'message': 'File created successfully'
102
102
  }, location)
103
103
  }
@@ -138,4 +138,4 @@ class Local extends CoreAdapter {
138
138
  }
139
139
 
140
140
  }
141
- module.exports = Local
141
+ module.exports = Local
package/filesystem.js CHANGED
@@ -136,8 +136,10 @@ class Filesystem extends FilesystemContract {
136
136
  return fs.lstat($file).then(stats => stats.isFile()).catch(err => false);
137
137
  }
138
138
 
139
- glob($pattern) {
140
- return Finder.create().glob($pattern).find();
139
+ async glob($pattern) {
140
+ const dir = path.dirname($pattern);
141
+ const base = path.basename($pattern);
142
+ return Finder.create().path(dir).glob(base || "*").find()
141
143
  }
142
144
 
143
145
  requireOnce($path, $data = []) {
@@ -274,4 +276,4 @@ class Filesystem extends FilesystemContract {
274
276
  return this.deleteDirectory($directory, true);
275
277
  }
276
278
  }
277
- module.exports = Filesystem
279
+ module.exports = Filesystem
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@ostro/filesystem",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "filesystem module for OstroJS",
5
5
  "main": "filesystemManager.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@ostro/support": "^1.0.2",
11
- "@ostro/contracts": "^1.0.0",
10
+ "@ostro/support": "^1.0.11",
11
+ "@ostro/contracts": "^1.0.2",
12
12
  "fs-extra": "^10.0.0",
13
13
  "lodash.get": "^4.4.2",
14
14
  "filehound": "^1.17.4",