@travetto/cli 8.0.0-alpha.3 → 8.0.0-alpha.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/README.md CHANGED
@@ -542,7 +542,7 @@ A simple example of the validation can be found in the `doc` command:
542
542
  ```typescript
543
543
  @Validator(async (cmd) => {
544
544
  const docFile = path.resolve(cmd.input);
545
- if (!(await fs.stat(docFile).catch(() => false))) {
545
+ if (!(await fs.stat(docFile, { throwIfNoEntry: false }))) {
546
546
  return { message: `input: ${cmd.input} does not exist`, path: 'input', source: 'flag', kind: 'invalid' };
547
547
  }
548
548
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/cli",
3
- "version": "8.0.0-alpha.3",
3
+ "version": "8.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "description": "CLI infrastructure for Travetto framework",
6
6
  "keywords": [
@@ -29,8 +29,8 @@
29
29
  "directory": "module/cli"
30
30
  },
31
31
  "dependencies": {
32
- "@travetto/schema": "^8.0.0-alpha.2",
33
- "@travetto/terminal": "^8.0.0-alpha.2"
32
+ "@travetto/schema": "^8.0.0-alpha.3",
33
+ "@travetto/terminal": "^8.0.0-alpha.3"
34
34
  },
35
35
  "travetto": {
36
36
  "displayName": "Command Line Interface",
package/src/parse.ts CHANGED
@@ -95,7 +95,7 @@ export class CliParseUtil {
95
95
 
96
96
  const file = path.resolve(relativePath);
97
97
 
98
- if (!await fs.stat(file).catch(() => false)) {
98
+ if (!await fs.stat(file, { throwIfNoEntry: false })) {
99
99
  throw new Error(`Missing flag file: ${key}, unable to proceed`);
100
100
  }
101
101