@travetto/doc 8.0.0-alpha.1 → 8.0.0-alpha.11

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
@@ -99,7 +99,7 @@ Options:
99
99
  -i, --input <string> Input File (default: "DOC.tsx")
100
100
  -o, --outputs <string> Outputs (default: ["README.md"])
101
101
  -w, --watch Watch? (default: false)
102
- -h, --help display help for command
102
+ --help display help for command
103
103
  ```
104
104
 
105
105
  By default, running the command will output the [Markdown](https://en.wikipedia.org/wiki/Markdown) content directly to the terminal.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/doc",
3
- "version": "8.0.0-alpha.1",
3
+ "version": "8.0.0-alpha.11",
4
4
  "description": "Documentation support for the Travetto framework",
5
5
  "keywords": [
6
6
  "docs",
@@ -24,12 +24,12 @@
24
24
  "directory": "module/doc"
25
25
  },
26
26
  "dependencies": {
27
- "@travetto/runtime": "^8.0.0-alpha.1",
27
+ "@travetto/runtime": "^8.0.0-alpha.11",
28
28
  "@types/prismjs": "^1.26.6",
29
29
  "prismjs": "^1.30.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@travetto/cli": "^8.0.0-alpha.1"
32
+ "@travetto/cli": "^8.0.0-alpha.16"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/cli": {
@@ -103,6 +103,10 @@ export const MODULES = {
103
103
  name: '@travetto/model-firestore', folder: '@travetto/model-firestore', displayName: 'Firestore Model Support',
104
104
  description: 'Firestore backing for the travetto model module.'
105
105
  },
106
+ ModelIndexed: {
107
+ name: '@travetto/model-indexed', folder: '@travetto/model-indexed', displayName: 'Data Model Indexing Support',
108
+ description: 'Basic indexing support for model sources that support it.'
109
+ },
106
110
  ModelMemory: {
107
111
  name: '@travetto/model-memory', folder: '@travetto/model-memory', displayName: 'Memory Model Support',
108
112
  description: 'Memory backing for the travetto model module.'
@@ -124,7 +124,7 @@ ${PackageDocUtil.getInstallInstructions(node.props.pkg, true)}
124
124
  Ref: async ({ context, props }) =>
125
125
  `<a target="_blank" class="source-link" href="${context.link(props.href, props)}">${props.title}</a>`,
126
126
  Image: async ({ context, props }) => {
127
- if (!/^https?:/.test(props.href) && !(await fs.stat(props.href).catch(() => false))) {
127
+ if (!/^https?:/.test(props.href) && !(await fs.stat(props.href, { throwIfNoEntry: false }))) {
128
128
  throw new Error(`${props.href} is not a valid location`);
129
129
  }
130
130
  return `<img src="${context.link(props.href, props)}" alt="${props.title}">`;
@@ -101,7 +101,7 @@ ${context.cleanText(content.text)}
101
101
  },
102
102
 
103
103
  Image: async ({ props, context }) => {
104
- if (!/^https?:/.test(props.href) && !(await fs.stat(props.href).catch(() => false))) {
104
+ if (!/^https?:/.test(props.href) && !(await fs.stat(props.href, { throwIfNoEntry: false }))) {
105
105
  throw new Error(`${props.href} is not a valid location`);
106
106
  }
107
107
  return `![${props.title}](${context.link(props.href)})`;
@@ -12,7 +12,7 @@ import { PackageUtil } from '@travetto/manifest';
12
12
  @CliCommand()
13
13
  @Validator(async (cmd) => {
14
14
  const docFile = path.resolve(cmd.input);
15
- if (!(await fs.stat(docFile).catch(() => false))) {
15
+ if (!(await fs.stat(docFile, { throwIfNoEntry: false }))) {
16
16
  return { message: `input: ${cmd.input} does not exist`, path: 'input', source: 'flag', kind: 'invalid' };
17
17
  }
18
18
  })