@travetto/doc 3.4.0-rc.0 → 3.4.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/doc",
3
- "version": "3.4.0-rc.0",
3
+ "version": "3.4.0-rc.1",
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/base": "^3.4.0-rc.0",
27
+ "@travetto/base": "^3.4.0-rc.1",
28
28
  "@types/prismjs": "^1.26.2",
29
29
  "prismjs": "^1.29.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@travetto/cli": "^3.4.0-rc.0"
32
+ "@travetto/cli": "^3.4.0-rc.2"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/cli": {
@@ -37,7 +37,7 @@
37
37
  }
38
38
  },
39
39
  "travetto": {
40
- "profiles": [
40
+ "roles": [
41
41
  "doc"
42
42
  ],
43
43
  "displayName": "Documentation"
package/src/util/run.ts CHANGED
@@ -11,7 +11,7 @@ export type RunConfig = {
11
11
  rewrite?: (text: string) => string;
12
12
  module?: string;
13
13
  env?: Record<string, string>;
14
- profiles?: string[];
14
+ envName?: string;
15
15
  cwd?: string;
16
16
  };
17
17
 
@@ -62,10 +62,12 @@ export class DocRunUtil {
62
62
  env: {
63
63
  ...process.env,
64
64
  DEBUG: '0',
65
+ TRV_CAN_RESTART: '0',
66
+ TRV_CLI_IPC: '',
65
67
  TRV_MANIFEST: '',
66
68
  TRV_BUILD: 'none',
67
69
  TRV_MODULE: config.module ?? '',
68
- ...(config.profiles ? { TRV_PROFILES: config.profiles.join(' ') } : {}),
70
+ ...(config.envName ? { TRV_ENV: config.envName } : {}),
69
71
  ...(config.env ?? {})
70
72
  }
71
73
  }
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs/promises';
2
2
 
3
3
  import { PackageUtil, path, RootIndex } from '@travetto/manifest';
4
- import { ExecUtil, GlobalEnvConfig } from '@travetto/base';
4
+ import { ExecUtil, GlobalEnvConfig, CompilerClient } from '@travetto/base';
5
5
  import { CliCommandShape, CliCommand, CliValidationError, CliUtil } from '@travetto/cli';
6
6
  import { MinLength } from '@travetto/schema';
7
7
 
@@ -54,8 +54,7 @@ export class DocCommand implements CliCommandShape {
54
54
  }
55
55
 
56
56
  const args = process.argv.slice(2).filter(x => !/(-w|--watch)/.test(x));
57
- const { listenFileChanges } = await import('@travetto/base/src/internal/compiler-client.js');
58
- for await (const { action, file } of listenFileChanges()) {
57
+ await new CompilerClient().onFileChange(async ({ action, file }) => {
59
58
  if (action === 'update' && file === this.input) {
60
59
  await ExecUtil.spawn('npx', ['trv', ...args], {
61
60
  cwd: RootIndex.mainModule.sourcePath,
@@ -63,7 +62,7 @@ export class DocCommand implements CliCommandShape {
63
62
  stdio: 'inherit', catchAsResult: true
64
63
  });
65
64
  }
66
- }
65
+ }, true);
67
66
  }
68
67
 
69
68
  async render(): Promise<void> {