@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 +1 -1
- package/package.json +3 -3
- package/src/mapping/module.ts +4 -0
- package/src/render/html.ts +1 -1
- package/src/render/markdown.ts +1 -1
- package/support/cli.doc.ts +1 -1
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
32
|
+
"@travetto/cli": "^8.0.0-alpha.16"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@travetto/cli": {
|
package/src/mapping/module.ts
CHANGED
|
@@ -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.'
|
package/src/render/html.ts
CHANGED
|
@@ -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
|
|
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}">`;
|
package/src/render/markdown.ts
CHANGED
|
@@ -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
|
|
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 `})`;
|
package/support/cli.doc.ts
CHANGED
|
@@ -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
|
|
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
|
})
|