@trenskow/arguments-parser 0.3.117 → 0.3.119

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.
@@ -28,6 +28,12 @@ const safeStat = async (path) => {
28
28
 
29
29
  export default async (current = '') => {
30
30
 
31
+ if (current === '') {
32
+ return await parallel(((await readdir(process.cwd()))
33
+ .filter((file) => !file.startsWith('.')))
34
+ .map(async (file) => `${file}${(await safeStat(resolve(process.cwd(), file)))?.isDirectory() ? '/' : ''}`));
35
+ }
36
+
31
37
  const stat = await safeStat(
32
38
  resolve(
33
39
  process.cwd(),
@@ -176,7 +176,7 @@ const argumentsParser = (output) => {
176
176
  }
177
177
 
178
178
  if (schemas[idx].type === String && !schemas[idx].autocomplete) {
179
- return await (buildIns.files(
179
+ return (await buildIns.files(
180
180
  current))
181
181
  .filter((item) => key !== item && item.startsWith(current));
182
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/arguments-parser",
3
- "version": "0.3.117",
3
+ "version": "0.3.119",
4
4
  "description": "Yet another arguments parser.",
5
5
  "main": "index.js",
6
6
  "type": "module",