@travetto/scaffold 4.0.0-rc.0 → 4.0.0-rc.2

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/scaffold",
3
- "version": "4.0.0-rc.0",
3
+ "version": "4.0.0-rc.2",
4
4
  "description": "App Scaffold for the Travetto framework",
5
5
  "keywords": [
6
6
  "generator",
@@ -27,9 +27,9 @@
27
27
  "trv-scaffold": "./bin/trv-scaffold.js"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/base": "^4.0.0-rc.0",
31
- "@travetto/cli": "^4.0.0-rc.0",
32
- "@travetto/compiler": "^4.0.0-rc.0",
30
+ "@travetto/base": "^4.0.0-rc.2",
31
+ "@travetto/cli": "^4.0.0-rc.2",
32
+ "@travetto/compiler": "^4.0.0-rc.2",
33
33
  "enquirer": "^2.4.1",
34
34
  "mustache": "^4.2.0"
35
35
  },
@@ -1,9 +1,10 @@
1
1
  import fs from 'node:fs/promises';
2
+ import { spawn } from 'node:child_process';
2
3
  import mustache from 'mustache';
3
4
 
5
+ import { ExecUtil, StreamUtil } from '@travetto/base';
4
6
  import { cliTpl } from '@travetto/cli';
5
7
  import { path, RuntimeIndex, NodePackageManager, PackageUtil } from '@travetto/manifest';
6
- import { ExecUtil, ExecutionResult } from '@travetto/base';
7
8
  import { Terminal } from '@travetto/terminal';
8
9
 
9
10
  import { Feature } from './features';
@@ -50,16 +51,19 @@ export class Context {
50
51
  this.#targetDir = path.resolve(targetDir);
51
52
  }
52
53
 
53
- #exec(cmd: string, args: string[]): Promise<ExecutionResult> {
54
+ #exec(cmd: string, args: string[]): Promise<void> {
54
55
  const term = new Terminal();
55
- const res = ExecUtil.spawn(cmd, args, {
56
+ const proc = spawn(cmd, args, {
56
57
  cwd: this.destination(),
57
58
  stdio: [0, 'pipe', 'pipe'],
58
- isolatedEnv: true,
59
- onStdErrorLine: line => term.writer.write(cliTpl` ${{ identifier: [cmd, ...args].join(' ') }}: ${line}`).commit()
60
- }).result;
59
+ shell: false,
60
+ env: { PATH: process.env.PATH },
61
+ });
61
62
 
62
- return res;
63
+ StreamUtil.onLine(proc.stderr,
64
+ line => term.writer.writeLine(cliTpl` ${{ identifier: [cmd, ...args].join(' ') }}: ${line}`).commit());
65
+
66
+ return ExecUtil.getResult(proc).then(() => { });
63
67
  }
64
68
 
65
69
  get selfPath(): string {