@travetto/doc 4.1.0 → 4.1.1
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/LICENSE +1 -1
- package/package.json +3 -4
- package/src/util/run.ts +3 -3
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/doc",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Documentation support for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -24,13 +24,12 @@
|
|
|
24
24
|
"directory": "module/doc"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@travetto/base": "^4.1.
|
|
28
|
-
"@travetto/terminal": "^4.1.0",
|
|
27
|
+
"@travetto/base": "^4.1.1",
|
|
29
28
|
"@types/prismjs": "^1.26.4",
|
|
30
29
|
"prismjs": "^1.29.0"
|
|
31
30
|
},
|
|
32
31
|
"peerDependencies": {
|
|
33
|
-
"@travetto/cli": "^4.1.
|
|
32
|
+
"@travetto/cli": "^4.1.1"
|
|
34
33
|
},
|
|
35
34
|
"peerDependenciesMeta": {
|
|
36
35
|
"@travetto/cli": {
|
package/src/util/run.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
+
import util from 'node:util';
|
|
2
3
|
import { spawn, ChildProcess } from 'node:child_process';
|
|
3
4
|
|
|
4
5
|
import { path, RuntimeIndex, RuntimeContext } from '@travetto/manifest';
|
|
5
6
|
import { Env, ExecUtil } from '@travetto/base';
|
|
6
|
-
import { StyleUtil } from '@travetto/terminal';
|
|
7
7
|
|
|
8
8
|
export const COMMON_DATE = new Date('2029-03-14T00:00:00.000').getTime();
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ export class DocRunUtil {
|
|
|
50
50
|
*/
|
|
51
51
|
static cleanRunOutput(text: string, cfg: RunConfig): string {
|
|
52
52
|
const cwd = path.toPosix((cfg.module ? RuntimeIndex.getModule(cfg.module)! : RuntimeIndex.mainModule).sourcePath);
|
|
53
|
-
text =
|
|
53
|
+
text = util.stripVTControlCharacters(text.trim())
|
|
54
54
|
.replaceAll(cwd, '.')
|
|
55
55
|
.replaceAll(os.tmpdir(), '/tmp')
|
|
56
56
|
.replaceAll(RuntimeContext.workspace.path, '<workspace-root>')
|
|
@@ -104,7 +104,7 @@ export class DocRunUtil {
|
|
|
104
104
|
if (!res.valid) {
|
|
105
105
|
throw new Error(res.stderr);
|
|
106
106
|
}
|
|
107
|
-
final =
|
|
107
|
+
final = util.stripVTControlCharacters(res.stdout).trim() || util.stripVTControlCharacters(res.stderr).trim();
|
|
108
108
|
} catch (err) {
|
|
109
109
|
if (err instanceof Error) {
|
|
110
110
|
final = err.message;
|