@travetto/doc 7.0.0-rc.2 → 7.0.0-rc.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/package.json +3 -3
- package/src/util/run.ts +0 -1
- package/support/cli.doc.ts +6 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/doc",
|
|
3
|
-
"version": "7.0.0-rc.
|
|
3
|
+
"version": "7.0.0-rc.4",
|
|
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": "^7.0.0-rc.
|
|
27
|
+
"@travetto/runtime": "^7.0.0-rc.4",
|
|
28
28
|
"@types/prismjs": "^1.26.5",
|
|
29
29
|
"prismjs": "^1.30.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@travetto/cli": "^7.0.0-rc.
|
|
32
|
+
"@travetto/cli": "^7.0.0-rc.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@travetto/cli": {
|
package/src/util/run.ts
CHANGED
package/support/cli.doc.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
|
-
import { spawn } from 'node:child_process';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
|
|
5
4
|
import { PackageUtil } from '@travetto/manifest';
|
|
6
5
|
import { ExecUtil, Env, watchCompiler, Runtime } from '@travetto/runtime';
|
|
7
|
-
import { CliCommandShape, CliCommand, CliValidationError
|
|
6
|
+
import { CliCommandShape, CliCommand, CliValidationError } from '@travetto/cli';
|
|
8
7
|
import { MinLength } from '@travetto/schema';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -28,7 +27,7 @@ export class DocCommand implements CliCommandShape {
|
|
|
28
27
|
Env.TRV_ROLE.set('doc');
|
|
29
28
|
Env.TRV_CLI_IPC.clear();
|
|
30
29
|
Env.TRV_LOG_PLAIN.set(true);
|
|
31
|
-
Env.FORCE_COLOR.set(false)
|
|
30
|
+
Env.FORCE_COLOR.set(false);// Prevent restarting
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
preBind(): void {
|
|
@@ -48,14 +47,10 @@ export class DocCommand implements CliCommandShape {
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
async runWatch(): Promise<void> {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const args = process.argv.slice(2).filter(arg => !/(-w|--watch)/.test(arg));
|
|
56
|
-
for await (const { action, file } of watchCompiler({ restartOnExit: true })) {
|
|
57
|
-
if (action === 'update' && file === this.input) {
|
|
58
|
-
const subProcess = spawn('npx', ['trv', ...args], {
|
|
50
|
+
const [first, ...args] = process.argv.slice(2).filter(arg => !/(-w|--watch)/.test(arg));
|
|
51
|
+
for await (const { file } of watchCompiler({ restartOnCompilerExit: true })) {
|
|
52
|
+
if (file === this.input) {
|
|
53
|
+
const subProcess = ExecUtil.spawnTrv(first, args, {
|
|
59
54
|
cwd: Runtime.mainSourcePath,
|
|
60
55
|
env: { ...process.env, ...Env.TRV_QUIET.export(true) },
|
|
61
56
|
stdio: 'inherit'
|