@sketch-hq/sketch-assistant-cli
Advanced tools
Comparing version 6.0.0 to 6.3.0
# @sketch-hq/sketch-assistant-cli | ||
## 6.3.0 | ||
### Minor Changes | ||
- 77b71de: Fix the Sketch file JSON being mirrored into CLI results potentially causing | ||
out-of-memory errors. | ||
- 77b71de: Removed the `--profile` flag, profiling data is now always included in the output when | ||
the `--json` flag is used. | ||
## 6.0.0 | ||
@@ -4,0 +13,0 @@ |
@@ -55,3 +55,5 @@ "use strict"; | ||
Switch from human-readable output to JSON. Example: | ||
Switch from human-readable output to JSON. The JSON output includes the | ||
full result set from the Assistants as well as profiling data about how | ||
quickly individual rules executed. Example: | ||
@@ -65,7 +67,3 @@ sketch-assistants --json "./path/to/file.sketch" | ||
folder. | ||
--profile | ||
Output statistics instead of results. | ||
--workspace | ||
@@ -207,3 +205,2 @@ | ||
}); | ||
const makeCliProfile = (cliResults) => cliResults.reduce((acc, result) => (Object.assign(Object.assign({}, acc), { [result.filepath]: result.code === 'error' ? result.message : sketch_assistant_utils_1.makeProfile(result.output) })), {}); | ||
/** | ||
@@ -370,6 +367,8 @@ * Format results as a human readable string. | ||
try { | ||
const output = yield runFile(filepath, tmpDir); | ||
results.push({ | ||
filepath, | ||
code: 'success', | ||
output: yield runFile(filepath, tmpDir), | ||
output: { ignore: output.ignore, assistants: output.assistants }, | ||
profile: sketch_assistant_utils_1.makeProfile(output), | ||
}); | ||
@@ -388,5 +387,2 @@ } | ||
} | ||
else if (cli.flags.profile) { | ||
console.log(JSON.stringify(makeCliProfile(results), null, 2)); | ||
} | ||
else { | ||
@@ -393,0 +389,0 @@ console.log(formatResults(results)); |
{ | ||
"name": "@sketch-hq/sketch-assistant-cli", | ||
"version": "6.0.0", | ||
"version": "6.3.0", | ||
"bin": { | ||
@@ -5,0 +5,0 @@ "sketch-assistants": "bin/cli.js" |
@@ -81,6 +81,2 @@ # sketch-assistant-cli | ||
#### `--profile` | ||
Output statistics instead of results. | ||
#### `--workspace` | ||
@@ -87,0 +83,0 @@ |
24084
372
134