@travetto/doc 7.0.0-rc.2 → 7.0.0-rc.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/doc",
3
- "version": "7.0.0-rc.2",
3
+ "version": "7.0.0-rc.3",
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.2",
27
+ "@travetto/runtime": "^7.0.0-rc.3",
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.2"
32
+ "@travetto/cli": "^7.0.0-rc.3"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/cli": {
package/src/util/run.ts CHANGED
@@ -80,7 +80,6 @@ export class DocRunUtil {
80
80
  env: {
81
81
  ...process.env,
82
82
  ...Env.DEBUG.export(false),
83
- ...Env.TRV_CAN_RESTART.export(false),
84
83
  ...Env.TRV_CLI_IPC.export(undefined),
85
84
  ...Env.TRV_MANIFEST.export(''),
86
85
  ...Env.TRV_BUILD.export('none'),
@@ -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, CliUtil } from '@travetto/cli';
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
- if (await CliUtil.runWithRestart(this)) {
52
- return;
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'