@travetto/cli 7.1.3 → 7.1.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/error.ts +1 -2
- package/src/scm.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/cli",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI infrastructure for Travetto framework",
|
|
6
6
|
"keywords": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"directory": "module/cli"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@travetto/schema": "^7.1.
|
|
33
|
-
"@travetto/terminal": "^7.1.
|
|
32
|
+
"@travetto/schema": "^7.1.4",
|
|
33
|
+
"@travetto/terminal": "^7.1.4"
|
|
34
34
|
},
|
|
35
35
|
"travetto": {
|
|
36
36
|
"displayName": "Command Line Interface",
|
package/src/error.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AppError, Runtime } from '@travetto/runtime';
|
|
2
|
-
import { PackageUtil } from '@travetto/manifest';
|
|
3
2
|
|
|
4
3
|
import { cliTpl } from './color.ts';
|
|
5
4
|
import type { CliValidationError, CliCommandShape } from './types.ts';
|
|
@@ -24,7 +23,7 @@ export class CliUnknownCommandError extends Error {
|
|
|
24
23
|
const matchedConfig = COMMAND_PACKAGE.find(([regex]) => regex.test(cmd));
|
|
25
24
|
if (matchedConfig) {
|
|
26
25
|
const [, pkg, production] = matchedConfig;
|
|
27
|
-
const install =
|
|
26
|
+
const install = Runtime.getInstallCommand(`@travetto/${pkg}`, production);
|
|
28
27
|
return cliTpl`
|
|
29
28
|
${{ title: 'Missing Package' }}\n${'-'.repeat(20)}\nTo use ${{ input: cmd }} please run:\n
|
|
30
29
|
${{ identifier: install }}
|
package/src/scm.ts
CHANGED
|
@@ -48,7 +48,6 @@ export class CliScmUtil {
|
|
|
48
48
|
*/
|
|
49
49
|
static async findChangedFiles(fromHash: string, toHash: string = 'HEAD'): Promise<string[]> {
|
|
50
50
|
const rootPath = Runtime.workspace.path;
|
|
51
|
-
console.log(`Detecting changes between ${fromHash} and ${toHash}...`);
|
|
52
51
|
const result = await ExecUtil.getResult(spawn('git', ['diff', '--name-only', `${fromHash}..${toHash}`, ':!**/DOC.*', ':!**/README.*'], { cwd: rootPath }), { catch: true });
|
|
53
52
|
if (!result.valid) {
|
|
54
53
|
throw new AppError('Unable to detect changes between', { category: 'data', details: { fromHash, toHash, output: (result.stderr || result.stdout) } });
|